Hello,

I cannot reproduce this behaviour on my machine. Having given up gdb for this particular problem I tried to track down the problem by "cout'ing" the linenumber that the program is at ...

What I found out is _very_ strange. When setting up the FBO this is done in RenderStage.cpp.

In Line 331 (I hope the number is correct, I might have changed the linenumbers by inserting something) we have

osg::notify(osg::INFO)<<"Setting up osg::CameraNode::FRAME_BUFFER_OBJECT"<<std::endl << std::flush; which was the last line of debug-information I get before the crash.

Then the last line that is being executed is

fbo->apply(state);

(which is nr. 384 in my code).

The whole function apply(state) is being executed (I printet out linenumbers there, too), but the line after the function-call is never reached. (I have a cout after the fbo->apply(state) which doesn´t get called).

So the program crashes while returning from that function, can this happen? Or could it be that the program crashes in a different thread?


So at least it is clear that this problem occurs on all MinGW-installations whose users have responded to my call. Maybe Robert could comment on this?

I tried my best to localize the problem, sorry I don´t get a stacktrace. I could not reproduce the program working in debug mode, and I could not reproduce the program working when commenting out the pointsprite-thing.

Regards,

Andreas

bertrand greslier schrieb:
I have find where is the problem (with optimisation -O2) in my case with the libosg.dll
this line [0  0x100b0492 in __static_initialization_and
_destruction_0(int, int) (
__initialize_p=269417824, __priority=2292424) at ../PointSprite.cpp:73]
in gdb has help me.

if I change the PointSprite.cpp:line64 file and I force to jump
the detection, it works correctly.

bool PointSprite::isPointSpriteSupported(unsigned int contextID)
{
   //  if (!s_extensions[contextID].initialized)
//     {
//         s_extensions[contextID].initialized = true;
// s_extensions[contextID].supported = isGLExtensionSupported(contextID, "GL_ARB_point_sprite") || isGLExtensionSupported(contextID, "GL_NV_point_sprite");
//     }

//     return s_extensions[contextID].supported;
  return true;
}

???
This function must not be compiled with -02 option,
perhaps it is isGLExtensionSupported witch crash, I don't know why exactly.




On 10/19/06, *bertrand greslier* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi Andreas,

        this is interesting. On my machine it crashes in debug
        version, too. Did
        you do anything special to build the debug-version? I just
        used "make
        debug" for OpenThreads, Producer and osg (and make install, of
        course).
        Or did you only build the debug-version of osg and left the
        others in
        release?


    I have just use a make debug on the OpenSceneGraph directory. The
    rest of OpenThread and Producer
    is in release target. To success to compile osg in debug mode, I
    have change the powf call to pow in osg/src/Image.cpp 275 else I
    get a link error on this function.
    However I have adapt the example with my framework to run and be
    deployed on the win32 pc but it is the same example code.

    My debugger version is
    i586-mingw32msvc-c++ -v
    Reading specs from /usr/lib/gcc/i586-mingw32msvc/3.4.4/specs
    Configured with:
    
