Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game Jar Crashes When Starting a New Game #25

Open
joshuaskelly opened this issue Dec 20, 2018 · 6 comments
Open

Game Jar Crashes When Starting a New Game #25

joshuaskelly opened this issue Dec 20, 2018 · 6 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@joshuaskelly
Copy link
Collaborator

Summary

Attempting to start a game from the jar file crashes.

Repro Steps

  1. Download or build the game jar.
  2. Run the jar file: java -jar DungeoneerDesktop-1.0.jar
  3. Click through the splash screen and start a new game.
  4. Crash.

Notes

  • This issue repros in both v1.0.0 and v1.1.0.
  • The editor works just fine in both edit and play modes.

Error Log

[DelverLifeCycle] READY PLAYER ONE
[DelverLevelChangeScreen] Exception: index can't be >= size: 0 >= 0
[DelverGameManager] Fatal error!
java.lang.NullPointerException
	at com.interrupt.dungeoneer.GameManager.tick(GameManager.java:113)
	at com.interrupt.dungeoneer.screens.GameScreen.render(GameScreen.java:73)
	at com.badlogic.gdx.Game.render(Game.java:46)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:225)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)
[DelverGameManager] Fatal error!
java.lang.NullPointerException
	at com.interrupt.dungeoneer.gfx.GlRenderer.render(GlRenderer.java:434)
	at com.interrupt.dungeoneer.GameManager.render(GameManager.java:126)
	at com.interrupt.dungeoneer.screens.GameScreen.render(GameScreen.java:88)
	at com.badlogic.gdx.Game.render(Game.java:46)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:225)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)
[Controllers] removed manager for application, 0 managers active
[DelverLifeCycle] Goodbye
@joshuaskelly joshuaskelly added the bug Something isn't working label Dec 20, 2018
@Interrupt
Copy link
Owner

Interrupt commented Dec 20, 2018

Looks like something bad happened in level loading, the render is crashing at:

if(loadedLevel.rendererDirty)

and before that is an exception logged:

[DelverLevelChangeScreen] Exception: index can't be >= size: 0 >= 0

we should verify that assets are correctly being packaged into the jar, usually this kind of error comes out of that.

@joshuaskelly
Copy link
Collaborator Author

The game will run if ran from the Dungeoneer directory. Are we missing files needed? I thought the jar was supposed to contain all that.

@Interrupt
Copy link
Owner

The jar should get built with all of the assets included if the task is doing everything it should, although it might make sense to be building empty jars for engine releases and ship the assets folder alongside them. What do you think makes the most sense?

@joshuaskelly
Copy link
Collaborator Author

I think building a minimal jar file and shipping the assets folder is good for a number of reasons.

@Interrupt
Copy link
Owner

When building the jar, is this done using the gradlew DungeoneerDesktop:dist command? Using a regular package operation wouldn't include the assets, but the distribute task should.

@joshuaskelly
Copy link
Collaborator Author

I'll look into this. My first instinct is to make a makefile task that uses the GNU zip command. But I'd prefer a Java based solution that doesn't have external dependencies.

@joshuaskelly joshuaskelly added this to the Backlog milestone Aug 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants