bugGNUstep - Bugs: bug #22282, Nib reading problem with custom...

Group
 
 

bug #22282: Nib reading problem with custom views instantiated in Objects pane

Submitter:  Quentin Mathé <qmathe>
Submitted:  Sun 10 Feb 2008 07:15:31 PM UTC
   
 
Category:  Gorm Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  gcasa
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 24 Jul 2010 11:26:20 AM UTC, comment #8: 

The bug is fixed.

Quentin Mathé <qmathe>
Group Member
Fri 18 Jun 2010 02:41:39 PM UTC, comment #7: 

Is this bug still valid?

Riccardo Mottola <rmottola>
Group Member
Fri 05 Dec 2008 11:37:15 AM UTC, comment #6: 

ok.
However I don't understand why TablePrototype.nib works well for Gregory (see his screenshot) and not for me. May be something has been changed in -gui beyond r27200 recently to handle images with a zero size?

Quentin Mathé <qmathe>
Group Member
Thu 04 Dec 2008 11:21:18 PM UTC, comment #5: 

The back trace you get is unrelated to the backend, it is caused by a hack in put into gui to better support image drawing on scaled views. In your specific case the image seems to have a zero sized extend and we should just ignore the draw operation. As this has nothing to do with nib loading I think this bug report may stay closed.

Fred Kiefer <FredKiefer>
Group Member
Thu 04 Dec 2008 05:45:06 PM UTC, comment #4: 

base, gui, back (cairo) and Gorm r27200.

The problem seems to be fixed now, except in one case: TablePrototype.nib. May be that's because I'm using Cairo backend... Here is the stack trace, looks like it crashes because of the custom image cell in the first column:

#0  -[NSException raise] (self=0x8579920, _cmd=0xb79b8060) at NSException.m:831
#1  0xb7777547 in +[NSException raise:format:arguments:] (self=0xb79b7e40,
    _cmd=0xb79b8048, name=0xb79b7bd0, format=0xb7d1b2d4,
    argList=0xbf88901c ",\231з��s\bT\220\210�l\202l���s\b�ao\bȲѷ�\017|�")
    at NSException.m:781
#2  0xb777747f in +[NSException raise:format:] (self=0xb79b7e40, _cmd=0xb7d1b998,
    name=0xb79b7bd0, format=0xb7d1b2d4) at NSException.m:767
#3  0xb7ae327d in -[NSBitmapImageRep initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:] (self=0x864a3c8, _cmd=0xb7d1b990, planes=0xbf8890e4, width=0,
    height=0, bps=8, spp=4, alpha=1 '\001', isPlanar=0 '\000',
    colorSpaceName=0xb7dba530, bitmapFormat=0, rowBytes=0, pixelBits=0)
    at NSBitmapImageRep.m:503
#4  0xb7ae3144 in -[NSBitmapImageRep initWithFocusedViewRect:] (self=0x864a3c8,
    _cmd=0xb7d261f8, rect=
        {origin = {x = 0, y = 0}, size = {width = 0, height = 0}})
    at NSBitmapImageRep.m:377
#5  0xb7b0734a in -[NSCachedImageRep draw] (self=0x86802a0, _cmd=0xb7d53c48)
    at NSCachedImageRep.m:198
#6  0xb7b7837e in -[NSImageRep drawAtPoint:] (self=0x86802a0, _cmd=0xb7d519d8,
    aPoint={x = 0, y = 0}) at NSImageRep.m:462
#7  0xb7b70ac6 in -[NSImage drawRepresentation:inRect:] (self=0x8680178,
    _cmd=0xb7d51970, imageRep=0x86802a0, aRect=
        {origin = {x = 0, y = 0}, size = {width = 17, height = 17}})
---Type <return> to continue, or q <return> to quit---
    at NSImage.m:945
#8  0xb7b71950 in -[NSImage drawInRect:fromRect:operation:fraction:] (
    self=0x8680178, _cmd=0xb7d52600, dstRect=
        {origin = {x = 12.5, y = 16}, size = {width = 15, height = -15}}, srcRect=
        {origin = {x = 0, y = 0}, size = {width = 17, height = 17}},
    op=NSCompositeSourceOver, delta=1) at NSImage.m:1127
