Closed ExternalAddress4401 closed 7 months ago
I'm able to bypass it by doing the patching part on the main thread like so
Il2Cpp.mainThread.schedule(() => {
patchFile(path + "/artwork.bundle");
});
but this is still bizarre.
Uhm, the fact that it works when scheduling within the main thread makes me think there's some thread-specific thing going on.
I guess this is where the breakage happens:
let strr = mscorlib
.class("System.BitConverter")
.method("ToString")
.overload("System.Byte[]")
.invoke(bytes) as Il2Cpp.String;
perhaps it's due to a different endianness? Are you able to investigate? Can you verify the content of bytes
and strr
remains the same across different threads?
By the way,
// DO
const path = file.content;
// DON'T
const path = file.toString().slice(1, -1);
Did you solve this issue? Please reopen if necessary
I'm having an issue with strings thats much worse on iOS but is somewhat re-producable on Android.
Game: https://play.google.com/store/apps/details?id=com.spaceapegames.beatstar&hl=en_CA&gl=US
Given some folders in /sdcard/beatstar/songs containing various bundle files I get various outputs.
On iOS I get various Chinese characters being printed out which I'm assuming come from broken strings.
Now I've never edited
files
orfile
but they're getting corrupted somehow from this replace calls and I'm struggling to figure out how this is happening.