NPE in Oxygen Eclipse Plugin when disposing display.

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Stevee
Posts: 16
Joined: Wed Jan 12, 2022 6:17 pm

NPE in Oxygen Eclipse Plugin when disposing display.

Post by Stevee »

Hi,
we are integrating the OxygenXMLAuthor Eclipse Plugin v24.0 in an Eclipse RCP Application.

When the Eclipse RCP Application gets closed, the org.eclipse.swt.Display will disposed.
This leads to a Nullpointer-Exception in the OxygenXMLAuthor that pops up when closing the Application:

Here is an excerpt of the Stacktrace:

java.lang.NullPointerException
at com.oxygenxml.editor.EditorPlugin$31.run(Unknown Source)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4029)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3629)
at org.eclipse.swt.widgets.Display.release(Display.java:3704)
at org.eclipse.swt.graphics.Device.dispose(Device.java:324)
.....

Do you have any advice how to avoid the occurance of this NPE ? May there be a possible Bug / missing nullcheck?

Kind Regards
Mircea
Posts: 131
Joined: Tue Mar 25, 2003 11:21 am

Re: NPE in Oxygen Eclipse Plugin when disposing display.

Post by Mircea »

Hello Steve,

Can you please specify also the Eclipse distribution and build number ?
The problem you encountered is also available in the 24.1 version ?
We strongly encourage you to use the 24.1 version since it usually contains not only improvements but also bug-fixes...
I will try to reproduce the problem on our side as well.

Regards,
Mircea
Mircea Enachescu
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Stevee
Posts: 16
Joined: Wed Jan 12, 2022 6:17 pm

Re: NPE in Oxygen Eclipse Plugin when disposing display.

Post by Stevee »

Hi Mircea,

thank you for your reply.
The Version of the Eclipse RCP Platform used is 4.21.

The org.eclipse.swt Plugin has the Version 3.117.0.v20210906-0842
Mircea
Posts: 131
Joined: Tue Mar 25, 2003 11:21 am

Re: NPE in Oxygen Eclipse Plugin when disposing display.

Post by Mircea »

Hi Steve,

Have you tried the 24.1 version as suggested ?

Regards,
Mircea
Mircea Enachescu
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Stevee
Posts: 16
Joined: Wed Jan 12, 2022 6:17 pm

Re: NPE in Oxygen Eclipse Plugin when disposing display.

Post by Stevee »

Hi Mircea,
sorry for my late Reply.

I used the 24.1 Plugin as you suggested and did some testing and it seems that the NPE does not occur anymore. :D
Post Reply