Thread Locked This thread is locked - replies are not allowed.


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


Permlink Replies: 9 - Pages: 1 - Last Post: 14-Nov-2018 15:21 Last Post By: jGromit Threads: [ Previous | Next ]
AndreWolff

Posts: 1,713
Registered: 14-Dec-2007
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Posted: 13-Nov-2018 13:47
 
For unknow reasons I get now in my skin next crash report:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at se.datadosen.jalbum.JMainSettingsPanel.lambda$init$3(JMainSettingsPanel.java:616)
	at java.desktop/com.sun.java.swing.plaf.windows.WindowsComboBoxUI.paintCurrentValue(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicComboBoxUI.paint(Unknown Source)
	at java.desktop/com.sun.java.swing.plaf.windows.WindowsComboBoxUI.paint(Unknown Source)
	at java.desktop/javax.swing.plaf.ComponentUI.update(Unknown Source)
etc.
There is no reference to a skin model line or variable, so how can I get the source of the problem?

If I select Menu item tools / Edit skin files, I see only file common.css

Windows 10 and jAlbum 17

Edited by: AndreWolff on 13-Nov-2018:

I found the problem:

File SkinModel.java did contain a wrong initialization of a this variable:

JTextField sidePanelWidthNr = new JnumberField("20",4);

I had added if file skinmodel.java:

public String sidePanelWidthNr="20";

After I had changed this into

public int sidePanelWidthNr=20;

I got another crash message, but now with a hint which did help me:
We're sorry. jAlbum is unable to start. Please pass this error report to support@jalbum.net
Thank you for your patience.
 
java.lang.ClassFormatError: Duplicate field name "sidePanelWidthNr" with signature "I" in class file SkinModel
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
After I removed the doubled declared variable, the problem was solved.

So it would be nice if jAlbum gives always a link to file SkinModel.java if that is the origin of the problem!

Edited by: AndreWolff on 13-Nov-2018 14:32
davidekholm

Posts: 3,562
Registered: 18-Oct-2002
Re: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Posted: 13-Nov-2018 16:26   in response to: AndreWolff in response to: AndreWolff
 
Thanks for reporting
AndreWolff

Posts: 1,713
Registered: 14-Dec-2007
Re: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Posted: 13-Nov-2018 19:09   in response to: davidekholm in response to: davidekholm
 
I did some experiments with the Logging Level.

If Logging Level = ALL I get a warning:

FINEST: java.lang.ClassNotFoundException: SlideModel

Why?

Is it not a good idea to show here before you start parsing a file, to how this in the system console, something like:

SkinModel.java opened
Start parsing index.htt
etc.
davidekholm

Posts: 3,562
Registered: 18-Oct-2002
Re: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Posted: 14-Nov-2018 09:43   in response to: AndreWolff in response to: AndreWolff
 
You probably get the warning about a missing SlideModel file because it is indeed missing. We can't however know if that is an error or not as it isn't a requirement to have a SkinModel file. That's why you only see that warning printed if you set the logging level to FINER.
AndreWolff

Posts: 1,713
Registered: 14-Dec-2007
Re: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Posted: 14-Nov-2018 09:46   in response to: davidekholm in response to: davidekholm
 
davidekholm wrote:
You probably get the warning about a missing SlideModel file because it is indeed missing.
It is not missing, the plugins directory contains the file SkinModel.java !!

Edit:

You can test it yourself by making an album with the FancyBox skin and I see the same warning with my Slide Show 4 skin and with the PhotoSwipe skin who both use the SkinModel.java file.

Edited by: AndreWolff on 14-Nov-2018 10:51

I don't get that warning with the ZigZag skin, so do I have to indicate somewhere that a SkinModel.java file is used?

Edited by: AndreWolff on 14-Nov-2018 11:04
jGromit

Posts: 7,488
Registered: 31-Jan-2006
Re: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Posted: 14-Nov-2018 11:24   in response to: davidekholm in response to: davidekholm
 
SlideModel.java and SkinModel.java are not the same thing. Let's not confuse them.
AndreWolff

Posts: 1,713
Registered: 14-Dec-2007
Re: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Posted: 14-Nov-2018 11:35   in response to: jGromit in response to: jGromit
 
jGromit wrote:
SlideModel.java and SkinModel.java are not the same thing. Let's not confuse them.
OK,I did not realize that, so it means that there is nothing wrong with my SkinModel.java files.

But I am still curious why I get that SlideModal warning!

BTW:
Also with the Minimal skin I see:

FINEST: java.lang.ClassNotFoundException: SlideModel

Edited by: AndreWolff on 14-Nov-2018 11:42
jGromit

Posts: 7,488
Registered: 31-Jan-2006
Re: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Posted: 14-Nov-2018 15:11   in response to: AndreWolff in response to: AndreWolff
 
AndreWolff wrote:
But I am still curious why I get that SlideModal warning!

If you set the logging level to WARNING, you get warnings. This is not a warning - it's just a piece of information. "I looked for SlideModel.java, and didn't find it." As the skin developer, you say, "OK, that's good, because my skin doesn't use a SlideModel.java file."

Moving this thread - there is no bug here.
AndreWolff

Posts: 1,713
Registered: 14-Dec-2007
Re: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Posted: 14-Nov-2018 15:15   in response to: jGromit in response to: jGromit
 
jGromit wrote:
Moving this thread - there is no bug here.
Incorrect, there is a bug or at least an inconvenience:

There is no reference to a skin model line or variable if the is a problem in tne SkinModel.java file, see my first message.
jGromit

Posts: 7,488
Registered: 31-Jan-2006
Re: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Posted: 14-Nov-2018 15:21   in response to: AndreWolff in response to: AndreWolff
 
Your skin works. You change one thing, and your skin doesn't work. Do you really need to have the core tell you what you just did?

If you worked with a compiled UI, you wouldn't have made the mistake in the first place. The IDE would have warned you about it the very second you typed it in.

Closed.
Legend
Forum admins
Helpful Answer
Correct Answer

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