bugGNUstep - Bugs: bug #34454, gnustep fails to load real world...

 
 

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

bug #34454: gnustep fails to load real world XIB files

Submitted by:  julian <julian_>
Submitted on:  Sat 01 Oct 2011 08:59:43 PM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Fred Kiefer <FredKiefer>
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Tue 01 Nov 2011 07:46:57 PM UTC, comment #15:

great, thanks

julian <julian_>
Tue 01 Nov 2011 07:15:33 PM UTC, comment #14:

I added a fix that gives out a warning about missing images and sounds and loads some default files instead.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Mon 03 Oct 2011 11:23:23 PM UTC, comment #13:

ok i can confirm the initial bug is fixed, thanks very much. i will file additional bugs for additional issues as needed.

>Maybe we could try to replace non-existing image by a broken image symbol?


thanks for your explanation. yes please. the actual error message (something about setting nil value in a dictionary) didn't suggest to me that a referenced image was missing.
cocoa ignores missing images, i.e. transparent, and logs a error with the image name, i think this is the behavior that should be adopted here too.

i'm filing a new bug about the visible at launch thing now.

julian <julian_>
Mon 03 Oct 2011 09:42:47 PM UTC, comment #12:

To find out which custom resource is missing is rather simple.
You get the report that the object with id "232630206" could not be generated. Open up the XIB file and search for that id. You will find:

<object class="NSCustomResource" key="NSContents" id="232630206">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">black_vertical</string>
</object>

This means no NSImage file with the name "black_vertical" could be found while loading the XIB file.

This NSImage is of course not in the XIB file itself, but referenced from it by name. And this reference could not be resolved. Maybe we could try to replace non-existing image by a broken image symbol?

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Mon 03 Oct 2011 09:23:22 PM UTC, comment #11:

>I added a forward declaration for NSNibBindingConnector


thanks

> is caused by an unresolved an unresolved custom resource.
>If I remember correctly from my test it was an NSImage or was it that QTMovieView object?


sorry, the Launcher.xib contained a reference to QTMovieView - forget that file.
the file i am trying to get to work is Launcher-gnustep.xib - no QTMovieViews in that one.
how can i find out what the unresolved resource is? how could an NSImage be in the XIB? ;)

>It would be great to open a new bug report for the "visible at launch" issue


will do!

>And it would be even better if you could give me a hint where to look for this flag in the XIB file.


will do some tests with IB to find out.

julian <julian_>
Mon 03 Oct 2011 09:11:46 PM UTC, comment #10:

I added a forward declaration for NSNibBindingConnector to the header file, this should fix the compilation issue in Gorm.

The problem you are getting from your main NIB file is caused by an unresolved custom resource. If I remember correctly from my test it was an NSImage or was it that QTMovieView object?

It would be great to open a new bug report for the "visible at launch" issue, as this bug report is about to be closed and we don't want to loose track of this new issue. And it would be even better if you could give me a hint where to look for this flag in the XIB file. The only place where I did see something like this is in the flattenedProperties section and I still have no idea how to deal with that.
If you look at line 547 of GSXibLoader.m you will notice that I had to comment out the isVisible check for windows. We need some sort of replacement here. Maybe the class NSWindowTemplate could use this flag in its -nibInstantiate method?

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Mon 03 Oct 2011 07:22:09 PM UTC, comment #9:

on a related note, the "visible at launch" property of windows seems to be ignored when loading XIBs, and the windows are ALWAYS visible.

julian <julian_>
Mon 03 Oct 2011 05:26:06 PM UTC, comment #8:

to clarify, thanks the "minimal" XIB loads fine now, the file still having problems is from the inital post, Archiv.zip => Launcher-gnustep.xib

julian <julian_>
Mon 03 Oct 2011 05:15:51 PM UTC, comment #7:

ok thanks very much.

i've updated everything and rebuilt base,gui and back. these problems remain:

i can't rebuild gorm because of error [1]

the XIB file still doesn't load because of another error [2]