#9  0xb7b75f71 in -[NSImageCell drawInteriorWithFrame:inView:] (self=0x8680120,
    _cmd=0xb7d29158, cellFrame=
        {origin = {x = 1.5, y = 1}, size = {width = 37, height = 15}},
    controlView=0x867f5e8) at NSImageCell.m:282
#10 0xb7b0cc31 in -[NSCell drawWithFrame:inView:] (self=0x8680120,
    _cmd=0xb7d97650, cellFrame=
        {origin = {x = 1.5, y = 1}, size = {width = 37, height = 15}},
    controlView=0x867f5e8) at NSCell.m:1989
#11 0xb7c23d10 in -[NSTableView drawRow:clipRect:] (self=0x867f5e8,
    _cmd=0xb7d97680, rowIndex=0, clipRect=
        {origin = {x = 0, y = 0}, size = {width = 477, height = 260}})
    at NSTableView.m:4972
#12 0xb7c24f89 in -[NSTableView drawRect:] (self=0x867f5e8, _cmd=0xb7da66d0, aRect=
        {origin = {x = 0, y = 0}, size = {width = 477, height = 260}})
    at NSTableView.m:5191
#13 0xb7c4883f in -[NSView displayRectIgnoringOpacity:inContext:] (self=0x867f5e8,
    _cmd=0xb7da66c0, aRect=
        {origin = {x = 0, y = 0}, size = {width = 477, height = 260}},
---Type <return> to continue, or q <return> to quit---
    context=0x8573a50) at NSView.m:2407
#14 0xb7c48aa9 in -[NSView displayRectIgnoringOpacity:inContext:] (self=0x867f418,
    _cmd=0xb7da66c0, aRect=
        {origin = {x = 0, y = 0}, size = {width = 477, height = 260}},
    context=0x8573a50) at NSView.m:2440
#15 0xb7c48aa9 in -[NSView displayRectIgnoringOpacity:inContext:] (self=0x867f220,
    _cmd=0xb7da66c0, aRect=
        {origin = {x = 0, y = 0}, size = {width = 500, height = 300}},
    context=0x8573a50) at NSView.m:2440
#16 0xb7c48aa9 in -[NSView displayRectIgnoringOpacity:inContext:] (self=0x867f010,
    _cmd=0xb7da66c0, aRect=
        {origin = {x = 14, y = 14}, size = {width = 500, height = 311}},
    context=0x8573a50) at NSView.m:2440
#17 0xb7c48aa9 in -[NSView displayRectIgnoringOpacity:inContext:] (self=0x867edc8,
    _cmd=0xb7da66c0, aRect=
        {origin = {x = 16, y = 16}, size = {width = 500, height = 329}},
    context=0x8573a50) at NSView.m:2440
#18 0xb7c48aa9 in -[NSView displayRectIgnoringOpacity:inContext:] (self=0x8685500,
    _cmd=0xb7da66c0, aRect=
        {origin = {x = 0, y = 0}, size = {width = 500, height = 351}},
    context=0x8573a50) at NSView.m:2440
#19 0xb7c48aa9 in -[NSView displayRectIgnoringOpacity:inContext:] (self=0x858aa68,
    _cmd=0xb7da66c0, aRect=
        {origin = {x = 10, y = 20}, size = {width = 500, height = 351}},
---Type <return> to continue, or q <return> to quit---
    context=0x8573a50) at NSView.m:2440
#20 0xb7c48aa9 in -[NSView displayRectIgnoringOpacity:inContext:] (self=0x85e5da0,
    _cmd=0xb7da66c0, aRect=
        {origin = {x = 0, y = 0}, size = {width = 510, height = 371}},
    context=0x8573a50) at NSView.m:2440
