aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: backtrace failed.  (Read 3997 times)

wRabbit

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 20
backtrace failed.
« on: January 04, 2005, 06:55:54 AM »

Tried to set up amule/gdb according to the wiki site, but it didn't work, is there something broken?


Gdk-ERROR **: BadRequest (invalid request code or no such operation)
   serial 419300597 error_code 1 request_code 0 minor_code 0 Gdk-ERROR **: BadRequest (invalid request code or no such operation)
   serial 419300600 error_code 1 request_code 0 minor_code 0

Program exited with code 01.
(gdb)
(gdb) bt
No stack.
(gdb) bt full
No stack.
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: backtrace failed.
« Reply #1 on: January 04, 2005, 10:00:23 AM »

What is your distro? You probably have a bad wxGTK installed. Are you compiling it yourself, using one of ours or using the distro package?

post here:

rpm -qa | grep -i wx (if your distro is rpm based)
ls -l /usr/local/bin/wx*
ls -l /usr/bin/wx*

Cheers!
Logged

wRabbit

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 20
Re: backtrace failed.
« Reply #2 on: January 04, 2005, 04:58:08 PM »

Running Slackware 10.0 with wxGTK-2.4.2 from linuxpackages.net
Checked again my compilation of aMule, but I did compile it with --enable-debug and --disable-optimise

A $HOME/.gdbinit is created according to the wiki.

Thanx for your reply.
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: backtrace failed.
« Reply #3 on: January 04, 2005, 09:27:45 PM »

I am not a slackware expert, but I believe you should compile wxGTK yourself. Most distros have problematic wxGTK.

Maybe a slackware user can help you better? Anyone?

Cheers!
Logged

wRabbit

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 20
Re: backtrace failed.
« Reply #4 on: January 07, 2005, 04:34:44 PM »

Alright then,

Installed from source: wxGTK, wxBase and aMule, but I still get this error ...  ;)

I am able to debug a simple helloworld.c program, any suggestions?
« Last Edit: January 07, 2005, 04:36:07 PM by wRabbit »
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: backtrace failed.
« Reply #5 on: January 07, 2005, 05:47:26 PM »

1) Explain exactly how to reproduce the error, if it is deterministic
2) If you can read the code, put a breakpoint right before the place you think is causing the error.

It is strange that the program does not generate an aMule backtrace. Looks like (from the line Program exited with code 01) that the program is exiting normally. The lines with Gdk-ERROR suggest that there is something wrong with wxGTK configuration. I have several versions of wxGTK installed in different directories, so that I can test and there is no need to touch the system files. You can change the prefix path to point to a directory inside you home dir if you like.

I compiled my wxGTK with:

./configure --enable-debug --disable-optimise --enable-debug_flag --enable-debug_info --enable-debug_gdb --enable-gtk2 --disable-unicode --prefix=/usr/local/wxWidgets-cvs && make clean && make && sudo make install

compiled aMule with:

./autogen.sh && ./configure --enable-debug --disable-optimize --enable-verbose--enable-webserver --enable-webservergui --enable-amulecmd --enable-amulecmdgui --enable-ccache --with-wx-config=/usr/local/wxWidgets-cvs/bin/wx-config && make

and I run amule like this:
LD_LIBRARY_PATH=/usr/local/wxWidgets-cvs/lib/ src/amule &

Cheers!
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: backtrace failed.
« Reply #6 on: January 07, 2005, 06:41:04 PM »

wxBase is not needed when you use wxGTK 2.5.3. Since you will compile your own libraries, I thinkyou should try it.

Regards.
Logged

wRabbit

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 20
Re: backtrace failed.
« Reply #7 on: January 09, 2005, 12:53:08 PM »

Compiled amule again with wxGTK 2.5.3 (nice) and the parameters from phoenix, this results in a more meaningful error but leaves me confused is it an X error? Can't find gdk_x_error in the source files from amule or wxGTK...

The program 'amule' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadRequest (invalid request code or no such operation)'.
  (Details: serial 195893379 error_code 1 request_code 0 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Anyway, I am trying the following in GDB, dunno if it helps:

(gdb) break gdk_x_error
Function "gdk_x_error" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (gdk_x_error) pending.
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: backtrace failed.
« Reply #8 on: January 09, 2005, 03:13:38 PM »

wRabbit,

That wil not work unless you have gdk compiled with debug information.

Well, beeing an X error, it is most likely a wxGTK problem, because there is no X programming inside aMule. So, check to see if the wxGTK you are using is *really* the one you want to use, i.e., look at other places and see if you don't have an old installation interfering. One easy way to be sure is to run aMule with the line
$ LD_LIBRARY_PATH=/usr/local/wxWidgets-cvs/lib/ src/amule &

Where LD_LIBRARY_PATH points to the right place. Inside gdb, you will have to
(gdb) set env LD_LIBRARY_PATH /usr/local/wxWidgets-cvs/lib/

If in doubt, don't hesitate to ask.

Cheers!
Logged