SFML community forums

Help => Graphics => Topic started by: jonncr on January 30, 2020, 12:28:42 pm

Title: JSFML - NullPointerException for RenderWindow
Post by: jonncr on January 30, 2020, 12:28:42 pm
Strange issue, on MacOS whenever I try to create a new RenderWindow object i.e. RenderWindow window = new RenderWindow();
I get a NullPointerException ending when it tries to read the MD5File.

Does anyone have any idea why this could be happening?
Title: Re: JSFML - NullPointerException for RenderWindow
Post by: eXpl0it3r on January 30, 2020, 03:04:23 pm
What do you mean with "tries to read the MD5File"?

JSFML isn't maintained anymore so it might be hard to find someone who stills uses it.
Title: Re: JSFML - NullPointerException for RenderWindow
Post by: jonncr on January 30, 2020, 04:55:47 pm
Thanks for the reply!
What do you mean with "tries to read the MD5File"?

JSFML isn't maintained anymore so it might be hard to find someone who stills uses it.

Just going by the stack trace after trying to create the object
Code: [Select]
Exception in thread "main" java.lang.NullPointerException
at org.jsfml.internal.SFMLNative.readMD5File(Unknown Source)
at org.jsfml.internal.SFMLNative.loadNativeLibraries(Unknown Source)
at org.jsfml.internal.SFMLNativeObject.<init>(Unknown Source)
at org.jsfml.window.Window.<init>(Unknown Source)
at org.jsfml.graphics.RenderWindow.<init>(Unknown Source)

Its very odd considering it works perfectly on Windows/Linux.
Title: Re: JSFML - NullPointerException for RenderWindow
Post by: Gleade on January 31, 2020, 07:08:12 am
Which version did you download?

Checking here:
https://jsfml.sfmlprojects.org/?page=download

The latest release (December 2nd, 2013 ) doesn't include the Mac OS X natives, therefore it will not run on that platform.

However, the July 31st, 2013 release appears to support all 3 major platforms.
Title: Re: JSFML - NullPointerException for RenderWindow
Post by: Muhammad Adil Khan on March 14, 2020, 08:44:05 am
1) NullPointerException is a RuntimeException . In Java, a special null value can be assigned to an object reference. NullPointerException is thrown when an application attempts to use an object reference that has the null value. These include: Calling an instance method on the object referred by a null reference.