Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Closing workbench: catching NPE
Closing workbench: catching NPE [message #108350] Tue, 07 October 2008 06:37 Go to next message
Dmitry Pryadkin is currently offline Dmitry PryadkinFriend
Messages: 146
Registered: July 2009
Senior Member
Hi,

1. I'm catching NPE when the user closes his workbench (file/exit or
x-button).

org.eclipse.ui.internal.menus.WorkbenchMenuService.releaseCo ntributions(WorkbenchMenuService.java:850)
org.eclipse.ui.internal.menus.WorkbenchMenuService.releaseCo ntributions(WorkbenchMenuService.java:856)
org.eclipse.ui.internal.WorkbenchWindow.hardClose(WorkbenchW indow.java:1550)
org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchW indow.java:681)
org.eclipse.ui.internal.WorkbenchWindow.access$0(WorkbenchWi ndow.java:657)
org.eclipse.ui.internal.WorkbenchWindow$2.run(WorkbenchWindo w.java:774)

The full log version is available at http://rafb.net/p/WcV4RU17.html

2. I lurked in WorkbenchMenuService.releaseContributions:

public void releaseContributions(ContributionManager mgr) {

// Recursive remove any contributions from sub-menus
XXX: IContributionItem[] items = mgr.getItems();
for (int i = 0; i < items.length; i++) {
if (items[i] instanceof ContributionManager) {
releaseContributions((ContributionManager) items[i]);
} else if (items[i] instanceof IToolBarContributionItem) {
IToolBarContributionItem tbci = (IToolBarContributionItem) items[i];
releaseContributions((ContributionManager) tbci
..getToolBarManager());
}
}
....
}


XXX: mgr can be null, see ToolBarContributionItem

tbci ToolBarContributionItem (id=636)
chevronMenuManager null
coolItem null
currentHeight 22
currentWidth 406
disposed true
id "functionKeys"
minimumItemsToShow -1
parent CoolBarManager2 (id=591)
toolBarManager null
useChevron true
visible true


