Exception thown when opeing document

Post here questions and problems related to oXygen frameworks/document types.
sderrick
Posts: 269
Joined: Sat Jul 10, 2010 4:03 pm

Exception thown when opeing document

Post by sderrick »

Linux Ubuntu 11.0.25
SDK 26.1
When a document is loaded I get the following exception.

Code: Select all

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at java.desktop/javax.swing.plaf.basic.BasicTextUI.damageRange(BasicTextUI.java:1262)
	at java.desktop/javax.swing.plaf.basic.BasicTextUI.damageRange(BasicTextUI.java:1238)
	at java.desktop/javax.swing.text.DefaultHighlighter$SafeDamager.run(DefaultHighlighter.java:613)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
The editor works fine and I don't see any visible indication of a problem.

Scott
Radu
Posts: 9343
Joined: Fri Jul 09, 2004 5:18 pm

Re: Exception thown when opeing document

Post by Radu »

Hi Scott,
Not sure what the problem could be. Swing components in general are not thread safe so any modification you make (example: loading content in the component) should in general be made on the AWT Event Queue thread using for example SwingUtilities.invokeAndWait/invokeLater.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply