Author Topic: [Fixed] BUG: v0.3 g3d viewer  (Read 1745 times)

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
[Fixed] BUG: v0.3 g3d viewer
« on: 18 September 2010, 02:58:16 »
When running gae_g3dviewer from command line, after all dependencies have been satisfied, the command fails with the error "Segmentation fault".

Linux Mint 32-bit, g3d viewer that comes with GAE 0.3
« Last Edit: 23 November 2010, 23:23:19 by John.d.h »

Yggdrasil

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: BUG: v0.3 g3d viewer
« Reply #1 on: 18 September 2010, 11:33:50 »
Works fine for me. Is it during startup or when you load a model?

Please install gdb if you don't have it and run:
Code: [Select]
$ gdb gae_g3dviewer
This will start the debugger with g3dviewer. Then run the program:
Code: [Select]
(gdb) r
After you got the segfault, create a backtrace:
Code: [Select]
(gdb) bt
Quit the debugger with q and answer with yes so that the g3dviewer will be closed too.
Code: [Select]
(gdb) q
Please post the whole session.

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: BUG: v0.3 g3d viewer
« Reply #2 on: 18 September 2010, 18:01:19 »
Okay, I've gotten a little bit different behavior on my Ubuntu system.  It still gives a segfault and still won't work properly, but it does open up a window called "g3d viewer", but it's only a blank white window (which it did not do on Mint).  Also, two different results from gdb.

On Linux Mint 9 Isadora 32-bit:
http://pastebin.com/fuVDxLk2

On Ubuntu 10.04 Lucid 32-bit:
http://pastebin.com/Qq6yLG7r

(Side note: The operating systems are very similar, as Mint is based on Ubuntu.)

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: BUG: v0.3 g3d viewer
« Reply #3 on: 23 November 2010, 07:43:48 »
I know this has supposedly been solved, but now I'm getting a different kind of error after building the latest version from SVN trunk.

Code: [Select]
The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
  (Details: serial 336 error_code 9 request_code 137 minor_code 8)

Full output:
http://pastebin.com/PkN5HQVB
« Last Edit: 23 November 2010, 07:45:50 by John.d.h »

Yggdrasil

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: BUG: v0.3 g3d viewer
« Reply #4 on: 23 November 2010, 10:41:21 »
I can't reproduce (i'm hitting a driver bug with my laptop and have no problem with my desktop). Something is weird with your wxgtk version as it's an error in the communication of the toolkit with the X11 server. I don't know how we trigger this. Are you able to run MG's version as it's not that different?

gdb is only useful when you build the binaries with debug information. Set "CMAKE_BUILD_TYPE" to "Debug" (without quotes) in cmake. Just use cmake-gui or ccmake to change it, or
Code: [Select]
cmake -DCMAKE_BUILD_TYPE=Debug ..
Another thing: Did you really install the svn version? "gdb gae_g3dviewer" starts g3dviewer from the system path. You needn't to install it, running from the build directory works fine.

Try the following:
Code: [Select]
$ gdb gae_g3dviewer --sync
(gdb) b gdk_x_error()
(gdb) r
When you hit the breakpoint produce a backtrace.
Seems to only work with a debug enabled toolkit...

Btw, nothing was solved here as i can't reproduce. What system exactly are you using?
« Last Edit: 23 November 2010, 10:58:39 by Yggdrasil »

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: BUG: v0.3 g3d viewer
« Reply #5 on: 23 November 2010, 12:10:13 »
Okay, I tested it on my other machine, just copying the entire glestae_svn directory, and it runs on that machine but the menu buttons are unresponsive.  It also doesn't want to quit unless I force it.  That's my netbook running Linux Mint 9, which runs MG's viewer flawlessly.  The rest of this post regards only my original machine that caused the error, running Mint 10.


I can't reproduce (i'm hitting a driver bug with my laptop and have no problem with my desktop). Something is weird with your wxgtk version as it's an error in the communication of the toolkit with the X11 server. I don't know how we trigger this. Are you able to run MG's version as it's not that different?
MG's g3d viewer also produces a BadDrawable error.
http://pastebin.com/6EEYtV5P

Quote
gdb is only useful when you build the binaries with debug information. Set "CMAKE_BUILD_TYPE" to "Debug" (without quotes) in cmake. Just use cmake-gui or ccmake to change it, or
Code: [Select]
cmake -DCMAKE_BUILD_TYPE=Debug ..
Done.  I don't see any difference in the output.

Quote
Another thing: Did you really install the svn version? "gdb gae_g3dviewer" starts g3dviewer from the system path. You needn't to install it, running from the build directory works fine.
I built everything according to the GAE compile guide for Linux.  Running from the build directory produces the same error.

Quote
Btw, nothing was solved here as i can't reproduce. What system exactly are you using?
Linux Mint 10, 32 bit, just installed yesterday.

Yggdrasil

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: BUG: v0.3 g3d viewer
« Reply #6 on: 23 November 2010, 20:26:15 »
I commited a fix to trunk for the "driver problem" on my laptop. We need to use a z buffer there. All seems to work now on my laptop, so maybe this fixes your problem too. Just update your working copy and rebuild.

There's no 'make install' mentioned in the compile guide, so you probably haven't installed it and still use an installed old version. The binaries are located in your build directory. The following starts the g3dviewer with gdb assuming you're in the build directory:
Code: [Select]
gdb ./source/g3dviewer/gae_g3dviewer

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: [Fixed] BUG: v0.3 g3d viewer
« Reply #7 on: 23 November 2010, 23:24:18 »
I updated to the latest (957, I think?) and it works flawlessly now. :)

Thanks. :thumbup:

 

anything