I would like to copy this to bugzilla.
Re: Closing workbench: catching NPE [message #108409 is a reply to message #108350] Tue, 07 October 2008 07:29 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 237
Registered: July 2009
Senior Member
Hi Dmitry,

it seems that this is a known bug deep down in the event life cycle of
the workbench itself. There was a bug at Platform/UI about this issue:

173657: [Contributions] Nullpointer Exception in WorkbenchMenuService
https://bugs.eclipse.org/bugs/show_bug.cgi?id=173657

Do you have your own presentation which could cause this?

Greets
Benny

Dmitry Pryadkin wrote:
> Hi,
>
> 1. I'm catching NPE when the user closes his workbench (file/exit or
> x-button).
>
> org.eclipse.ui.internal.menus.WorkbenchMenuService.releaseCo ntributions(WorkbenchMenuService.java:850)
>
> org.eclipse.ui.internal.menus.WorkbenchMenuService.releaseCo ntributions(WorkbenchMenuService.java:856)
>
> org.eclipse.ui.internal.WorkbenchWindow.hardClose(WorkbenchW indow.java:1550)
>
> org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchW indow.java:681)
> org.eclipse.ui.internal.WorkbenchWindow.access$0(WorkbenchWi ndow.java:657)
> org.eclipse.ui.internal.WorkbenchWindow$2.run(WorkbenchWindo w.java:774)
>
> The full log version is available at http://rafb.net/p/WcV4RU17.html
>
> 2. I lurked in WorkbenchMenuService.releaseContributions:
>
> public void releaseContributions(ContributionManager mgr) {
>
> // Recursive remove any contributions from sub-menus
> XXX: IContributionItem[] items = mgr.getItems();
> for (int i = 0; i < items.length; i++) {
> if (items[i] instanceof ContributionManager) {
> releaseContributions((ContributionManager) items[i]);
> } else if (items[i] instanceof IToolBarContributionItem) {
> IToolBarContributionItem tbci = (IToolBarContributionItem) items[i];
> releaseContributions((ContributionManager) tbci
> .getToolBarManager());
> }
> }
> ...
> }
>
>
> XXX: mgr can be null, see ToolBarContributionItem
>
> tbci ToolBarContributionItem (id=636)
> chevronMenuManager null
> coolItem null
> currentHeight 22
> currentWidth 406
> disposed true
> id "functionKeys"
> minimumItemsToShow -1
> parent CoolBarManager2 (id=591)
> toolBarManager null
> useChevron true
> visible true
>
>
> I would like to copy this to bugzilla.
Re: Closing workbench: catching NPE [message #108422 is a reply to message #108409] Tue, 07 October 2008 07:56 Go to previous messageGo to next message
Dmitry Pryadkin is currently offline Dmitry PryadkinFriend
Messages: 146
Registered: July 2009
Senior Member
Hello Ben,

In my case, the ToolbarContributionItem gets disposed outside of
workbench event pipeline. I wonder why it was ok in rcp to do so.

Thanks

Benjamin Muskalla wrote:
> Hi Dmitry,
>
> it seems that this is a known bug deep down in the event life cycle of
> the workbench itself. There was a bug at Platform/UI about this issue:
>
> 173657: [Contributions] Nullpointer Exception in WorkbenchMenuService
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=173657
>
> Do you have your own presentation which could cause this?
>
Re: Closing workbench: catching NPE [message #108436 is a reply to message #108422] Tue, 07 October 2008 08:10 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 237
Registered: July 2009
Senior Member
Hi Dmitry,

if it works correctly in RCP but not in RAP I suggest to open a bug
report. And please attach a snippet/sample project to easily reproduce
the exception.

Greets
Benny

Dmitry Pryadkin wrote:
> Hello Ben,
>
> In my case, the ToolbarContributionItem gets disposed outside of
> workbench event pipeline. I wonder why it was ok in rcp to do so.
>
> Thanks
>
> Benjamin Muskalla wrote:
>> Hi Dmitry,
>>
>> it seems that this is a known bug deep down in the event life cycle of
>> the workbench itself. There was a bug at Platform/UI about this issue:
>>
>> 173657: [Contributions] Nullpointer Exception in WorkbenchMenuService
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=173657
>>
>> Do you have your own presentation which could cause this?
>>
Re: Closing workbench: catching NPE [message #108572 is a reply to message #108436] Tue, 07 October 2008 10:57 Go to previous message
Dmitry Pryadkin is currently offline Dmitry PryadkinFriend
Messages: 146
Registered: July 2009
Senior Member
Hello Ben,

Do you think it's enough for a snippet?
http://rafb.net/p/uP20tt28.html

Thanks,
Dmitry

Benjamin Muskalla wrote:
> Hi Dmitry,
>
> if it works correctly in RCP but not in RAP I suggest to open a bug
> report. And please attach a snippet/sample project to easily reproduce
> the exception.
>
> Greets
> Benny
>
> Dmitry Pryadkin wrote:
>> Hello Ben,
>>
>> In my case, the ToolbarContributionItem gets disposed outside of
>> workbench event pipeline. I wonder why it was ok in rcp to do so.
>>
>> Thanks
>>
>> Benjamin Muskalla wrote:
>>> Hi Dmitry,
>>>
>>> it seems that this is a known bug deep down in the event life cycle
>>> of the workbench itself. There was a bug at Platform/UI about this
>>> issue:
>>>
>>> 173657: [Contributions] Nullpointer Exception in WorkbenchMenuService
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=173657
>>>
>>> Do you have your own presentation which could cause this?
>>>
Previous Topic:qx.ui.basic.Image doesn't always show the image
Next Topic:How do I use debug qooxdoo version?
Goto Forum:
  


Current Time: Fri Mar 29 13:15:25 GMT 2024

Powered by FUDForum. Page generated in 0.02784 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top