Repository navigation
v1.0.8
What's New
Fix: Java 8 restore failures (enum == identity, ClassNotLoadedException)
Fixed enum restore failing on Java 8 with InvalidStackFrameException during JDI Phase 2 local variable setting.
Root cause: On Java 8, java.util.concurrent.TimeUnit (and potentially other classes) weren't loaded in the restore JVM. When setValue() threw ClassNotLoadedException, the fallback forceLoadClass() used invokeMethod to run Class.forName() — this implicitly resumes the thread, invalidating all cached StackFrame references. The subsequent retry setValue() then crashed with InvalidStackFrameException, causing the restore to fail silently (no enum output, no exception propagated).
Fixes:
-
Pre-load all snapshot classes — Before any frame manipulation, iterate through all snapshot locals, extract class names from type descriptors, and force-load any unloaded classes via JDI. This eliminates
ClassNotLoadedExceptionduringsetValue(), avoiding the frame-invalidatingforceLoadClasscall entirely. -
Double-suspend in restore path — Apply the same double-suspend mitigation from v1.0.7's freeze fix to the restore path's Phase 1 and Phase 2
suspend()/resume()calls.
Testing
- 127 unit tests, 35 integration tests across Java 8/9/11/25 × Ubuntu/macOS/Windows