[osg-users] osgLua and osgShadow

2009-09-10 Thread Marko Srebre
Hello,

while loading osgShadow with osgLua (which uses osgIntrospection and 
osgWrappers):

script->enable("osgShadow");

I get a segfault. This happens in 2.8.2 as in trunk. While I didn't properly 
investigate this, I should still mention for those interested that the crash 
can be avoided by suppressing the problematic ConvexPolyhedron object. Add the 
following to src/osgWrappers/genwrapper.conf and rebuild the wrappers:

suppress reflector "osgShadow::ConvexPolyhedron"

I may sure about this, but if this is not osgLua specific, perhaps it could be 
put in trunk until better solution come along.

Best regards, 
Marko



#0  0x7fca5fa385aa in osg::Matrixd::set () from 
/usr/local/lib64/libosg.so.55
#1  0x7fca5fa67c9c in osg::Matrixd::Matrixd () from 
/usr/local/lib64/libosg.so.55
#2  0x7fca57fff04e in 
osgIntrospection::Value::Instance_box::Instance_box ()
   from /usr/local/lib64/osgPlugins-2.8.2/osgwrapper_osg.so 
  
#3  0x7fca57ffe27b in osgIntrospection::Value::Value () from 
/usr/local/lib64/osgPlugins-2.8.2/osgwrapper_osg.so
#4  0x7fca56194ffd in (anonymous namespace)::reflector34::reflector34 ()
  
   from /usr/local/lib64/osgPlugins-2.8.2/osgwrapper_osgShadow.so   
  
#5  0x7fca56199337 in __static_initialization_and_destruction_0 () from 
/usr/local/lib64/osgPlugins-2.8.2/osgwrapper_osgShadow.so
#6  0x7fca56199558 in global constructors keyed to ConvexPolyhedron.cpp ()  
 
   from /usr/local/lib64/osgPlugins-2.8.2/osgwrapper_osgShadow.so   
 
#7  0x7fca56246cc2 in __do_global_ctors_aux () from 
/usr/local/lib64/osgPlugins-2.8.2/osgwrapper_osgShadow.so
#8  0x7fca56066c4b in _init () from 
/usr/local/lib64/osgPlugins-2.8.2/osgwrapper_osgShadow.so   
 
#9  0x7fca55fe65d0 in ?? () from 
/usr/local/lib64/osgPlugins-2.8.2/osgwrapper_osgShadow.so   

#10 0x7fca5ff1d998 in call_init () from /lib64/ld-linux-x86-64.so.2 
 
#11 0x7fca5ff1dac7 in _dl_init_internal () from /lib64/ld-linux-
x86-64.so.2  
#12 0x7fca5ff21cfe in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
 
#13 0x7fca5ff1d626 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2   
 
#14 0x7fca5ff214ab in _dl_open () from /lib64/ld-linux-x86-64.so.2  
 
#15 0x7fca5ad6cf9b in dlopen_doit () from /lib/libdl.so.2   
 
#16 0x7fca5ff1d626 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2   
 
#17 0x7fca5ad6d34c in _dlerror_run () from /lib/libdl.so.2  
 
#18 0x7fca5ad6cf01 in dlopen@@GLIBC_2.2.5 () from /lib/libdl.so.2   
 
#19 0x7fca5bb0c4bb in osgDB::DynamicLibrary::getLibraryHandle () from 
/usr/local/lib64/libosgDB.so.55
#20 0x7fca5bb0c2de in osgDB::DynamicLibrary::loadLibrary () from 
/usr/local/lib64/libosgDB.so.55 
#21 0x7fca5ef1d8d0 in osgLua::loadWrapper () from 
/usr/local/lib64/libosgLua.so  
#22 0x7fca5ef21722 in osgLua::Script::enable () from 
/usr/local/lib64/libosgLua.so   
#23 0x0040cb99 in Script::loadLibrary (this=0x19cb1e0, name=
 
{static npos = 18446744073709551615, _M_dataplus = 
{> = {<__gnu_cxx::new_allocator> = {}, }, _M_p = 0x19d3608 "osgShadow"}}) at 
/home/marko/devel/sword/applications/swordEngine/swordEngine.cpp:17  
#24 0x0040aa42 in main () at 
/home/marko/devel/sword/applications/swordEngine/swordEngine.cpp:125
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgLua?

2008-12-19 Thread Jose Luis Hidalgo
Hi Haltmut,

On Thu, Dec 18, 2008 at 1:23 AM, Hartmut Seichter
 wrote:
> Are you still working on osgLua? I can flick you a few patches that might
> fix a couple of problems.

Yes please :) send them to me :) I've switched to mac (again) and I'm
trying to make osgLua work, with very little time, but trying to catch
up with the current OSG trunk.

The RTTI problem, apart from the LD_GLOBAL, and the linker flags (
-Wl,-E ).. I can't tell what's going on sorry.

Cheers,
   Jose-Luis.

