Troubleshooting¶
| Symptom | Check / fix |
|---|---|
| Unsupported platform | Use Linux or Windows on x86_64 or arm64; macOS is not bundled. The loader follows the JVM's os.arch: an x64 JVM on an arm64 machine loads the x86_64 library, so use an arm64 JDK with Compose's -arm64 runtime there. |
| Class-file version error | Run Java 25+; match the application's bytecode target. |
| Native access warning | Add --enable-native-access=ALL-UNNAMED to application JVM args. |
| Gradle loader capability conflict | Remove Google's loader dependencies, or exclude both androidx.ink:ink-nativeloader and ink-nativeloader-jvm where introduced. |
InkRuntime.load reports a loader conflict |
Check runtime classpath for a second androidx.ink.nativeloader.NativeLoader; use ByteInk's transitive fork. |
| Bundled native missing while building | Build the four pinned native outputs, supply -PbyteinkLinuxLibrary / -PbyteinkLinuxArm64Library / -PbyteinkWindowsLibrary / -PbyteinkWindowsArm64Library, or bundle fewer with -PbyteinkBundledPlatforms=linux-x86_64,…; use matching ABI/pins. |
| Native cache cannot be written | Default loading falls back to a private temp directory. An explicit byteink.ink.cache is used as supplied and has no default-location fallback. |
| Windows native path fails under Zulu | Try an ASCII cache path such as -Dbyteink.ink.cache=C:/byteink-cache; pinned JBR 25 supports broader Unicode paths. |
Compose/Wasm: org_jetbrains_skia_Paint__1nMake is not a function, or a minified name such as xn is not a function, on some page loads |
Skia was used before Skiko's Wasm runtime loaded. Call awaitInkRendering() first when using Skia outside ComposeViewport content; see the WebAssembly guide. |
Compose/Wasm: blank drawing surface and Exception while trying to handle coroutine exception |
The browser could not create a WebGL2 context. Headless Firefox on a machine with no display needs one: run it under xvfb-run -a; see the WebAssembly guide. |
Native memory outlives collection, or a byteink native frees thread appears |
Expected: Ink objects free their native memory 250 ms after finalization, on that daemon thread. A native call still using an object the collector found unreachable would have to stall that long to read freed memory. |
| Drawing disappears at pointer release | Add the completed stroke to finished content and keep it in drawContent. |
| Pointer samples arrive but wet shape stalls | Schedule frames from hasPendingInputs and isUpdateNeeded; call advance, not only append. |
| Speculative tail remains when the pen stops | A custom session loop must schedule while needsAnimationTick() is true, then advance to expire predictions. Custom controller loops retract forecasts explicitly. |
| A second pointer is ignored | InkDrawingSurface has one controller/active pointer; use InkAuthoringSession or the native direct surfaces for simultaneous pointers. |
| Native subscription/thread exception | Subscribe/close on the AWT EDT, with a displayable component, one subscriber and its matching live native handle. |
Wayland backend still reports LINUX_XINPUT2 |
Selection uses the actual AWT toolkit. Run JBR 25 with -Dawt.toolkit.name=WLToolkit before AWT initializes. |
| Native Wayland package access fails | Add --add-opens=java.desktop/sun.awt.wl=ALL-UNNAMED and native access; see runtime setup. |
| Compose host fails under WLToolkit | Use JFrame plus ComposePanel(renderSettings = RenderSettings.SwingGraphics()), as in the native example, or a direct Swing panel. The tested heavyweight Compose/Skiko host assumes X11. |
| Requesting OpenGL does not accelerate the Wayland ink panel | The panel selects retained software Skia. Pinned Skiko's Linux Swing OpenGL redrawer uses GLX/X11; the isolated EGL experiment still requires readback. See Wayland GPU investigation. |
| Vulkan was requested but shared-memory presentation remains | Set sun.java2d.vulkan before AWT starts and inspect the visible panel's actual graphics configuration. JBR can fall back when native initialization is unavailable; a CPU Vulkan device also does not prove a hardware gain. |
| Native handle unavailable or stale after hide/show | Wayland surfaces exist after visible top-level configuration and change after hide/show. Recreate custom native sources; the built-in panel waits/reconnects. |
| Native Wayland pen axes are absent | Check device/compositor tablet-v2 support. Primary mouse and touch do not fabricate pen pressure. |
| XInput2 touch subscription cannot be acquired | Check for another exclusive touch selector on the same window and that the component's XID is correct. Acquisition failure is explicit. |
| Width/position wrong after zoom | Regular Compose maps page units to pixels with density/scroll/zoom. Direct panels use AWT logical units and apply device scale themselves. |
| Completed gestures retain wet renderer memory | Call releaseLiveStroke before custom-host completion/cancellation/reuse. Built-in direct panels wire this automatically; mesh live-cache diagnostics show retention. |
| Raster blurs under parent zoom | Use physical viewport sizing and the ancestor's uniform zoom as rasterScale. |
| Partial erase differs after reload | Round-trip mask geometry before preview/target collection; persist the erase and exact target links together. |
| Unknown/malformed row vanishes visually | Inspect unreadable; preserve the original row and bytes. Nullable decoding does not mean deletion. |
| Unsupported paint exception | Call canDraw; path rendering requires texture-free ANY/DISCARD paints. Mesh rendering needs compatible attributes and every selected paint's images in InkTextureStore; missing images try the next paint preference. |
| Texture replacement still shows the old image | Call InkMeshRenderer.clearCache() after replacing an image under the same client ID; this also invalidates retained view rasters. |
| Texture atlas stays on one frame | Advance the mesh renderer's nonnegative animationTimeMillis; live shape effects separately require InProgressStroke.updateShape. |
| Decoded replay cuts or moves ink twice | Supply LoadedInkPage.sourceStrokes and active decoded operations to ViveInkPage.replay, rather than already replayed strokes. |
Classes disappear during a parallel build¶
If tests report NoClassDefFoundError for ByteInk classes after compilation succeeds,
check whether a nested consumer build includes the checkout that is running the tests.
Gradle does not share the project lock between concurrent composite builds,
so a second build can replace compiled files while the first build is loading them.
The consumer smoke test stages the current source and selected native binaries,
then runs includeBuild against a private temporary copy. Published-artifact and
composite dependency checks both remain enabled.
Windows CI setup and fixture checks¶
Android artifact checksum differs: capture-environment.json can mean Git
converted the Android capture files from LF to CRLF during checkout. The root
.gitattributes disables text conversion for conformance/android/fixtures/matrix/**
so every captured byte matches its committed SHA-256. Keep these attributes when
copying the fixture into another repository; do not regenerate hashes to accept
checkout changes. See Git's text attribute documentation.
If JBR installation fails with tar (child): Cannot connect to D: resolve failed,
Git Bash's tar interpreted the archive's drive-letter prefix as a remote host.
The setup script converts the Windows extraction path with cygpath -u before
download and extraction, then exports the JVM home in Windows form with cygpath -w.
The pinned SDK's SHA-512 is still verified before extraction.
The Windows native pen tests need an interactive desktop, but not the foreground.
Windows routes pen input by screen position and hit-tests it against the composed
desktop. A contact injected right after a window appears can therefore reach the
window that was there in the previous composition, although WindowFromPoint
already returns the new one. The test injector calls
DwmFlush
before each pen-down. It fails with the covering process and window class if
another window would receive the contact.
Losing focus correctly cancels live ink, so the fixture must not depend on which
window a CI desktop activates. Consoles, runner start-up windows and other
processes can take the foreground at any time. Its window is always on top and
never activates: focusableWindowState = false makes AWT use WS_EX_NOACTIVATE.
Failure messages include the session state, the foreground window and the pen
target. Missing movement still fails the test; pressure, tilt, completion and
cancellation checks remain required.
Windows CI also runs gradlew.bat --stop before the cache action's cleanup.
This releases daemon-owned compiler cache locks that can make Git Bash's tar
report javaCompile.lock: Device or resource busy when saving the Gradle cache.
See Gradle's daemon shutdown documentation.
CI graphics verification¶
Linux CI discovers Mesa's installed lavapipe Vulkan manifest with
dpkg -L mesa-vulkan-drivers before setting VK_DRIVER_FILES and
VK_ICD_FILENAMES. Ubuntu packages can use lvp_icd.json or
lvp_icd.x86_64.json; a stale filename makes JBR fall back to shared memory.
A missing or ambiguous manifest fails the step. The presentation tests still
require the actual Vulkan destination at both scales; fallback is tested separately.
The EGL controls distinguish GPU surfaces from software rasters with
Surface.peekPixels. Avoid Surface.recordingContext with pinned Skiko 0.150.1:
its native getter
returns a borrowed pointer, while the
Kotlin getter
creates an owning DirectContext. Garbage collection of that temporary wrapper
can free the active context and crash later rendering. Linux CI report artifacts
include hs_err_pid*.log when the JVM writes a native crash report.
Inspect native provenance¶
import com.vivenotes.byteink.core.InkRuntime
val native = InkRuntime.load()
println("${native.origin}: ${native.path} SHA-256=${native.sha256}")
Configure loader properties before any Ink class triggers native loading:
| JVM property | Value |
|---|---|
byteink.ink.cache |
Extraction directory; explicit cache replaces default locations |
byteink.ink.library |
Absolute path to a matching native build; bypasses bundled extraction |
Default caches: $XDG_CACHE_HOME/byteink/natives or ~/.cache/byteink/natives on Linux; %LOCALAPPDATA%/byteink/natives on Windows. Each binary is stored under its SHA-256 directory. Changing properties after loading does not replace the process's native library.