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

[BUG] Xteas.json file missing starting in 2024-11-27-rev227 #196

Open
1 task done
cbartram opened this issue Mar 7, 2025 · 2 comments
Open
1 task done

[BUG] Xteas.json file missing starting in 2024-11-27-rev227 #196

cbartram opened this issue Mar 7, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@cbartram
Copy link

cbartram commented Mar 7, 2025

  • I am using the latest version of the exporter

Bug description

The cache fails to load because of a missing xteas.json file that should come pre-packaged with the cache from https://archive.runestats.com

This makes revisions newer than 2024-11-27-rev227 unloadable.

Steps to reproduce

  1. Open env exporter
  2. Load the March 5th 2025 cache and see the error

Expected behavior

The cache loads as normal

@cbartram cbartram added the bug Something isn't working label Mar 7, 2025
@ConnorDY
Copy link
Owner

ConnorDY commented Mar 8, 2025

Is this something you might be able to contribute a fix for?

@cbartram
Copy link
Author

cbartram commented Mar 8, 2025

Possibly, detecting when the xteas.json file is missing from the runestats cache is trivial. The problem is finding the cache decryption keys that work with this package.

https://archive.openrs2.org/ seems promising however, after trying their xteas.json file with the 2025-03-05 revision from archive.runestats.com a buffer underflow exception is thrown:

Exception in thread "AWT-EventQueue-0" java.nio.BufferUnderflowException
	at java.base/java.nio.Buffer.nextGetIndex(Buffer.java:643)
	at java.base/java.nio.HeapByteBuffer.get(HeapByteBuffer.java:165)
	at cache.utils.ByteBufferExtKt.readUnsignedByte(ByteBufferExt.kt:29)
	at cache.loaders.OverlayLoader.load(OverlayLoader.kt:47)
	at cache.loaders.OverlayLoader.<init>(OverlayLoader.kt:73)
	at controllers.main.MainController.<init>(MainController.kt:93)
	at controllers.CacheChooserController.launch$lambda$16$lambda$15(CacheChooserController.kt:257)

Same issue when using both files (cache + xteas) from openrs2.org. I need to investigate more on how the cache is being loaded and I'm not super familiar with Kotlin but I'm great at Java so should be able to pick it up quick.

Edit: Upon further investigation there aren't problems loading xteas.json file(s) from openrs2. The issues I am encountering is that the OverlayLoader data size is always 0 on newer caches. Indexes like 8 for sprites and 5 for maps don't seem to be present in the cache at all oddly enough throwing errors while loading sprites etc...

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