Graphic is disposed
Oxygen general issues.
-
- Posts: 47
- Joined: Thu Jun 19, 2014 3:55 pm
Graphic is disposed
Hi
we are using the Eclipse Oxygen Author in Version 15.2
I close a editor tab programmatically. Now I get a SWT.Exception back, which tells me the graphic is disposed.
It is difficult for me to debug, because I can not see which graphic will be disposed to early:
Is it possible, that on your side a graphic will be disposed to earyl?
we are using the Eclipse Oxygen Author in Version 15.2
I close a editor tab programmatically. Now I get a SWT.Exception back, which tells me the graphic is disposed.
It is difficult for me to debug, because I can not see which graphic will be disposed to early:
Code: Select all
Caused by: org.eclipse.swt.SWTException: Graphic is disposed
at org.eclipse.swt.SWT.error(SWT.java:4282)
at org.eclipse.swt.SWT.error(SWT.java:4197)
at org.eclipse.swt.SWT.error(SWT.java:4168)
at org.eclipse.swt.graphics.Resource.getDevice(Resource.java:81)
at com.oxygenxml.editor.editors.xsd.view.c.ab(Unknown Source)
at com.oxygenxml.editor.editors.xsd.view.c.u(Unknown Source)
at com.oxygenxml.editor.editors.xsd.view.c.<init>(Unknown Source)
at com.oxygenxml.editor.editors.author.s.lnw(Unknown Source)
at ro.sync.ecss.g.ac.rv(Unknown Source)
at ro.sync.ecss.g.ac.qv(Unknown Source)
at ro.sync.ecss.g.ac.ij(Unknown Source)
at ro.sync.ecss.g.u.ij(Unknown Source)
at ro.sync.ecss.g.q.ij(Unknown Source)
at ro.sync.ecss.g.u.ij(Unknown Source)
at ro.sync.ecss.g.q.ij(Unknown Source)
at ro.sync.ecss.g.u.ij(Unknown Source)
at ro.sync.ecss.g.mb.ij(Unknown Source)
at ro.sync.ecss.g.rb.ij(Unknown Source)
at ro.sync.ecss.g.e.ij(Unknown Source)
at ro.sync.ecss.g.e.ij(Unknown Source)
at ro.sync.ecss.g.nb.ij(Unknown Source)
at ro.sync.ecss.component.n.aii(Unknown Source)
at com.oxygenxml.editor.editors.author.s.uzw(Unknown Source)
at com.oxygenxml.editor.editors.author.s.xzw(Unknown Source)
at com.oxygenxml.editor.editors.author.s$10.caretMoved(Unknown Source)
at ro.sync.ecss.component.n.dbj(Unknown Source)
at ro.sync.ecss.component.n.faj(Unknown Source)
at ro.sync.ecss.component.n.oaj(Unknown Source)
at ro.sync.ecss.component.n.sii(Unknown Source)
at ro.sync.ecss.component.n.whi(Unknown Source)
at com.oxygenxml.editor.editors.author.AuthorEditorPage.restoreLastSavedPosition(Unknown Source)
at ro.sync.exml.l.c.b(Unknown Source)
at com.oxygenxml.editor.editors.xml.ob.checkForChange(Unknown Source)
at com.oxygenxml.editor.editors.author.AuthorEditorPage$15$1.run(Unknown Source)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
KGU Consulting GmbH
http://www.kgu-consulting.com
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Graphic is disposed
Hi Denis,
What API exactly are you calling to close the editor?
It seems that while the editor is closing it somehow receives focus and checks if its contents has been modified on disk. The contents seem to be modified on disk since its last load (we look at the timestamp of the loaded file on disk) so the editor tries to use Display.getDefault().asyncExec in order to auto-reload from disk. But the editor has already been disposed so the reload fails.
Regards,
Radu
What API exactly are you calling to close the editor?
It seems that while the editor is closing it somehow receives focus and checks if its contents has been modified on disk. The contents seem to be modified on disk since its last load (we look at the timestamp of the loaded file on disk) so the editor tries to use Display.getDefault().asyncExec in order to auto-reload from disk. But the editor has already been disposed so the reload fails.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 47
- Joined: Thu Jun 19, 2014 3:55 pm
Re: Graphic is disposed
Hi Radu,
I use themethod from the .
Is there a watchdog on your side, which holds the file? And if how long he holds the file?
Best regards,
Denis
I use the
Code: Select all
closeEditors(IEditorReference[], boolean)
Code: Select all
IWorkbenchPage
Is there a watchdog on your side, which holds the file? And if how long he holds the file?
Best regards,
Denis
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
KGU Consulting GmbH
http://www.kgu-consulting.com
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Graphic is disposed
Hi Denis,
No, it's just a focus listener which if it detects that the file on disk has a newer timestamp than the file loaded in the editor will try to trigger a reload using Display.getDefault().asyncExec which in your case delays the execution until after the editor has been disposed. I tried to guard this situation, when Oxygen 16.1 comes out in a couple of days please try again to see if you can reproduce the situation.
Regards,
Radu
No, it's just a focus listener which if it detects that the file on disk has a newer timestamp than the file loaded in the editor will try to trigger a reload using Display.getDefault().asyncExec which in your case delays the execution until after the editor has been disposed. I tried to guard this situation, when Oxygen 16.1 comes out in a couple of days please try again to see if you can reproduce the situation.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service