|
From: | Fred Kiefer |
Subject: | Re: crash in FlexiSheet |
Date: | Tue, 07 Feb 2012 09:59:38 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0 |
On 07.02.2012 00:40, Riccardo Mottola wrote:
Hi,Is datasrc nil? Could be the message-returning-struct sent to nil bug.Thank you. a as a quick test, I exit the method directly if datasrc is nil and I get no creash anymore. At a first sight, it might be reasonable to skip the whole method resetCursorRect. What do you think?
Adding that test in the FlexiSheet code is definitely an improvement and not just in this method, as it saves you a lot of nonsensical computation. The other side is that this is a bug in gcc 4.6 and it is a regression. Returning a structure from a method call to nil used to work, it was broken only on sparc, which is why in GNUstep code we always add a test for nil in that case. (And we do so mostly for you :-)
You should write a bug report to gcc and let us hope that this gets fixed for the 4.7 release. And we need them to integrate a test for this case as well. On a quick glance I found a test case called nil-method-1.m but nothing there deals with structure being returned.
Fred
[Prev in Thread] | Current Thread | [Next in Thread] |