bugGNUstep - Bugs: bug #31311, saving .nib file from .gorm seems...


bug #31311: saving .nib file from .gorm seems to work, but it does not

Submitted by:  Lucas Schnorr <schnorr>
Submitted on:  Tue 12 Oct 2010 11:44:22 AM UTC
Category:  Gorm Severity:  3 - Normal
Item Group:  Bug Status:  Duplicate
Privacy:  Public Assigned to:  gcasa
Open/Closed:  Open
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Sun 03 Apr 2011 06:39:11 AM UTC, comment #2: 

Duplicate of bug #29719

Gregory John Casamento <gcasa>
Project Administrator
Mon 27 Dec 2010 08:41:10 PM UTC, comment #1: 

The problem here seems to be that Gorm only adds OIDs for the objects referenced in connections. Your active window doesn't seem to be involved in any connection, so it is missing from that list and the addObject: call will fail due to the nil parameter.

The method [NSIBObjectData initWithDocument:] in the file GormNibWrapperBuilder.m should at least add the window and the menu from the GormDocument to the OIDs when they aren't present there already.

Fred Kiefer <FredKiefer>
Project Member
Tue 12 Oct 2010 11:44:22 AM UTC, original submission:  

Using Gorm 1.2.12

I tried to convert a gorm project (one window only) into a .nib directory using "save as" in the menu and selection "Cocoa nib" as file type. It turns out that for a given .gorm file, everything works smoothly after clicking ok, but the .nib file is not created.

I used gdb to track down the reason of such unexpected behavior, and it seems it is coming from the implementation of the method - - (NSArray *) [GormNibWrapperBuilder openItems], implemented in file ./Plugins/Nib/GormNibWrapperBuilder.m:300.

There is a loop using the enumerate:
 while((obj = [en nextObject]) != nil)
      if([obj isVisible])
    NSNumber *windowOid = NSMapGet(oids, obj);
    [openItems addObject: windowOid];

The problem is that NSMapGet returns a nil, causing an exception that is silently catched somewhere when adding the nil pointer to the openItems array. I did not figure out why NSMapGet returned null, but here is what I have with a breakpoint just after the NSMapGet:

Breakpoint 1, -[GormNibWrapperBuilder openItems] (self=0x9bdb10,
    _cmd=0x7fffee7c4500) at GormNibWrapperBuilder.m:315
315   [openItems addObject: windowOid];
(gdb) p windowOid
$2 = (struct NSNumber *) 0x0
(gdb) po [obj class]
(gdb) p [obj isVisible]
$4 = 1 '\001'
(gdb) po oids
<NSConcreteMapTable: 0x8e31a0>

Commenting the line that adds windowOid to openItems
solves the problem, but some functionality is lost
by doing so.

I attached the .gorm file that causes such behavior.

Lucas Schnorr <schnorr>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #21665:  TimeInterval.gorm.tar.gz added by schnorr (4KiB - application/x-gzip)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by gcasa (Updated the item)
  • -email is unavailable- added by schnorr (Submitted the item)
  • -email is unavailable- added by schnorr

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-04-03 gcasa StatusNone => Duplicate
    2010-10-19 gcasa Assigned toNone => gcasa
    2010-10-12 schnorr Attached File- => Added TimeInterval.gorm.tar.gz, #21665
        Carbon-Copy- => Added schnorr

    Back to the top

    Powered by Savane 3.9