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

Group
 
 

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

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

Add a New Comment Rich Markup
   

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

Duplicate of bug #29719

Gregory John Casamento <gcasa>
Group 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>
Group 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]
GormNSWindow
(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:
   
   
Comment:
   

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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-01 gcasa StatusDuplicate Wont Fix
        Open/ClosedOpen Declined
    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.13-f8d8.
    Corresponding source code