Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: JSFML - NullPointerException for RenderWindow  (Read 1000 times)

0 Members and 1 Guest are viewing this topic.

jonncr

  • Newbie
  • *
  • Posts: 2
    • View Profile
JSFML - NullPointerException for RenderWindow
« 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?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10157
    • View Profile
    • development blog
    • Email
Re: JSFML - NullPointerException for RenderWindow
« Reply #1 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

jonncr

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: JSFML - NullPointerException for RenderWindow
« Reply #2 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.

Gleade

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: JSFML - NullPointerException for RenderWindow
« Reply #3 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.

Muhammad Adil Khan

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Re: JSFML - NullPointerException for RenderWindow
« Reply #4 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.

 

anything