#21 0xb7c48aa9 in -[NSView displayRectIgnoringOpacity:inContext:] (self=0x87d9560,
    _cmd=0xb7da66c0, aRect=
        {origin = {x = 0, y = 0}, size = {width = 520, height = 400}},
    context=0x8573a50) at NSView.m:2440
#22 0xb7c48519 in -[NSView displayRectIgnoringOpacity:] (self=0x87d9560,
    _cmd=0xb7da66b0, aRect=
        {origin = {x = 0, y = 0}, size = {width = 520, height = 400}})
    at NSView.m:2353
#23 0xb7c48121 in -[NSView displayIfNeededInRectIgnoringOpacity:] (self=0x87d9560,
    _cmd=0xb7da66a0, aRect=
        {origin = {x = 0, y = 0}, size = {width = 520, height = 400}})
    at NSView.m:2285
#24 0xb7c47f99 in -[NSView displayIfNeededInRect:] (self=0x87d9560,
    _cmd=0xb7da6698, aRect=
        {origin = {x = 0, y = 0}, size = {width = 520, height = 400}})
    at NSView.m:2263
#25 0xb7c47e57 in -[NSView displayIfNeeded] (self=0x87d9560, _cmd=0xb7dad1b8)
    at NSView.m:2245
#26 0xb7c5955f in -[NSWindow orderWindow:relativeTo:] (self=0x85eaf98,
---Type <return> to continue, or q <return> to quit---
    _cmd=0xb7dad188, place=NSWindowAbove, otherWin=0) at NSWindow.m:1692
#27 0xb7c5924c in -[NSWindow orderFront:] (self=0x85eaf98, _cmd=0xb7ef6e28,
    sender=0x858aa68) at NSWindow.m:1603
#28 0xb7ea85a9 in -[GormViewWindow orderFront:] (self=0x85eaf98, _cmd=0xb7ef3e80,
    sender=0x858aa68) at GormViewWindow.m:200
#29 0xb7ea234c in -[GormViewEditor orderFront] (self=0x858aa68, _cmd=0xb7ee1558)
    at GormViewEditor.m:1402
#30 0xb7e8242d in -[GormObjectEditor raiseSelection:] (self=0x8687360,
    _cmd=0xb7ee1438, sender=0x8687360) at GormObjectEditor.m:559
#31 0xb72474e3 in ffi_call_SYSV () from /usr/lib/libffi.so.4
#32 0xb724731a in ffi_call () from /usr/lib/libffi.so.4
#33 0xb7874ff5 in GSFFIInvokeWithTargetAndImp (_inv=0x85ea2e8, anObject=0x8687360,
    imp=0xb7e82378 <-[GormObjectEditor raiseSelection:]>) at GSFFIInvocation.m:314
#34 0xb78753b6 in -[GSFFIInvocation invokeWithTarget:] (self=0x85ea2e8,
    _cmd=0xb7d153c8, anObject=0x8687360) at GSFFIInvocation.m:384

#35 0xb7ace7f3 in -[NSApplication sendAction:to:from:] (self=0x81442c8,
    _cmd=0xb7d371f0, aSelector=0xb7ee1438, aTarget=0x8687360, sender=0x8687360)
    at NSApplication.m:2020
#36 0xb7b34c07 in -[NSControl sendAction:to:] (self=0x8687360, _cmd=0xb7d5d878,
    theAction=0xb7ee1438, theTarget=0x8687360) at NSControl.m:730
#37 0xb7b8de0c in -[NSMatrix sendAction:to:] (self=0x8687360, _cmd=0xb7d5d918,
    theAction=0xb7ee1438, theTarget=0x8687360) at NSMatrix.m:2138
#38 0xb7b8e0d6 in -[NSMatrix sendDoubleAction] (self=0x8687360, _cmd=0xb7d5d9b0)
    at NSMatrix.m:2202
---Type <return> to continue, or q <return> to quit---
#39 0xb7b8ef6b in -[NSMatrix mouseDown:] (self=0x8687360, _cmd=0xb7ed6320,
    theEvent=0x85edef0) at NSMatrix.m:2489
