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

Crash with disabled resource packs #8

Open
ate47 opened this issue Jan 23, 2022 · 0 comments
Open

Crash with disabled resource packs #8

ate47 opened this issue Jan 23, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@ate47
Copy link
Owner

ate47 commented Jan 23, 2022

Bug linked with this comment by SolSpruce

Version: FabricCustomCursorMod-1.3.0.jar

Basically, if you edit your cursor file location to a location that only exists in a custom resource pack you've created (for example, ../gui/pointer-96.png), and then that resource pack gets disabled for any reason, the game will crash on load.
This is a major problem because resource packs can get disabled due to renaming them or updating various mods, and the user isn't really aware they've been disabled. Then, their game won't start up, and most folks don't know how to read the latest.log:

[17:30:50] [Render thread/ERROR]: Unhandled game exception
java.lang.IllegalArgumentException: input == null!
	at Not Enough Crashes deobfuscated stack trace.(1.18.1+build.14) ~[?:?]
	at javax.imageio.ImageIO.read(ImageIO.java:1358) ~[?:?]
	at fr.atesab.customcursormod.common.config.CursorConfig.readImage(CursorConfig.java:120) ~[FabricCustomCursorMod-1.3.0.jar:?]
	at fr.atesab.customcursormod.common.config.CursorConfig.allocate(CursorConfig.java:67) ~[FabricCustomCursorMod-1.3.0.jar:?]
	at fr.atesab.customcursormod.common.config.CursorConfig.getCursor(CursorConfig.java:85) ~[FabricCustomCursorMod-1.3.0.jar:?]
	...
[17:30:50] [Render thread/INFO]: Stopping!

I think your mod is trying to read an image that doesn't exist. You probably need a "try" block of code, or an if statement to avoid attempting to read the .png file that doesn't exist while the resource pack is disabled.
So, about that resource pack I created. Maybe someone else wants to use it too?
Preview Image of Custom Cursor
Resource Pack Download Link

@ate47 ate47 added the bug Something isn't working label Jan 23, 2022
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

1 participant