Page 1 of 1

Debugging MegaTunix Tips

Posted: Thu Sep 23, 2010 11:25 am
by djandruczyk
For those fine strong adventurous souls, here's a simple set of steps to help debug megatunix issues.

NOTE:This applies only to the Unix Class of platforms (Linux, *BSD, OS-X), not Windows, as the Windows edition is actually cross-compiled under linux, even the self installer for windows is under linux.

Compile the sourcecode debugging enabled:
"cd" into the top level MegaTunix directory.
for regular tarball people:

Code: Select all

 ./configure --enable-debug  ; make clean ; make ; sudo make install
or Git people:

Code: Select all

 ./autogen.sh --enable-debug  ; make clean ; make ; sudo make install
To get a backtrace that is (hopefully) usable, do the following.
Make sure you have gdb installed (apt-get install gdb, yum install gdb, port install gdb, etc)

Code: Select all

cd src/libs ; gdb ./megatunix
You should get a prompt something similar to the following:

Code: Select all

gdb ./megatunix 
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/dave/git/MegaTunix/src/megatunix...done.
(gdb)
type "run" at the prompt, and it'll start

Do what you can to make it crash, type "backtrace" at the gdb prompt then send the output to me, or open a thread on the Megatunix subforum for it.

If you run megatunix and get gtk+ warnings, those indicate a bug that could eventually cause a crash, though it'll most certainly make something not work right in the Gui.
in the gdb prompt use "run --g-fatal-warnings" and when it stops, type "backtrace" and send me the result or open a thread detailing WHAT IT TOOK TO GET IT TO CRASH, what version of MegaTunix it was, and so on.

Re: Debugging MegaTunix Tips

Posted: Tue Oct 05, 2010 7:57 am
by StevenD57
As soon as I get my repaired v2.2 unit back from Peter Florance I will do this as I am getting gtk warnings out when I run the software.

Re: Debugging MegaTunix Tips

Posted: Tue Oct 05, 2010 4:22 pm
by djandruczyk
StevenD57 wrote:As soon as I get my repaired v2.2 unit back from Peter Florance I will do this as I am getting gtk warnings out when I run the software.
Are you running from the CURRENT git ? I can commit several times a day on a good day, and sometimes not for weeks.