java.lang.NullpointerException

Use this forum to post questions about using LXFree Java and LXSeries software for Windows.
Post Reply
digger
Posts: 2
Joined: Wed Apr 25, 2012 8:45 am

java.lang.NullpointerException

Post by digger »

Hi all
am gettingn this error on LXfree Windows xp pro, when trying to open a plot created on another computer, am fairly certain both are running the latest release of LXfree
any ideas anyone?
thanks though
JJ
digger
Posts: 2
Joined: Wed Apr 25, 2012 8:45 am

..in addition

Post by digger »

it looks like the file is only 4kb so something not right with the save i am guessing?
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

One thing to check is that you exported or originally saved the plot on the Mac in XML format. This format has the extension ".lxxplot". If you saved in the default Mac binary format (.lxplot) and changed the extension to .lxx you would get a null pointer exception if you tried to open the file on Windows.

As of LXFree v2.1, the extension lxxplot for xml plot files is preferred over .lxx because the Mac OS considers .lxx to be associated with another application. LXFree will still open a file with an .lxx extension but lxxplot is now the default on both the Mac and LXFree for Java.

Changing the file extension does not in any way convert the file. Only files save in XML format are cross-platform. LXFree for Java on Windows or Linux and LXBeams running on iPad use this format.

The .lxplot extension is exclusively a Mac format. As of version 2.1, XML based plot files preserve Mac specific information that is ignored on other operating systems and they are functionally equivalent to lxplot files.
damobarrowafc
Posts: 6
Joined: Sun Oct 16, 2011 1:05 pm

Post by damobarrowafc »

I am keeping this error whilst opening a file
I saved and closed the file,
Around hour later came to open the file and i get the java lang error
How do i solve this?
It wont let me open the file at all

Thanks in advance
Damobarrowafc
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

LXFree for Java 1.0.15 had an issue with saving styled text when the alternate representation option was not selected. This produced the null pointer exception.

This is now fixed in 1.0.16. As always, on Windows you must use the control panel and uninstall LXFree for Java before you download and install an updated version.

If you are using 1.0.16 and it does not fix the issue, you can open the help window and click on the "Console Log" link in the lower left corner. This should show what is causing the exception. You can copy and paste that into a post or an e-mail and we will investigate what the problem might be.
damobarrowafc
Posts: 6
Joined: Sun Oct 16, 2011 1:05 pm

Post by damobarrowafc »

Thanks for the quick reply unfortunatly the update didnt work and i still get the error

If i open lx free on its on first then try to load the file it will just sit on 'finishing.....' in a small grey box

but if i open the file on its on it'll do the java.lang.....error

here is the console log

LXFree for Java 1.0.16 (4610)
JRE: 1.7.0_09
Sat Oct 20 17:03:06 BST 2012
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at jlx.LXLight.connectKeyEntry(LXLight.java:168)
at jlx.LXLayer.connectKeyEntries(LXLayer.java:684)
at jlx.LXLayerManager.connectKeyEntries(LXLayerManager.java:613)
at jlx.LXDocument.setKey(LXDocument.java:345)
at jlx.LXDocument.<init>(LXDocument.java:204)
at jlx.JLXFrame.doOpenFile(JLXFrame.java:785)
at CJT.StdFileMenuHandler.openAFile(StdFileMenuHandler.java:388)
at CJT.StdFileMenuHandler.openFile(StdFileMenuHandler.java:336)
at CJT.StdFileMenuHandler$openActionClass.actionPerformed(StdFileMenuHandler.java:688)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)





http://www.sendspace.com/file/pey8n2


The link is the file that it wont open

Thanks in advance
Damobarrowafc
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

Thanks for posting a link to the file. It looks like a light is pointing to a missing key entry. This shouldn't be able to happen. However, if there was only one light using a key entry and it was deleted, then the unused entries were removed, then undo was invoked and the light was restored, it would be possible for the key entry to be lost.

There is a fix (v1.0.17) that will allow you to open your file. If a key entry is not found, LXFree for Java will use the first key entry in the plot's key instead. Also, it should not be possible for the above scenario to occur. When an edit is undone, the key entries should now be checked for consistency.

1.0.17 can be downloaded now for Windows and later today for Linux.
damobarrowafc
Posts: 6
Joined: Sun Oct 16, 2011 1:05 pm

Post by damobarrowafc »

'admin' thanks for your quick replies
Where can i find .17 at?

Cheers
Damobarrowafc

PS: if you make a full lx series for windows (like mac one) i would be a buyer :D


Also do you have a pdf of all the lantern symbols
As i would like to create a few that arent in the default and it takes a while not knowing what symbols there are

Cheers
damobarrowafc
Posts: 6
Joined: Sun Oct 16, 2011 1:05 pm

Post by damobarrowafc »

