gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Release critical bug in NSToolbarItem


From: Fred Kiefer
Subject: Re: Release critical bug in NSToolbarItem
Date: Sun, 09 Mar 2008 16:28:04 +0100
User-agent: Thunderbird 2.0.0.9 (X11/20070801)

Putting it into the bug tracker wont help as long as nobody takes up the
task to solve the issue :-)
Which is what I did myself already. I provided a workaround in the
toolbar code right after reporting the issue. What I wanted to prevent
was Adam doing a release with this problem not addressed.
In general you are of course correct, we should put all the issues we
find in the bug tracker, even if we are the ones o work on them later. I
already have taken up this habit for all more complex issues.

My solution is currently only a hack. This is due to my missing
understanding of the NSToolbar related code. To me it is even unclear,
why there is GSToolbar and NSToolbar. As for GSToolbarButton, I have the
impression that this class uses an ivar to store the action, instead of
passing it to the cell as would be the normal case, because of the
recursion to bumped into. With that properly resolved it looks like we
could clean up more of the NSToolbar cluster. But is my hack a proper
solution? I am not sure. While investigating the code I found a second
recursion, also stopped by my patch.
To me this looks like the tasks are not clearly separated between the
different components. But then I am not sure, there may be some code out
there, that relies on any of the strange looking features here. Perhaps
Quentin is able to shed some light here. I was hoping for him to reply
to my mail. Perhaps I need to integrate his changes to NSOutlineView
first :-)

Cheers,
Fred

Gregory John Casamento wrote:
> Fred,
> 
> Please go ahead and put this into the bug tracking system.   I'm working on 
> Gorm some today, so I suspect I'll bump into this once I update a little 
> later on.  I might take a look at it and pull in Quentin if I can.
>  
> Gregory Casamento -- Principal Consultant - OLC, Inc 
> # GNUstep Chief Maintainer
> 
> ----- Original Message ----
> From: Fred Kiefer <address@hidden>
> To: GNUstep Developer <address@hidden>
> Sent: Saturday, March 8, 2008 5:09:15 AM
> Subject: Release critical bug in NSToolbarItem
> 
> I just found a critical bug that needs to be fixed before we do a new
> gui release. Not sure if this warning is needed, but sometimes Adam is
> really quick with new releases :-)
> 
> The problem gets triggered by a patch I recently made to NSCell. Now the
> control sendAction:to: methods gets called even when there is no action
> set. This was needed for KVB compatibility with Apple and in itself this
> is not the problem it just reveals a longer standing issue.
> In NSToolbar we now get the following loop:
> 
> #6  0xb7b975f7 in -[NSCell performClickWithFrame:inView:] (
>     self=0x8886070, _cmd=0xb7daa9a0, cellFrame=
>         {origin = {x = 0, y = 0}, size = {width = 61, height = 61}},
>     controlView=0x88854e8) at NSCell.m:1399
> #7  0xb7b91553 in -[NSButtonCell performClickWithFrame:inView:] (
>     self=0x8886070, _cmd=0xb7dbca00, cellFrame=
>         {origin = {x = 0, y = 0}, size = {width = 61, height = 61}},
>     controlView=0x88854e8) at NSButtonCell.m:1486
> #8  0xb7bc179a in -[NSControl performClick:] (self=0x88854e8,
>     _cmd=0xb7e25240, sender=0x8593da8) at NSControl.m:811
> #9  0xb7cc7dc5 in -[NSToolbarItem _setSelected:] (self=0x8593da8,
>     _cmd=0xb7e5c438, selected=1 '\001') at NSToolbarItem.m:1471
> #10 0xb7d620a9 in -[GSToolbar setSelectedItemIdentifier:] (
>     self=0x8881930, _cmd=0xb7e24f98, itemIdentifier=0xb7f59a58)
>     at GSToolbar.m:845
> #11 0xb7cc2fdd in -[GSToolbarButton sendAction:to:] (self=0x88854e8,
>     _cmd=0xb7daea20, action=0x0, target=0x85dfb40) at NSToolbarItem.m:363
> #12 0xb7b97719 in -[NSCell performClickWithFrame:inView:] (
>     self=0x8886070, _cmd=0xb7daa9a0, cellFrame=
>         {origin = {x = 0, y = 0}, size = {width = 61, height = 61}},
>     controlView=0x88854e8) at NSCell.m:1407
> #13 0xb7b91553 in -[NSButtonCell performClickWithFrame:inView:] (
>     self=0x8886070, _cmd=0xb7dbca00, cellFrame=
>         {origin = {x = 0, y = 0}, size = {width = 61, height = 61}},
> 
> This didn't happen before as most toolbar items don't have an action
> set, so this path wasn't reached. What wee need to do now is to break
> this loop. I suspect that we should not be calling performClick: in the
> _setSelected: method on NSToolbarItem, but then I am not familiar with
> that code and don't know where the performClick: call really belongs.
> 
> Is there anybody out there with more knowledge on NSToolbar willing to help?
> 
> 
> _______________________________________________
> Gnustep-dev mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnustep-dev
> 
> 
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]