bugGNUstep - Bugs: bug #49424, [NSMiniWindowView setImage]...

Group
 
 

bug #49424: [NSMiniWindowView setImage] crashes with nil as image parameter

Submitter:  Benjamin Riefenstahl <cc_benny>
Submitted:  Sun 23 Oct 2016 07:09:55 PM UTC
   
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  FredKiefer
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 02 Nov 2016 06:47:30 PM UTC, comment #3: 


> NSInternalInconsistencyException: NSApp's run called recursively".


Looks like that was an incomplete recompile.  It works now with the SVN version.  Thank you.

Benjamin Riefenstahl <cc_benny>
Mon 24 Oct 2016 08:18:31 PM UTC, comment #2: 

I just applied your fix to 0.24, the current on the Debian jessie where I am testing.  This fixes the problem, thank you.

I also tried building a current GNUstep and build/link against that, but on start I get a message box, saying  "NSInternalInconsistencyException: NSApp's run called recursively".  Is that a known symptom?  Where to I set breakpoint to catch this in a gdb?

> On most architectures this gets handled correctly by the
> Objective-C runtime but it may cause a segmentation fault
> on Sparc and other special hardware


This is on i686, so not really exotic ;-).  When I replicate the code in question in a simple test program, I can not reproduce the problem.  I'm attaching some gdb output from the original crash, in case that helps.

> runtime-test


We link against a specific version of the libs anyway, so we can just use compile-time checks bad on GNUSTEP_GUI_MAJOR_VERSION and GNUSTEP_GUI_MINOR_VERSION.  I see that this is already done in another place.


(file #38803)

Benjamin Riefenstahl <cc_benny>
Sun 23 Oct 2016 09:04:46 PM UTC, comment #1: 

I just applied a tiny patch that should fix this issue. You should try this code with the SVN version of GNUstep. The problem you did get was with a method that returns a structure being sen to a nil object. On most architectures this gets handled correctly by the Objective-C runtime but it may cause a segmentation fault on Sparc and other special hardware.

This change will be included in the next release of GNustep gui. I don't know when this will happen but the version will be 0.26. This should be visible in the library version but I am not aware of any runtime check for it. For historical reasons base and gui are no Frameworks and this makes reporting a version number harder.

Fred Kiefer <FredKiefer>
Group Member
Sun 23 Oct 2016 07:09:55 PM UTC, original submission:  

Current GNUStep builds of Emacs sometimes crash when minimizing, because they set the miniImage to nil.  According to comments in the Emacs code, nil is supoosed to trigger some default handling on Mac OS X.  On GNUStep though, [NSMiniWindowView setImage] calls [imgCopy size] in NSWindow.m line 578, which crashes if imgCopy is nil.

Please advise if this is should rather be fixed/worked-around in Emacs.  Also, if this is going to be fixed in GNUStep, can you think of some runtime-test for this, so that Emacs does not have to disable that feature on GNUStep generally, while the bug is out there in the OS distributions?

Benjamin Riefenstahl <cc_benny>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #38803:  test-emacs-iconify.gdb added by cc_benny (1KiB - application/octet-stream)

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-18 FredKiefer StatusReady For Test Fixed
        Open/ClosedIn Test Closed
    2016-10-24 cc_benny Attached File- Added test-emacs-iconify.gdb, #38803
    2016-10-23 FredKiefer StatusNone Ready For Test
        Assigned toNone FredKiefer
        Open/ClosedOpen In Test

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code