bugGNUstep - Bugs: bug #6437, CRITICAL: Segmentation fault when...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #6437: CRITICAL: Segmentation fault when renaming outlet...

Submitted by:  Gregory John Casamento <gcasa>
Submitted on:  Sat 08 Nov 2003 10:28:07 PM UTC  
 
Category: GormSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Gregory John Casamento <gcasa>
Open/Closed: Closed

Sat 08 Nov 2003 10:52:42 PM UTC, comment #1:

Fixed. Made the variables local, non-static for now.

Gregory John Casamento <gcasa>
Project AdministratorIn charge of this item.
Sat 08 Nov 2003 10:28:07 PM UTC, original submission:

Here is the original message sent to the list...
-------------------------------------------------
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.
------------------------------------------------

Will fix this ASAP.

Gregory John Casamento <gcasa>
Project AdministratorIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 08 Nov 2003 10:52:42 PM UTCgcasaStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1