discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mixing X and GNUstep


From: Raffael Herzog
Subject: Re: Mixing X and GNUstep
Date: Sat, 12 Jul 2003 19:34:56 +0200

Hi,

I've got more information, now... I recompiled all the GNUstep stuff with "debug=yes" and analyzed the segfault a bit more.

I changed +isDocumentBasedApplication: of NSDocumentController as follows:

 + (BOOL) isDocumentBasedApplication
 {
     NSBundle *bundle = [NSBundle mainBundle];
     NSLog([NSString stringWithFormat: @"Got bundle: 0x%08lx", bundle]);
     NSDictionary *dict = [bundle infoDictionary];
     NSLog([NSString stringWithFormat: @"Got dictionary: 0x%08lx", dict]);
     id obj = [dict objectForKey: NSTypesKey];
NSLog([NSString stringWithFormat: @"Got object for NSTypesKey: 0x%08lx", obj]);
     if ( obj ) {
         NSLog(@"Document based");
         return YES;
     }
     else {
         NSLog(@"NOT document based");
         return NO;
     }
 //  return ([[[NSBundle mainBundle] infoDictionary] objectForKey: NSTypesKey])
 //     ? YES : NO;
 }

And here's the output:

 [...]
 2003-07-12 19:14:42.597 GSXine[25301] NOT document based
 2003-07-12 19:14:42.600 GSXine[25301] Got bundle: 0x0810c240
 2003-07-12 19:14:42.609 GSXine[25301] Got dictionary: 0x08188138
 2003-07-12 19:14:42.612 GSXine[25301] Got object for NSTypesKey: 0x00000000
 2003-07-12 19:14:42.616 GSXine[25301] NOT document based
 2003-07-12 19:14:42.634 GSXine[25301] Received an untrapped event 94
 2003-07-12 19:14:42.645 GSXine[25301] Got bundle: 0x0810c240
 Speicherzugriffsfehler (core dumped)

This means, that it's the the call of -infoDictionary that makes the application crash. Reproduced many times, it's always the same thing, so it doesn't seem to be anything that happens randomly.

The backtrace with line numbers:

#0 0x4064acaf in objc_msg_lookup (receiver=0x810c0e0, op=0x403bf5e8) at sendmsg.c:177 #1 0x4021cecb in +[NSDocumentController isDocumentBasedApplication] (self=0x403bf540, _cmd=0x403aa608)
     at NSDocumentController.m:136
#2 0x401cbfe1 in -[NSApplication targetForAction:] (self=0x81719c8, _cmd=0x403ce6a0, aSelector=0x804b270)
     at NSApplication.m:1640
#3 0x402584dd in -[NSMenu update] (self=0x8335338, _cmd=0x403ce688) at NSMenu.m:775 #4 0x40258437 in -[NSMenu update] (self=0x83939b8, _cmd=0x403aa290) at NSMenu.m:760 #5 0x401ca3d0 in -[NSApplication run] (self=0x81719c8, _cmd=0x403a83b0) at NSApplication.m:1075 #6 0x401c1913 in NSApplicationMain (argc=1, argv=0xbffff184) at Functions.m:72
 #7  0x08048d53 in main (argc=1, argv=0xbffff184) at main.m:9

I'm using gnustep-objc-1.2.3.

 $ gcc --version
 gcc (GCC) 3.2.3 20030415 (Debian prerelease)
 Copyright (C) 2002 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 $

Hmmm... I've just seen: "Debian prerelease"...
                               ^^^^^^^^^^

cu,
  Raffi

--
 The difference between theory and practice is that in theory, there is
                no difference, but in practice, there is.

Raffael Herzog - address@hidden - http://www.raffael.ch - ICQ #67961355





reply via email to

[Prev in Thread] Current Thread [Next in Thread]