-- 
  Jose L. Hidalgo Valiño (PpluX)
   http://www.pplux.com 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgLua?

2008-12-17 Thread Hartmut Seichter


Hi Jose-Luis,

be assured I seen these messages before and also did the whole 
patches/linker flags etc. pp. that were suggested there. Still, the RTTI 
is stripped - so *nix is not going to work. Admittetly, I updated the 
osgLua sources in an intree version and added my own copy of Lua 5.1.4 
into the buildsys (with the patch). Again, I checked that in the whole 
chain mentioned libs are being compiled with these flags.


Its a pitty that this is been "ignored" by the Lua developers - I can't 
see why it is so outragous difficult to add this options. I will try to 
investigate in more depth - after all this is a very specific use-case.


Are you still working on osgLua? I can flick you a few patches that 
might fix a couple of problems.


Cheers,
Hartmut


Jose Luis Hidalgo wrote:

Hi Hartmut,
  The problem is how lua loads libraries, is an issue that comes from
time to time, and never is important enough to be solved:

http://lua-users.org/lists/lua-l/2007-10/msg00098.html

the answer from Luiz was:

http://lua-users.org/lists/lua-l/2007-10/msg00120.html

Basically that means you can not use osgLua properly from a vanilla
lua interpreter+libraries.

I tried myself to ask for it on the list:

http://lua-users.org/lists/lua-l/2006-11/msg00174.html

But... nothing :(

Hope it helps.

Jose-Luis.
On Mon, Dec 15, 2008 at 9:34 PM, Hartmut Seichter
 wrote:

No, not from Lua (or I guess a lua interpreter) itself - I have a wxWidgets
application which loads various plugins and one of them is a based around
osgLua - thus, lua_open etc pp should happen in that context. On Windows and
Mac this whole mechanism works fine - on Linux the RTTI seems to be the
showstopper. I added the Linkerflags mentioned somewhere to the whole chain
of dependencies: App > Plugin > Lua Lib

Any other ideas?


H


Jose Luis Hidalgo wrote:

Hi Hartmut,
  How do you try to load osgLua? from lua itself?

Cheers,
  Jose-Lus.

On Sun, Dec 14, 2008 at 10:25 PM, Hartmut Seichter
 wrote:


Hi there,

I am trying to combine the power of osgLua and osgSWIG in a new project
(no
I am not mad :)) ... However, I couldn't get osgLua play nicely on Linux
- I
did all the patching mentioned but no avail. I am on 64bit Ubuntu ... any
idea where things go haywire ... seems that RTTI get still stripped -
print(osg.Node) returns some mangled reference to osgObject.

Cheers,
Hartmut

--
Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), Postdoctoral Fellow,
HITLabNZ

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org








--
Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), Postdoctoral Fellow, HITLabNZ

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org







___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgLua?

2008-12-16 Thread Jose Luis Hidalgo
Hi Hartmut,
  The problem is how lua loads libraries, is an issue that comes from
time to time, and never is important enough to be solved:

http://lua-users.org/lists/lua-l/2007-10/msg00098.html

the answer from Luiz was:

http://lua-users.org/lists/lua-l/2007-10/msg00120.html

Basically that means you can not use osgLua properly from a vanilla
lua interpreter+libraries.

I tried myself to ask for it on the list:

http://lua-users.org/lists/lua-l/2006-11/msg00174.html

But... nothing :(

Hope it helps.

Jose-Luis.
On Mon, Dec 15, 2008 at 9:34 PM, Hartmut Seichter
 wrote:
>
> No, not from Lua (or I guess a lua interpreter) itself - I have a wxWidgets
> application which loads various plugins and one of them is a based around
> osgLua - thus, lua_open etc pp should happen in that context. On Windows and
> Mac this whole mechanism works fine - on Linux the RTTI seems to be the
> showstopper. I added the Linkerflags mentioned somewhere to the whole chain
> of dependencies: App > Plugin > Lua Lib
>
> Any other ideas?
>
>
> H
>
>
> Jose Luis Hidalgo wrote:
>>
>> Hi Hartmut,
>>   How do you try to load osgLua? from lua itself?
>>
>> Cheers,
>>   Jose-Lus.
>>
>> On Sun, Dec 14, 2008 at 10:25 PM, Hartmut Seichter
>>  wrote:
>>
>>>
>>> Hi there,
>>>
>>> I am trying to combine the power of osgLua and osgSWIG in a new project
>>> (no
>>> I am not mad :)) ... However, I couldn't get osgLua play nicely on Linux
>>> - I
>>> did all the patching mentioned but no avail. I am on 64bit Ubuntu ... any
>>> idea where things go haywire ... seems that RTTI get still stripped -
>>> print(osg.Node) returns some mangled reference to osgObject.
>>>
>>> Cheers,
>>> Hartmut
>>>
>>> --
>>> Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), Postdoctoral Fellow,
>>> HITLabNZ
>>>
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>>
>>
>>
>>
>
>
> --
> Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), Postdoctoral Fellow, HITLabNZ
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
  Jose L. Hidalgo Valiño (PpluX)
   http://www.pplux.com 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgLua?

