This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Pages: 1 - Last Post: 23 Feb 21, 08:13 Last Post By: Laza Threads: [ Previous | Next ]
JeffTucker

Posts: 7,680
Registered: 31-Jan-2006
Console error
Posted: 15 Feb 21, 18:25
 
  Click to reply to this thread Reply
Using Photoblogger, if I use the integrated browser for previews, when I return to the Explore view, there's a console dump:
Make changes
Making deep-data.json: 0.008s
Make album: 2.861s
Making deep-data.json: 0.008s
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at photoblogger.ImageDataUI.setAlbumObject(ImageDataUI.java:32)
	at se.datadosen.explorer.JEditPanel.fireEditingAlbumObject(JEditPanel.java:1261)
	at se.datadosen.explorer.JEditPanel.setAO(JEditPanel.java:337)
	at se.datadosen.explorer.JAlbumExplorer.setExplorerView(JAlbumExplorer.java:3927)
	at se.datadosen.explorer.JAlbumExplorer$6.actionPerformed(JAlbumExplorer.java:442)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.JToggleButton$ToggleButtonModel.setPressed(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Container.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
I'm seeing the same thing with Story. No problem with other skins (like mine, or Tiger, or Lucid).
Laza

Posts: 2,859
Registered: 6-Sep-2005
Re: Console error
Posted: 16 Feb 21, 07:24   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I used the following code to selectively offer different option to folders and images:

public class ImageDataUI extends JCustomPanel {
 
	JCheckBox panorama = new JCheckBox();
	
	@Override
	public void setAlbumObject(AlbumObject ao) {
		super.setAlbumObject(ao);
			
		Category cc = ao.getCategory();
		boolean lightboxable = cc != Category.folder && cc != Category.webPage && cc != Category.webLocation;
			
		panorama.setVisible(lightboxable);
	}
	
	public ImageDataUI(JAlbumContext context, SmartResourceBundle texts) {
:
:

This was David's advice, and must admit I have no idea what's the problem.
JeffTucker

Posts: 7,680
Registered: 31-Jan-2006
Re: Console error
Posted: 22 Feb 21, 22:58   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Fixed in Photoblogger. I'm guessing the next release of Story will take care of that one, too.

Closed.
Laza

Posts: 2,859
Registered: 6-Sep-2005
Re: Console error
Posted: 23 Feb 21, 08:13   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
What I wasn't aware of, ao can be null in corner cases.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums