> Bill Pringlemeir wrote:

>>> (gdb) #0  0x403fe971 in kill () from /lib/libc.so.6
>>> #1  0x403fe775 in raise () from /lib/libc.so.6
>>> #2  0x403ffda3 in abort () from /lib/libc.so.6
>>> #3  0x401c3fba in g_logv () from /usr/lib/libglib-1.2.so.0
>>> Cannot access memory at address 0x2

>> If this assert() make no sense to anyone, not doing a full build
>> could be the problem?

On Thu, 10 Jun 2004, [EMAIL PROTECTED] wrote:
 
> What compiler flags do you use?

JCFLAGS are "-O3 -g".  Is O3 too much?  I should probably use just
"-O" as it takes a long time to compile GTKG.  Gcc is version 2.96.

  $ gcc --verbose
  Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/specs
  gcc version 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)

I looked at the code and the prop.c functions are all called through
the gnet and gui variants.  As I was doing a shut down, is it possible
that the "gnet_prop_shutdown()" and "gui_prop_shutdown()" had been
called with the G_FREE_NULL macro setting these to NULL before the
last call to "prop_get_XXXX()"?

What is the assert doing that nukes the stack trace?  I wish I could
print out the call tree that lead to this.  The problem was the same
for the uploads.c file that originally started this thread.  I couldn't
use "bt" from GDB.  I guess the "g_log()" function is unwinding the
stack.  Maybe we could alter this to do a normal log and replace with
a breakpoint instruction when compiling in a debug mode?

Current...

#define g_assert(expr)                  G_STMT_START{           \
     if (!(expr))                                               \
       g_log (G_LOG_DOMAIN,                                     \
              G_LOG_LEVEL_ERROR,                                \
              "file %s: line %d (%s): assertion failed: (%s)",  \
              __FILE__,                                         \
              __LINE__,                                         \
              __PRETTY_FUNCTION__,                              \
              #expr);                   }G_STMT_END

to (according to some compile flag)...

#define gtkg_assert(expr)                       G_STMT_START{   \
     if (!(expr)) {                                             \
       g_log (G_LOG_DOMAIN,                                     \
              G_LOG_LEVEL_WARNING,                              \
              "file %s: line %d (%s): assertion failed: (%s)",  \
              __FILE__,                                         \
              __LINE__,                                         \
              __PRETTY_FUNCTION__,                              \
              #expr);   suspend(); /* BKPT(); */        }}G_STMT_END

Sorry, I don't know what a Linux macro is to include a compiled in a
breakpoint or if GDB would trigger when a task is suspended.  I don't
even know the call...

Regards,
Bill Pringlemeir.



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Gtk-gnutella-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to