[1]
Compiling file GormXibPlugin.m ...
In file included from GormXibPlugin.m:26:
In file included from ./GormXibWrapperLoader.h:29:
/extradisk/gnustep/Local/Library/Headers/GNUstepGUI/GSXibLoading.h:89:3: error: unknown type name 'NSNibBindingConnector'; did you
mean 'NSNibControlConnector'?
NSNibBindingConnector *connector;
^~~~~~~~~~~~~~~~~~~~~
NSNibControlConnector
/extradisk/gnustep/Local/Library/Headers/AppKit/NSNibConnector.h:53:1: note: 'NSNibControlConnector' declared here
@interface NSNibControlConnector : NSNibConnector
^
1 error generated.

[2]
2011-10-03 19:06:33.293 CoreBreach[16715] Exception occured while loading model: Tried to add nil value for key '232630206' to dictionary

julian <julian_>
Mon 03 Oct 2011 01:33:30 PM UTC, comment #6:

I think I fixed most of the issues found by your test XIB files.
The main problem was that when I introduced the decoding of references I did not add a test whether an object had already been decoded. It could happen that the reference was decoded before the real object and then the object would be decoded a second time, resulting in duplicated objects. Per chance your test XIB files stumbled over this issue as the same view would be used twice as the subview of each of the duplicated objects. Luckily we had the assert in place to detect this problem.

I also added the decoding of IBBindingConnection and fixed an issue with keyed coding in NSData. The last means that you will have to update base as well.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Sun 02 Oct 2011 10:14:27 PM UTC, comment #5:

Thank you for reporting this. I was able to confirm the problem with your shorter XIB file. When removing this assertion the file loads a lot further (failing on a different problem that should be easy to fix). But I am still trying to understand why the super view is already set when the subview is added to the tab view. It looks like this is set to a different NSTabView. Maybe the decoder produces two objects for the same XIB element?

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Sun 02 Oct 2011 11:23:25 AM UTC, comment #4:

i think i have been able to create a minimal XIB that still exhibits the problem. strangely it doesn't trigger this assert anymore when trying to load it in gorm, but i think its still there when loading the nib in my app.

(file #24078)

julian <julian_>
Sun 02 Oct 2011 10:47:14 AM UTC, comment #3:

must be this assert triggering

NSAssert([sub superview] == nil,
NSInternalInconsistencyException);

julian <julian_>
Sun 02 Oct 2011 10:00:39 AM UTC, comment #2:

i tried for Launcher-gnustep.xib, the error is the same when loading it in-app:

NSView.m4701 Assertion failed in NSTabView(instance), method initWithCoder:. NSInternalInconsistencyException

julian <julian_>
Sun 02 Oct 2011 01:35:43 AM UTC, comment #1:

Did you try loading this in the actual application it belongs to? XIB support in Gorm doesn't work currently since the plugin is not complete.

GC

Gregory John Casamento <gcasa>
Project Administrator
Sat 01 Oct 2011 08:59:43 PM UTC, original submission:

attached is an archive with 3 XIB files that all fail to load with gnustep or gorm (all SVN) with different errors each.

i'd also need workarounds for the problems, since i probably won't have the time to wait for the fixes.

julian <julian_>

 

Attached Files
file #24078:  Launcher-gnustep-bug.zip added by julian_ (9KiB - application/zip)
file #24072:  Archiv.zip added by julian_ (143KiB - application/zip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by FredKiefer (Posted a comment)
  • -unavailable- added by gcasa (Posted a comment)
  • -unavailable- added by julian_ (Voted in favor of this item)
  • -unavailable- added by julian_ (Submitted the item)
  •  

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

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 01 Nov 2011 07:15:33 PM UTCFredKieferStatusReady For Test=>Fixed
      Open/ClosedIn Test=>Closed
    Mon 03 Oct 2011 01:33:30 PM UTCFredKieferStatusConfirmed=>Ready For Test
      Open/ClosedOpen=>In Test
    Sun 02 Oct 2011 10:14:27 PM UTCFredKieferStatusNone=>Confirmed
      Assigned toNone=>FredKiefer
    Sun 02 Oct 2011 11:23:25 AM UTCjulian_Attached File-=>Added Launcher-gnustep-bug.zip, #24078
    Sat 01 Oct 2011 09:00:01 PM UTCjulian_Carbon-Copy-=>Added julian_
    Sat 01 Oct 2011 08:59:43 PM UTCjulian_Attached File-=>Added Archiv.zip, #24072

    Back to the top


    Powered by Savane 3.1-cleanup1