ShivamMistry / RSLoader

A simple loader for the RuneScape game.
MIT License
2 stars 2 forks source link

java.lang.IllegalArgumentException: Width (0) and height (0) must be > 0 #2

Closed wyatt8740 closed 7 years ago

wyatt8740 commented 7 years ago

Upon launching the client for Old-School Runescape:

0.819672131147541
javaError: bh.<init>() bf.ah() | SampleModel:126 SinglePixelPackedSampleModel:144 SinglePixelPackedSampleModel:110 PackedColorModel:310 bh:28 bf:301 bf:341 Thread:748 | java.lang.IllegalArgumentException: Width (0) and height (0) must be > 0
error_game_crash
http://oldschool5.runescape.com/error_game_crash.ws
_self
Meegul commented 7 years ago

I believe this issue might not be due to the loader. I've been trying to write a loader myself, and ran into this issue. After finding 2-3 other open source loaders, they all exhibit the same error. Perhaps it's Jagex's doing.

wyatt8740 commented 7 years ago

One client that does not do this is this one: https://github.com/RuneSuite/simple-client

It's written in Kotlin, which is compiled for execution in a Java VM, like Scala. There was a commit to fix this problem, too. It looks like they made the launcher call the init() and start() methods later on in the code than it had been executing.

I can confirm it works, although setting up a Kotlin compiler was quite annoying for me, and I had to tweak an XML file's version number (I forget which one) to make it build happily.

It's definitely Jagex's doing, but it's not anything actually showing any intent to stop unofficial clients. It's just a change in their applet.

Eimhym commented 7 years ago

The easiest fix is to move applet.init() in RSLoader.java just before applet.start() line.

ShivamMistry commented 7 years ago

Hey, thanks for reporting this - apologies for the slow update but it should now be fixed :)

wyatt8740 commented 7 years ago

No problem. I was curious as to what you'd do to fix it - I tried to interpret that kotlin implementation into your Java code, but was having a hard time wrapping my head around it. Thanks for fixing it!