2008-12-15 Thread Hartmut Seichter


No, not from Lua (or I guess a lua interpreter) itself - I have a 
wxWidgets application which loads various plugins and one of them is a 
based around osgLua - thus, lua_open etc pp should happen in that 
context. On Windows and Mac this whole mechanism works fine - on Linux 
the RTTI seems to be the showstopper. I added the Linkerflags mentioned 
somewhere to the whole chain of dependencies: App > Plugin > Lua Lib


Any other ideas?


H


Jose Luis Hidalgo wrote:

Hi Hartmut,
   How do you try to load osgLua? from lua itself?

Cheers,
   Jose-Lus.

On Sun, Dec 14, 2008 at 10:25 PM, Hartmut Seichter
 wrote:
  

Hi there,

I am trying to combine the power of osgLua and osgSWIG in a new project (no
I am not mad :)) ... However, I couldn't get osgLua play nicely on Linux - I
did all the patching mentioned but no avail. I am on 64bit Ubuntu ... any
idea where things go haywire ... seems that RTTI get still stripped -
print(osg.Node) returns some mangled reference to osgObject.

Cheers,
Hartmut

--
Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), Postdoctoral Fellow, HITLabNZ

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org






  



--
Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), Postdoctoral Fellow, HITLabNZ

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgLua?

2008-12-15 Thread Jose Luis Hidalgo
Hi Hartmut,
   How do you try to load osgLua? from lua itself?

Cheers,
   Jose-Lus.

On Sun, Dec 14, 2008 at 10:25 PM, Hartmut Seichter
 wrote:
>
> Hi there,
>
> I am trying to combine the power of osgLua and osgSWIG in a new project (no
> I am not mad :)) ... However, I couldn't get osgLua play nicely on Linux - I
> did all the patching mentioned but no avail. I am on 64bit Ubuntu ... any
> idea where things go haywire ... seems that RTTI get still stripped -
> print(osg.Node) returns some mangled reference to osgObject.
>
> Cheers,
> Hartmut
>
> --
> Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), Postdoctoral Fellow, HITLabNZ
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
  Jose L. Hidalgo Valiño (PpluX)
   http://www.pplux.com 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgLua?

2008-12-14 Thread Hartmut Seichter


Hi there,

I am trying to combine the power of osgLua and osgSWIG in a new project 
(no I am not mad :)) ... However, I couldn't get osgLua play nicely on 
Linux - I did all the patching mentioned but no avail. I am on 64bit 
Ubuntu ... any idea where things go haywire ... seems that RTTI get 
still stripped - print(osg.Node) returns some mangled reference to 
osgObject.


Cheers,
Hartmut

--
Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), 
Postdoctoral Fellow, HITLabNZ


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgLua

2008-07-21 Thread Julien ENOCQ
Hello, 
I've a problem with osgLua.
Is it always maintained ?

For the moment, I just want to test the osgLua examples :

osg::Group* group = new osg::Group;
osg::Group* root = new osg::Group;
try {
group->addChild(root);
osg::ref_ptr script = new osgLua::Script();
script->enable("osg");
script->set(root, "root");
script->loadFile("/home/julien/workspace/TestLua/src/test.lua");

} catch (osgLua::Exception & e) {
std::cout << e.what() << std::endl;
}

and the test.lua provided with osgLua :


local root2 = osg.Group()
local geode = osg.Geode()
local shape = osg.ShapeDrawable()
shape:setShape( osg.Sphere(osg.Vec3(0,0,0),15) )
geode:addDrawable(shape)
root:addChild(geode)

-- we will now load osgText from the script
osgLua.loadWrapper("osgText")

text = osgText.Text()
text:setCharacterSize(4)
text:setPosition(osg.Vec3(0,0,18))
text:setAxisAlignment(osgText.Text.AxisAlignment.SCREEN)
text:setAlignment(osgText.Text.AlignmentType.CENTER_BASE_LINE)
text:setText("Hi all from osgLua!")
text:setColor(osg.Vec4(0.9,0.8,0.2,1.0))
geode:addDrawable(text)



The result :

/TestLua/src/test.lua:9: [/home/julien/OSG/osgLua/src/osgLua/Value.cpp:260] 
ype `PN3osg5GroupE' is declared but not defined

I have liked all the osg and osgLua libraries, I don't understand...

Someone has an idea ? Thank you
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgLua and my own classes

2008-07-16 Thread Julien ENOCQ
Hi all,
I want to use my own C++ classes in addition to those of OSG in my Lua
scripts and I read in the README of OsgLua :

"osgLua can also be used to access your own reflected classes (with
osgWrapper)"

but I am wondering how to do that, there is no example. Must I parse my
classes with genparser ? And after ?

Thanks you.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org