/build/buildd/mingw32-3.4.4.20050522.1/build_dir/src/gcc-3.4.4-20050522-1/configure
    -v --prefix=/usr --target=i586-mingw32msvc
    --enable-languages=c,c++ --enable-threads --enable-sjlj-exceptions
    --disable-multilib --enable-version-specific-runtime-libs
    Thread model: win32
    gcc version 3.4.4 (mingw special)


        As I said, I don´t get a correct backtrace, because it seems
        that the
        application goes into an infinite loop in some module that is
        not in
        debug-mode (maybe opengl32.dll?).


     I haven't constat an infinite loop but the program exit anormaly
    in my case
    and I don't arrive to understand what he gdb windows version said
    exactly.

    +++++++++++++++++++++++++++++++++++++++++++++++++++++
    (gdb) run
    Starting program: C:\Documents and
    Settings\bertrand/.cooki3d/api/libCooki3d/Metier.exe -xml
    "C:\Documents and
    Settings\bertrand/.cooki3d/api/libCooki3d/.tmp.xml" -env sdl
    -debugOsg NOTICE -debugCooki false

    Program received signal SIGTRAP, Trace/breakpoint trap.
    0x7c911231 in _libws2_32_a_iname ()
    (gdb) warning: HEAP[Metier.exe]:
    warning: Invalid Address specified to RtlFreeHeap( 003D0000,
    010AF260 )

    n
    Single stepping until exit from function _libws2_32_a_iname,
    which has no line number information.
    osg::TriangleIndexFunctor<MyTriangleOperator>::drawElements(unsigned,
    int, unsigned const*) () at ../../../include/osg/Quat:42
            in ../../../include/osg/Quat
    Current language:  auto; currently c++
    (gdb) 42        ../../../include/osg/Quat: No such file or directory.
    n
    45      in ../../../include/osg/Quat
    (gdb) n
    297     in ../../../include/osg/Quat
    (gdb) n

    Program received signal SIGTRAP, Trace/breakpoint trap.
    0x7c911231 in _libws2_32_a_iname ()
    (gdb) warning: HEAP[Metier.exe]:
    warning: HEAP: Free Heap block 45941b0 modified at 45941cc after
    it was freed

    bt
    #0  0x7c911231 in _libws2_32_a_iname ()
    #1  0x7c97c943 in _libws2_32_a_iname ()
    #2  0x7c959eb9 in _libws2_32_a_iname ()
    #3  0x7c97d6aa in _libws2_32_a_iname ()
    #4  0x7c959d18 in _libws2_32_a_iname ()
    #5  0x7c92b298 in _libws2_32_a_iname ()
    #6  0x77bfc3c9 in _libws2_32_a_iname ()
    #7  0x77bfc3e7 in _libws2_32_a_iname ()
    #8  0x77bfc42e in _libws2_32_a_iname ()
    #9  0x10072477 in osg::Geometry::Geometry(osg::Geometry const&,
    osg::CopyOp const&) (this=0x0, [EMAIL PROTECTED],
    [EMAIL PROTECTED]) at ../Geometry.cpp:428
    #10 0x100b0492 in __static_initialization_and_destruction_0(int,
    int) (
        __initialize_p=269417824, __priority=2292424) at
    ../PointSprite.cpp:73
    #11 0x100afe2b in __gnu_internal::facet_vec ()
    #12 0x100b1f4a in std::string::string(char const*,
    std::allocator<char> const&)
        () at ../../../include/osg/Matrixd:389
    #13 0x10041b5d in osgDB::FieldReaderIterator::insert(int, char
    const*) ()
        at
    /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/bits/basic_string.h:218
    #14 0x10048f8e in loadBegin(char*, char*) () at ../Drawable.cpp:263
    #15 0x1004b6a8 in std::moneypunct<char, true>::do_grouping() const ()
        at ../Drawable.cpp:539
    #16 0x1004c229 in std::locale::_Impl::~_Impl() ()
        at
    /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/bits/stl_vector.h:117
    #17 0x10048b5c in std::basic_istream<char, std::char_traits<char>
    >& std::operator>><char, std::char_traits<char>
    >(std::basic_istream<char, std::char_traits<char> >&, std::_Setw) ()
        at /home/bertrand/localwin32/include/OpenThreads/ScopedLock:36
    (gdb) n
    Single stepping until exit from function _libws2_32_a_iname,
    which has no line number information.
    (gdb) warning: Cannot insert breakpoint 0:
    Cannot access memory at address 0x1b
    bt
    #0  0x100b0492 in __static_initialization_and_destruction_0(int,
    int) (
        __initialize_p=269417824, __priority=2292424) at
    ../PointSprite.cpp:73
    #1  0x0000001b in ?? ()
    #2  0x100afe2b in __gnu_internal::facet_vec ()
    #3  0x100b1f4a in std::string::string(char const*,
    std::allocator<char> const&)
        () at ../../../include/osg/Matrixd:389
    #4  0x10041b5d in osgDB::FieldReaderIterator::insert(int, char
    const*) ()
        at
    /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/bits/basic_string.h:218
    #5  0x10048f8e in loadBegin(char*, char*) () at ../Drawable.cpp:263
    #6  0x1004b6a8 in std::moneypunct<char, true>::do_grouping() const ()
        at ../Drawable.cpp:539
    #7  0x1004c229 in std::locale::_Impl::~_Impl() ()
        at
    /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/bits/stl_vector.h:117
    #8  0x10048b5c in std::basic_istream<char, std::char_traits<char>
    >& std::operator>><char, std::char_traits<char>
    >(std::basic_istream<char, std::char_traits<char> >&, std::_Setw) ()
        at /home/bertrand/localwin32/include/OpenThreads/ScopedLock:36
    (gdb) n
    0x100afe2b in __gnu_internal::facet_vec ()
    (gdb) n
    Single stepping until exit from function
    _ZN14__gnu_internal9facet_vecE,
    which has no line number information.
    0x100b1f4a in std::string::string(char const*,
    std::allocator<char> const&) ()
        at ../../../include/osg/Matrixd:389
            in ../../../include/osg/Matrixd
    (gdb) 389       ../../../include/osg/Matrixd: No such file or
    directory.
    bt
    #0  0x100b1f4a in std::string::string(char const*,
    std::allocator<char> const&)
        () at ../../../include/osg/Matrixd:389
    #1  0x100efdc0 in osg::PI_4 ()
    #2  0x10041b5d in osgDB::FieldReaderIterator::insert(int, char
    const*) ()
        at
    /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/bits/basic_string.h:218
    #3  0x10048f8e in loadBegin(char*, char*) () at ../Drawable.cpp:263
    #4  0x1004b6a8 in std::moneypunct<char, true>::do_grouping() const ()
        at ../Drawable.cpp:539
    #5  0x1004c229 in std::locale::_Impl::~_Impl() ()
        at
    /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/bits/stl_vector.h:117
    #6  0x10048b5c in std::basic_istream<char, std::char_traits<char>
    >& std::operator>><char, std::char_traits<char>
    >(std::basic_istream<char, std::char_traits<char> >&, std::_Setw) ()
        at /home/bertrand/localwin32/include/OpenThreads/ScopedLock:36
    (gdb) n
    osgDB::FieldReaderIterator::insert(int, char const*) ()
        at
    /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/bits/basic_string.h:178

            in
    /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/bits/basic_string.h
