discuss-gnustep
[Top][All Lists]
Advanced

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

[BUG] Gorm.app Segmentation Fault Error


From: NeXT
Subject: [BUG] Gorm.app Segmentation Fault Error
Date: Sun, 09 Nov 2003 00:26:05 +0900

Hi,

Gorm died with segmentation fault, when I;

1. Document->New Application...
2. Select Classes in document(?) window
3. Select NSObject and Classes->Create Subclass...
4. Rename NewClass to Controller
5. Press plug like button to prepare adding outlet
6. Classes->Add Outlet/Action
7. Rename newOutlet to inputCurrencyField and [Enter]
8. Classes->Add Outlet/Action
9. Rename newOutlet to currencyRateField and [Enter]
10. Kaboom!!!

Doing some debugging shows me following info:
Program received signal SIGSEGV, Segmentation fault.
0x406330d5 in objc_msg_lookup (receiver=0x85736f8, op=0x4057e148)
    at sendmsg.c:193
193 result = sarray_get_safe (receiver->class_pointer->dtable,
Current language:  auto; currently c

And following backtrace:
#0  0x406330d5 in objc_msg_lookup (receiver=0x85736f8, op=0x4057e148)
    at sendmsg.c:193
#1 0x403fa510 in rangeOfCharacter_c (self=0x82179a0, aSet=0x85736f8, mask=0,
    aRange={location = 0, length = 17}) at GSString.m:1636
#2  0x403f128d in -[GSCString rangeOfCharacterFromSet:options:range:] (
    self=0x82179a0, _cmd=0x405a00e0, aSet=0x85736f8, mask=0, aRange=
      {location = 0, length = 17}) at GSString.m:2130
#3  0x404afd22 in -[NSString rangeOfCharacterFromSet:] (self=0x82179a0,
    _cmd=0x80f29b8, aSet=0x85736f8) at NSString.m:1586
#4  0x08065741 in -[GormDocument _identifierString:] (self=0x84bb848,
    _cmd=0x80f2a10, str=0x82179a0) at GormDocument.m:3053
#5  0x080659cf in -[GormDocument _formatOutlet:] (self=0x84bb848,
    _cmd=0x80f2cf8, outlet=0x82179a0) at GormDocument.m:3082
#6 0x08067049 in -[GormDocument outlineView:setObjectValue:forTableColumn:byItem:] (self=0x84bb848, _cmd=0x40318878, anOutlineView=0x84b3a40,
    anObject=0x82179a0, aTableColumn=0x84f3f58, item=0x848d6e0)
    at GormDocument.m:3311
#7 0x4017e93b in -[NSOutlineView _setObjectValue:forTableColumn:row:] ( self=0x84b3a40, _cmd=0x4032f318, value=0x82179a0, tb=0x84f3f58, index=13)
    at NSOutlineView.m:1277
#8  0x401eace6 in -[NSTableView validateEditing] (self=0x84b3a40,
    _cmd=0x4032fa28) at NSTableView.m:3980
#9  0x401f0f58 in -[NSTableView textDidEndEditing:] (self=0x84b3a40,
    _cmd=0x40344f18, aNotification=0x822fb10) at NSTableView.m:5640
...

I found that the "illegal" and "numeric" in _identifierString: of GormDocument.m is responsible for this. First time they created and run correctly and next time they are released (and marked class_pointer as 0xdeadface) but the object pointer itself is not nil and make segmentation fault in rangeOfCharact... method. Easy fix is make static variables "illegal" and "numeric" as non static and create everytime.(But this is less efficient and because of this original code use static variables, right? For me static global variable or retained static
variable is more efficient solution, but... :-)

Hope this info. can help and thanks in advance.





reply via email to

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