Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334561 - [Pin&Clone] ServiceRegistration returns null pointer
Summary: [Pin&Clone] ServiceRegistration returns null pointer
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-17 13:39 EST by Patrick Chuong CLA
Modified: 2020-09-04 15:19 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Chuong CLA 2011-01-17 13:39:02 EST
During the initializatoin Job for the pin ViewIDCounterManager, calling IViewReference#getView(true) result in a nullpointer exception. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=331781#c29, for more detail. The current workaround is to call getView(false) and listen to partOpened to reset the title.


org.eclipse.pde.internal.runtime.registry.model.ServiceRegistration.getUsingBundles(ServiceRegistration.java:76)
>     at
> org.eclipse.pde.internal.runtime.registry.RegistryBrowserModelChangeListener.getTopLevelElement(RegistryBrowserModelChangeListener.java:63)
>     at
> org.eclipse.pde.internal.runtime.registry.RegistryBrowserModelChangeListener.refreshTopLevelElements(RegistryBrowserModelChangeListener.java:99)
>     at
> org.eclipse.pde.internal.runtime.registry.RegistryBrowserModelChangeListener.update(RegistryBrowserModelChangeListener.java:129)
>     at
> org.eclipse.pde.internal.runtime.registry.RegistryBrowserModelChangeListener$1.run(RegistryBrowserModelChangeListener.java:26)
>     at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
>     at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
Comment 1 Marc Khouzam CLA 2011-01-17 13:57:23 EST
(In reply to comment #0)
> During the initializatoin Job for the pin ViewIDCounterManager, calling
> IViewReference#getView(true) result in a nullpointer exception.

Note that the NPE does not happen when we call IViewReference#getView(true) but will eventually happen when we terminate a DSF-GDB launch.
Comment 2 Patrick Chuong CLA 2011-01-17 14:00:29 EST
(In reply to comment #1)
> (In reply to comment #0)
> > During the initializatoin Job for the pin ViewIDCounterManager, calling
> > IViewReference#getView(true) result in a nullpointer exception.
> Note that the NPE does not happen when we call IViewReference#getView(true) but
> will eventually happen when we terminate a DSF-GDB launch.

I still can't reproduce this NPE, I am able to terminate the session without issue. I am wondering whether this is related to linux or not. I'll need to setup my linux VM and give it a try.
Comment 3 Marc Khouzam CLA 2011-01-17 14:03:10 EST
(In reply to comment #2)
> (In reply to comment #1)
> > (In reply to comment #0)
> > > During the initializatoin Job for the pin ViewIDCounterManager, calling
> > > IViewReference#getView(true) result in a nullpointer exception.
> > Note that the NPE does not happen when we call IViewReference#getView(true) but
> > will eventually happen when we terminate a DSF-GDB launch.
> 
> I still can't reproduce this NPE, I am able to terminate the session without
> issue. I am wondering whether this is related to linux or not. I'll need to
> setup my linux VM and give it a try.

For me (on Linux) it happens all the time.
I can try it on Windows tonight.