(gdb) 178 /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/bits/basic_string.h:
    No such file or directory.
    n
    261     in
    /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/bits/basic_string.h
    (gdb) n
    217     in
    /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/bits/basic_string.h
    (gdb) n
    217     in
    /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/bits/basic_string.h
    (gdb) n
    178     in
    /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/bits/basic_string.h
    (gdb) n
            in
    /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/ext/new_allocator.h
(gdb) 69 /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/ext/new_allocator.h:
    No such file or directory.
    n
            in
    /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/bits/basic_string.h
(gdb) 261 /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/bits/basic_string.h:
    No such file or directory.
    n
    0x10041c8f              in
    /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/ext/new_allocator.h
(gdb) 69 /usr/lib/gcc/i586-mingw32msvc/3.4.4/include/c++/ext/new_allocator.h:
    No such file or directory.
    n

    Program exited with code 037777777777.
    +++++++++++++++++++++++++++++++++++++++++++++++++++++

        And: Do you use the libopengl32.a that is provided with mingw?
        I tried
        to link directly to the microsoft-lib ( opengl32.lib), but
        that didn´t
        work. I thought that there might be an incompatibility with the
        mingw-lib and the microsoft-dll.


    I use only the libopengl32.a,
    it is not a good idea to use a .lib, for me it doesn't work
    correctly, make it only if you have not the choice.




------------------------------------------------------------------------

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to