Thank you admin all works perfectly now :D
Cheers
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

BTW it looks like the entry that was deleted from the key was a Strand Nocturne.

You can go to the Inspector's symbols tab and choose "Load Key" from the popup menu below the properties table. Choose "strandlighting.lxkey". This will add the entries from the strand library to the current key. Select the light that should be the Nocturne and then click on the Nocturne symbol in the palette in the Inspector. This will change the light back into a Nocturne. After you've done that, choose "Remove Unused Entries" from the popup menu and you will be left with a key that includes only the symbols being used in the plot.

As far as browsing the symbols goes, one of the things that is missing from LXFree for Java is a visual way of selecting a symbol to associate with a key entry. (Which is available as part of LXBeams on OS X).
LXuser91
Posts: 3
Joined: Mon Nov 11, 2013 7:17 pm

I have an error

Post by LXuser91 »

This is when i want to open File:

An error occured''
java.lang.NumberFormatException: For input string: ''-''

I just the latest versions of LX free and java.

HELP!!!


my console log
LXFree for Java 1.1.0 (5820A)
JRE: 1.7.0_45
Mon Nov 11 20:54:03 CET 2013
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at jlx.LXLayersTableModel.getRowCount(LXLayersTableModel.java:38)
at javax.swing.JTable.getRowCount(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.createTableSize(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.getPreferredSize(Unknown Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at javax.swing.ScrollPaneLayout.layoutContainer(Unknown Source)
at java.awt.Container.layout(Unknown Source)
at java.awt.Container.doLayout(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validate(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.WaitDispatchSupport$2.run(Unknown Source)
at java.awt.WaitDispatchSupport$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(Unknown Source)
at java.awt.Dialog.show(Unknown Source)
at javax.swing.JOptionPane.showOptionDialog(Unknown Source)
at javax.swing.JOptionPane.showMessageDialog(Unknown Source)
at javax.swing.JOptionPane.showMessageDialog(Unknown Source)
at javax.swing.JOptionPane.showMessageDialog(Unknown Source)
at CJT.StdMainFrame.startup(StdMainFrame.java:137)
at CJT.StdMainFrame.startupWindowComplete(StdMainFrame.java:143)
at CJT.SimpleImageWindow.doClose(SimpleImageWindow.java:112)
at CJT.SimpleImageWindow.idleProcess(SimpleImageWindow.java:124)
at CJT.SimpleImageWindow$1.actionPerformed(SimpleImageWindow.java:36)
at javax.swing.Timer.fireActionPerformed(Unknown Source)
at javax.swing.Timer$DoPostEvent.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at jlx.LXLayersTableModel.getRowCount(LXLayersTableModel.java:38)
at javax.swing.JTable.getRowCount(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.createTableSize(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.getPreferredSize(Unknown Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at javax.swing.ScrollPaneLayout.layoutContainer(Unknown Source)
at java.awt.Container.layout(Unknown Source)
at java.awt.Container.doLayout(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validate(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.WaitDispatchSupport$2.run(Unknown Source)
at java.awt.WaitDispatchSupport$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(Unknown Source)
at java.awt.Dialog.show(Unknown Source)
at javax.swing.JOptionPane.showOptionDialog(Unknown Source)
at javax.swing.JOptionPane.showMessageDialog(Unknown Source)
at javax.swing.JOptionPane.showMessageDialog(Unknown Source)
at javax.swing.JOptionPane.showMessageDialog(Unknown Source)
at CJT.StdMainFrame.startup(StdMainFrame.java:137)
at CJT.StdMainFrame.startupWindowComplete(StdMainFrame.java:143)
at CJT.SimpleImageWindow.doClose(SimpleImageWindow.java:112)
at CJT.SimpleImageWindow.idleProcess(SimpleImageWindow.java:124)
at CJT.SimpleImageWindow$1.actionPerformed(SimpleImageWindow.java:36)
at javax.swing.Timer.fireActionPerformed(Unknown Source)
at javax.swing.Timer$DoPostEvent.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

Can you e-mail the file so that this can be tracked down and fixed?
LXuser91
Posts: 3
Joined: Mon Nov 11, 2013 7:17 pm

Post by LXuser91 »

admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

This problem seems to involve bad encoding of styled text in RTF format. Specifically one error is caused by a hyphen at the beginning of a line. This is internal to Java's RTF implementation and may be a bug there. There is a new version available for Windows (1.1.1 5911A) that will at least ignore bad RTF. That way you may lose some text but the plot will still open. I have fixed your file so that the text is partly restored. It will take more investigation to see why the RTF became incorrect and what could prevent that in the future.
LXuser91
Posts: 3
Joined: Mon Nov 11, 2013 7:17 pm

Post by LXuser91 »

thankyou for the fast respond.

everything is working fine now
Post Reply