#40 0xb7e6e9be in -[GormGenericEditor mouseDown:] (self=0x8687360,
    _cmd=0xb7ee1540, theEvent=0x85edef0) at GormGenericEditor.m:99
#41 0xb7e81f19 in -[GormObjectEditor mouseDown:] (self=0x8687360, _cmd=0xb7dad5b8,
    theEvent=0x85edef0) at GormObjectEditor.m:487
#42 0xb7c60751 in -[NSWindow sendEvent:] (self=0x86a7af0, _cmd=0xb7d15368,
    theEvent=0x85edef0) at NSWindow.m:3561
#43 0xb7ace1d3 in -[NSApplication sendEvent:] (self=0x81442c8, _cmd=0xb7d152a8,
    theEvent=0x85edef0) at NSApplication.m:1901
#44 0xb7accc11 in -[NSApplication run] (self=0x81442c8, _cmd=0xb7d0a960)
    at NSApplication.m:1403
#45 0xb7aae751 in NSApplicationMain (argc=1, argv=0xbf88a724) at Functions.m:74
#46 0x0804f496 in main (argc=Cannot access memory at address 0x19
) at main.m:30

I tested ten other complex nibs that all open and display fine now. Nice progresses :-). However I cannot edit custom views that appear in the Objects tab with the Inspector, click and double-click seems to have no effect on the window that displays the custom view. May be that's more a feature request than a bug ;-)

I haven't yet tested whether all these nibs are well-editable, savable and usable as Gorm file replacements.

Quentin.


Quentin Mathé <qmathe>
Group Member
Wed 03 Dec 2008 05:19:07 AM UTC, comment #3: 

These nibs appear to load fine in Gorm now.  The dark background is because of a recent change in Gorm, not because of a loading issue.

Please see the attached jpg.

Please try this and let me know if it's working properly.

GC


Gregory John Casamento <gcasa>
Group administrator
Tue 12 Feb 2008 03:02:31 PM UTC, comment #2: 

ok, thanks.

Just a wild guess, but could it be somehow related to the fact a custom view in the Objects pane is initialized with -initWithCoder: unlike custom views located inside a window which are sent -initWithFrame:?

Quentin Mathé <qmathe>
Group Member
Tue 12 Feb 2008 02:39:07 AM UTC, comment #1: 

This is a known issue.  I am currently working on a solution to this.  In some cases it works, in others it doesn't.

Gregory John Casamento <gcasa>
Group administrator
Sun 10 Feb 2008 07:15:31 PM UTC, original submission:  

If I create a nib with IB and I instantiate a custom view by dragging it into the Objects pane, Gorm seems to be unable to read such nib properly. The content of the custom view seems to be not always fully decoded. For example a table view miss its header and corner views. Moreover the content of the custom view is impossible to edit in Gorm, you cannot select the table view or drop a new button taken from the control palette.

The issue can be observed with the following simple nibs that embeds browser, table view and outline view into a custom view instance:
<http://svn.gna.org/viewcvs/etoile/branches/qmathe/Container/English.lproj/TablePrototype.nib/>
<http://svn.gna.org/viewcvs/etoile/branches/qmathe/Container/English.lproj/OutlinePrototype.nib/>
<http://svn.gna.org/viewcvs/etoile/branches/qmathe/Container/English.lproj/BrowserPrototype.nib/>

See attached screenshot to get an idea of the problem with table view.

Quentin.

Quentin Mathé <qmathe>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #16975:  nibs_loading.jpg added by gcasa (318KiB - image/jpeg - Shows nibs loading.)
file #15014:  NibReadingIssues3.png added by qmathe (13KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-24 qmathe Open/ClosedIn Test Closed
    2008-12-03 gcasa Attached File- Added nibs_loading.jpg, #16975
        StatusConfirmed Fixed
        Open/ClosedOpen In Test
    2008-02-12 gcasa StatusNone Confirmed
        Assigned toNone gcasa
    2008-02-10 qmathe Attached File- Added NibReadingIssues3.png, #15014

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code