4 Replies - 571 Views - Last Post: 08 August 2019 - 06:00 PM Rate Topic: -----

#1 tyses96   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 10
  • Joined: 22-March 14

After playing with custom graphics, everything has stopped working.

Posted 08 August 2019 - 04:31 PM

I was trying to procedurally generate squares to the screen. I used Slick2D's method of creating a static image, getting its graphics context, drawing to it randomly, then passing it back to draw to the screen.

It didn't work and caused errors, so I reverted back my code commenting out the usage of the class. Still errors occurred so I deleted the class as well. now there are still errors and I think its because for some reason the graphics context is being used.

Here was the error before removing the class:
failed to initialize device msi epf usb because of: java.io.ioexception: failed to acquire device (8007001e)



Here is the error after removing the code and reverting back to a previously known working state
Fri Aug 09 00:04:40 BST 2019 ERROR:null
java.lang.NullPointerException
	at com.rpg.main.SimpleSlickGame.render(SimpleSlickGame.java:150)
	at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:688)
	at org.newdawn.slick.AppGameContainer.gameLoop(AppGameContainer.java:411)
	at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:321)
	at com.rpg.main.SimpleSlickGame.main(SimpleSlickGame.java:202)
Fri Aug 09 00:04:40 BST 2019 ERROR:Game.render() failure - check the game code.
org.newdawn.slick.SlickException: Game.render() failure - check the game code.
	at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:691)
	at org.newdawn.slick.AppGameContainer.gameLoop(AppGameContainer.java:411)
	at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:321)
	at com.rpg.main.SimpleSlickGame.main(SimpleSlickGame.java:202)



Like I said it was previously working with the current code and the line it points to does not have any null pointers. it points to the graphics context.

Is This A Good Question/Topic? 0
  • +

Replies To: After playing with custom graphics, everything has stopped working.

#2 NormR   User is online

  • D.I.C Lover
  • member icon

Reputation: 781
  • View blog
  • Posts: 5,899
  • Joined: 25-December 13

Re: After playing with custom graphics, everything has stopped working.

Posted 08 August 2019 - 05:08 PM

Quote

java.lang.NullPointerException
at com.rpg.main.SimpleSlickGame.render(SimpleSlickGame.java:150)

Do any of the variables on line 150 have a null value?
Was This Post Helpful? 0
  • +
  • -

#3 tyses96   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 10
  • Joined: 22-March 14

Re: After playing with custom graphics, everything has stopped working.

Posted 08 August 2019 - 05:15 PM

No, ive tried commenting it out section by section and I end up commenting it all out until ive got nothing left.
Was This Post Helpful? 0
  • +
  • -

#4 NormR   User is online

  • D.I.C Lover
  • member icon

Reputation: 781
  • View blog
  • Posts: 5,899
  • Joined: 25-December 13

Re: After playing with custom graphics, everything has stopped working.

Posted 08 August 2019 - 05:20 PM

What does the program do now? Are there any error messages?

What do you expect the current code to do if all the statements are commented out?
Was This Post Helpful? 0
  • +
  • -

#5 tyses96   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 10
  • Joined: 22-March 14

Re: After playing with custom graphics, everything has stopped working.

Posted 08 August 2019 - 06:00 PM

View PostNormR, on 08 August 2019 - 05:08 PM, said:

Quote

java.lang.NullPointerException
at com.rpg.main.SimpleSlickGame.render(SimpleSlickGame.java:150)

Do any of the variables on line 150 have a null value?



I've found the issue! when testing the procedurally created squares, I deleted what I assumed was not needed initialisation of an object, my bad.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1