Skip to content

Troubleshooting

Each section starts from what you see, then lists the checks in the order that finds the cause fastest. Run your application with the dev jar while you look for a problem: JOID then prints a [JOID] … warning for most of the mistakes below, and Warnings and errors explains each message.

  1. No UI is open. Check that your program calls JOID.open after the register() of the backend, and that Escape did not close the screen.
  2. The loop never draws. Each turn of your loop must call frame() on the backend, then present the image (Choosing a backend).
  3. Your UI has no backdrop, and the window background is black. A UI draws nothing behind its nodes unless its UIData sets background = true (UIs), and the window background is black until you change it (Style the window UI bridge): dark nodes on it look like nothing.

Opening a UI throws “No IUIBridge can open”

Section titled “Opening a UI throws “No IUIBridge can open””

JOID.open(...) ran before any UI bridge was registered, so nothing could receive the UI.

  1. Open your first UI after the register() of the backend.
  2. In code that does not control the startup order, such as a library, give the call to JOID.onReady(...) (Run code once JOID is ready).
  1. It is not attached. A node shows only once attached, to the UI with attach(this) or to a parent node (Nodes and the tree).
  2. It is created in the constructor of the UI. Create every node in init() (UIs).
  3. It is outside the window. Positions are in design pixels on the 1920 × 1080 canvas, and a child is placed relative to its parent: a child at 900 of a parent at 1500 sits at 2400, off the canvas.
  4. It is hidden or covered. Look for a visible(false) on it or on a parent, for a parent that clips its children, and for a node drawn above it (Position and size).
  5. Its color matches what is behind it, or its alpha is 0.

With the dev jar, the inspector shows which nodes sit under the mouse (Dev tools).

  1. The text has the color of what is behind it. The color of a text is in its TextInfo, black by default.
  2. The characters are not in the font. A generated atlas holds the characters from U+0020 to U+0233 (MSDF text).
  3. The text node has no text. A TextNode draws the Text given to text(...), and nothing without it.

JOID ships no font for your application: Fonts shows how to load yours.

  1. The window is much smaller than the canvas. JOID scales the 1920 × 1080 canvas to fit the window, so a font size of 24 design pixels draws at 16 screen pixels in a window of 1280 × 720: size the texts for the smallest window you support (The design canvas, Small text).
  2. An image is drawn larger than its source. Scaling an image up blurs it: give a source as large as the largest window shows it (Show an image) and use Resource.nearest for pixel art (Fit, tint and crop).
  3. The node is rotated or drawn in 3D. JOID smooths its edges over one screen pixel instead of snapping them to the pixel grid (Rotated and 3D drawing is not snapped).
  1. The resource cannot be read. In dev mode, JOID draws a magenta and black checkerboard in its place and prints [JOID] The resource … cannot be read: … with the cause; with the prod jar, it draws nothing.
  2. The path is wrong. A path without a scheme is read from the classpath, then as a file; a URL needs its scheme, such as https:.
  3. The format is not supported. Images and media lists the formats JOID reads.

A node follows a value only when JOID can compute it again (Signals).

  1. The value is not a signal. A plain field or a local variable, read once, never updates the node: hold it in a signal.
  2. JOID could not follow the expression. A lambda inside the expression, or a local variable in a calculation, leaves it fixed, and the dev jar prints [JOID] … but cannot follow it: … with the line, the reason and the fix (What JOID follows).
  3. The signal object was replaced. A node follows the signal it read: give the existing signal a value with set(...) instead of creating another signal.
  4. The number of nodes depends on the value. Rows that follow a list need a rebuild (Rebuilding the tree).
  1. Another node is on top. The press goes to the topmost node under the pointer, and a node drawn above yours takes it (Events).
  2. The node is disabled, or a parent is: enabled(false) turns off its reactions.
  3. A popup is open. While a popup is open, the UIs under it receive no input (Overlays and popups).
  4. The listener is on another node. onClick on a child does not fire when the press lands on the parent outside the child.

The window UI bridge has no text style for them, because JOID ships no font. Give it one with hoverInfo(...) (Style the window UI bridge); in dev mode, JOID warns about it once.

The first time a font loads on a machine, JOID generates its atlas and keeps it in the cache folder; later launches read it back (What happens when a font loads). The first video also downloads the FFmpeg natives into the cache folder (Play videos on every machine).

  1. The program was killed. JOID saves stores and properties when a UI closes, and closes the open UIs when the JVM shuts down normally; a killed process saves nothing (Close the UIs before the program ends).
  2. The store is not permanent. Only a store of scope PERMANENT writes a file (Stores and remembered properties).
  3. The working directory changed. The data folder is relative to the working directory by default (Where JOID stores files).

A screen and a popup close on Escape unless a node consumes the key first. Set closeable = false in the @UIData of the UI (Know who receives the keyboard).

The inspector and the reload exist only in the dev jar. Check the line JOID prints when it loads: without in dev mode, a prod jar is on the classpath (Installation).

Start the JVM with -XstartOnFirstThread for the LWJGL 3 and Vulkan backends (Choosing a backend).

Report a problem with this page