Skip to content

Fix: Proxy type without sun.misc.Unsafe so jlinked app images install the binder - #79

Merged
b-re-w merged 4 commits into
developfrom
work/packaged-proxies
Oct 3, 2026
Merged

b-re-w merged 4 commits into
developfrom
work/packaged-proxies

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 3, 2026

Copy link
Copy Markdown
Member

Closes #77

Defect fixed: Compose's jlinked app runtime has no jdk.unsupported; desktop ProxyType's static initialiser loaded sun.misc.Unsafe → ExceptionInInitializerError → the binder never installed → every Kotlin-namespace import raised No module named 'org'. The proxy type's structs and slot reads/writes now go through Panama (allocateBytesFreeable, new writePointerSlot); nothing beyond java.base (SPEC L-10). JDK 16–18 (incubator FFM) loses proxies; the build targets JDK 21. Dealloc cost not yet measured.

Test added: JlinkedRuntimeProxyTypeTest (child JVM with --limit-modules java.base, and a full-JDK control).

Verification (coordinator, after merging develop, each module separately): plugin 235/0, desktopTest 580/0, ksp artifact 35/0, app 70/0, compose 111/0; androidNative + iosSimulatorArm64 compile OK; :sample:createDistributable OK. Packaged .app launched from / with PYTHONHOME unset: before → proxies : ExceptionInInitializerError: null + No module named 'org' x4; after → proxies : installed: 1080 lines of generated Python, 4 proxy classes, Greeter/companion/await lines all succeed.

b-re-w added 4 commits October 3, 2026 15:06
…age installs proxies (#77)

The Compose app image is jlinked without jdk.unsupported; ProxyType's static initialiser
loaded sun.misc.Unsafe and failed with ExceptionInInitializerError, so the binder never
installed and every Kotlin-namespace import raised 'No module named org'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant