wxGLCancas segmentation fault with release build

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
shelll
Knows some wx things
Knows some wx things
Posts: 25
Joined: Tue May 06, 2008 7:21 am

wxGLCancas segmentation fault with release build

Post by shelll » Tue May 06, 2008 7:47 am

hi,
i have problem with wxGLCanvas. i googled and also searched this forum and did not find any useful information.

i am developing a small app with opengl windows, but i ran into a problem, that when i make release build the app crashes on wxGLCanvas constructor.

debug build runs without any problems.

i am developing under windows xp with code::blocks 8.02, with bundled mingw (3.4.5), wxWidgets 2.8.7.

sample ogl app from CB's template runs ok. penguin sample from wxWidgets has the same problem. debug build ok, release build crashes. i tried it on five different computers and it runs only on one of them.

could it be a problem with wxwidgets, compiler or something else? ...i also installed newest driver for my geforce 6 and it still crashes.

thank yo for your help.

shelll
Knows some wx things
Knows some wx things
Posts: 25
Joined: Tue May 06, 2008 7:21 am

Post by shelll » Tue May 06, 2008 10:29 am

i just compiled todays snapshot of wxwdigets and linked my app against it and it crashed only on one out of three computers (crashed on an old notebook, i assume there are crappy ogl drivers, if any at all...).

i will test it on my school computer tomorrow, which is the only pc on wich the old version did not crash.

was there a bug in stable 2.8.7 version of wxwidgets?

shelll
Knows some wx things
Knows some wx things
Posts: 25
Joined: Tue May 06, 2008 7:21 am

Post by shelll » Wed May 07, 2008 10:56 am

it runs ok on my school computer, so it looks as a bug in wxwidgets 2.8.7

Deschamps
Knows some wx things
Knows some wx things
Posts: 30
Joined: Tue May 01, 2007 12:16 pm

Post by Deschamps » Thu May 08, 2008 9:37 am

I haven't found problems like those up to now, and I've developed programs using wxGLCanvas in different machines, with different custom wx-libs versions.

Only as a confirmation, when you built your wxMSW libraries, did you edit before that your <wxMSW folder>/include/wx/msw/setup.h file? (setting up the wxUSE_GLCANVAS define to 1)

Regards.
Misquotations are the only quotations that are never misquoted

shelll
Knows some wx things
Knows some wx things
Posts: 25
Joined: Tue May 06, 2008 7:21 am

Post by shelll » Thu May 08, 2008 7:25 pm

yes, i edited all the setup.h files. debug builds were runnig with no problems, i was able to open any number of ogl windows. only the release builds crash, except on one computer.

Deschamps
Knows some wx things
Knows some wx things
Posts: 30
Joined: Tue May 01, 2007 12:16 pm

Post by Deschamps » Fri May 09, 2008 8:27 am

When you compiled the penguin sample, did you compile it from the command line? Or creating a C::B project?
Are you using wx-config or another tool like that?
Misquotations are the only quotations that are never misquoted

shelll
Knows some wx things
Knows some wx things
Posts: 25
Joined: Tue May 06, 2008 7:21 am

Post by shelll » Fri May 09, 2008 4:37 pm

i created empty wxWidgets project in c::b and then added the penguin source code. compilation and linking was without any errors (both debug and release). but the release build crashed on creating new wxGLCanvas, without any message.

after running it under debugger i found out, that it crashed raising segmentation fault on command ...new wxGLCanvas(...);

debug build runs without any problems.

Deschamps
Knows some wx things
Knows some wx things
Posts: 30
Joined: Tue May 01, 2007 12:16 pm

Post by Deschamps » Sun May 11, 2008 10:56 am

Could you attach your C::B project file (only the .cbp file)? I think that maybe you are linking against wrong libraries in your release target. Or maybe you've not built properly your wxMSW release libraries.

I tried to create a C::B project from scratch, adding the penguin sample source code, and it compiles and runs smoothly for debug and release targets linking against wxWidgets 2.8.7 (for MSW and GTK platforms).

Regards.
Misquotations are the only quotations that are never misquoted

shelll
Knows some wx things
Knows some wx things
Posts: 25
Joined: Tue May 06, 2008 7:21 am

Post by shelll » Sun May 11, 2008 11:33 am

i think that c::b project is good, because i compiled it on my home pc and also on school pc (the same project file was used). where the "home" exe crashes everywhere except school pc. and the "school" exe behaved the same.

maybe i had a bad compilation of wxWidgets at home, bu i compiled it exactly the same as in school, with the same gcc compiler version and with the same commandline.

i solved this problem with the svn version of wxWidgets, wich is fine. now i am fighting with different problems with wxAUI and wxAUI + wxGLCanvas... thank you for your help.


ps: i don't have that old .cbp file, because i changed the linking to wxWisget's 2.9.x version...

shelll
Knows some wx things
Knows some wx things
Posts: 25
Joined: Tue May 06, 2008 7:21 am

Post by shelll » Sun May 11, 2008 11:38 am

i found the penguin .cpb file :)


ps: why is the .cbp file extension not allowed to attach?
Attachments
penguin.zip
penguin sample c::b project file
(2.69 KiB) Downloaded 28 times

Post Reply