Android 16 ARM64: VICE x64/x64sc crashes loading D64 with Scudo invalid chunk state
Summary
VICE x64 and x64sc libretro cores crash consistently in RetroArch 1.22.2 on Android 16 ARM64 when attempting to load Commodore 64 ".d64" disk images.
The crash is reproducible with multiple D64 images, including a known-good D64 image that works in other emulators.
The crash occurs with both the VICE x64 core and the VICE x64sc core, so it does not appear to be specific to x64sc.
The latest x64sc crash log additionally shows a Java-side Android VFS/SAF exception immediately before the native crash:
"java.lang.IllegalArgumentException: Invalid URI: content"
from:
"com.libretro.common.vfs.VfsImplementationSaf.openSafFile"
This is followed shortly afterward by:
"Scudo ERROR: invalid chunk state when deallocating address ..."
and:
"Fatal signal 6 (SIGABRT)"
This may indicate a problem at the Android SAF/VFS → libretro/VICE loading boundary. I cannot determine from the available symbols whether the underlying defect is in RetroArch's Android VFS handling, VICE-libretro, or their interaction.
Environment
Device:
RetroArch:
VICE:
Core:
Reproduction
The same behavior was reproduced through different loading methods, including:
A final test used a known-good D64 image that works in other emulators and placed it in a directory accessible to RetroArch. The VICE x64sc core still crashed.
Other observations
".tap" and ".t64" content loads successfully.
The following settings/tests were also tried without resolving the crash:
Core information/assets/controller profiles were also updated.
Standard C64 ROMs are available through the current VICE-libretro setup.
The problem is therefore not limited to one particular D64 image or one particular VICE emulation mode.
Crash details
VICE x64
The x64 crash terminates with:
"Scudo ERROR: invalid chunk state when deallocating address ..."
The native backtrace enters:
"libvice_x64.so"
and includes:
"retro_load_game+308"
before returning into RetroArch's:
"core_load_game+272"
and "content_init+5896".
VICE x64sc
The x64sc core produces the same class of native allocator failure:
"Scudo ERROR: invalid chunk state when deallocating address ..."
The native backtrace contains:
The Android debugger cannot symbolicate the internal VICE x64sc addresses because the library is reported as unreadable by debuggerd.
Latest x64sc test
The latest crash log contains this immediately before the native abort:
"java.lang.IllegalArgumentException: Invalid URI: content"
at:
"android.provider.DocumentsContract.getTreeDocumentId"
and:
"com.libretro.common.vfs.VfsImplementationSaf.openSafFile(VfsImplementationSaf.java:114)"
Approximately 100 ms later:
"Scudo ERROR: invalid chunk state when deallocating address ..."
followed by:
"Fatal signal 6 (SIGABRT)"
This makes Android SAF/VFS handling a potentially important lead.
Expected behavior
A valid Commodore 64 ".d64" disk image should load normally in the VICE x64/x64sc libretro core without terminating RetroArch.
Actual behavior
RetroArch aborts during content loading with an Android Scudo allocator error:
"invalid chunk state when deallocating address ..."
The failure is reproducible with both VICE x64 and x64sc.
Relevant log evidence
The latest x64sc log shows the SAF exception followed by the native Scudo allocator failure.
The earlier x64 and x64sc logs independently reproduce the same native allocator failure inside the VICE core during content loading.
Full crash logs can be supplied/attached.
Question for the developers
Could you please investigate whether the Android SAF/VFS handling of the D64 content path can result in an invalid/double deallocation or otherwise corrupt state before/inside "retro_load_game()"?
In particular, the latest log appears to show:
Android "DocumentsContract" / SAF URI handling
→ "VfsImplementationSaf.openSafFile()"
→ VICE x64sc content loading
→ Scudo invalid chunk state
→ SIGABRT
I would also appreciate checking whether the same issue exists in the VICE-libretro Android x64 and x64sc builds.
AI disclosure
This report was prepared with assistance from an AI tool. The device information, reproduction procedure, test results, and crash-log observations are based on the user's actual testing and attached logs. The AI assistance was used to organize and technically summarize that evidence; the underlying crash data has not been fabricated.
We don't provide any library-ized or Android builds of VICE, please take this up with the people who built on our sources - the error messages sound a lot like it's a bug in their code, not ours.
AI disclosure
This dismissal was prepared with no assistance from any AI tools. The error messages and problem details are obvious enough to point towards downstream projects.
Hello Ingo:
Thanks for your guidelines, I will forward this technical report to the VICE Libretro team;
As you mentioned it must be more relevant to be discussed & resolved on that community.
Best regards.