Title: FX2D crashes on macOS: bundled JavaFX 17.0.2 has a known libglass bug (`NSTrackingRectTag`); fix is updating JavaFX · Issue #1593 · processing/processing4 · GitHub
Open Graph Title: FX2D crashes on macOS: bundled JavaFX 17.0.2 has a known libglass bug (`NSTrackingRectTag`); fix is updating JavaFX · Issue #1593 · processing/processing4
X Title: FX2D crashes on macOS: bundled JavaFX 17.0.2 has a known libglass bug (`NSTrackingRectTag`); fix is updating JavaFX · Issue #1593 · processing/processing4
Description: Most appropriate sub-area of Processing 4? Core/Environment/Rendering Processing version 4.5.7 Operating system macOS 27.2.1 Bug description On macOS, any sketch using size(w, h, FX2D) crashes when its window is created. This started aro...
Open Graph Description: Most appropriate sub-area of Processing 4? Core/Environment/Rendering Processing version 4.5.7 Operating system macOS 27.2.1 Bug description On macOS, any sketch using size(w, h, FX2D) crashes when...
X Description: Most appropriate sub-area of Processing 4? Core/Environment/Rendering Processing version 4.5.7 Operating system macOS 27.2.1 Bug description On macOS, any sketch using size(w, h, FX2D) crashes when...
Opengraph URL: https://github.com/processing/processing4/issues/1593
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"FX2D crashes on macOS: bundled JavaFX 17.0.2 has a known libglass bug (`NSTrackingRectTag`); fix is updating JavaFX","articleBody":"### Most appropriate sub-area of Processing 4?\n\nCore/Environment/Rendering\n\n### Processing version\n\n4.5.7\n\n### Operating system\n\nmacOS 27.2.1\n\n### Bug description\n\nOn macOS, any sketch using `size(w, h, FX2D)` crashes when its window is created. This started around Processing 4.5.2. The JavaFX library from the Contribution Manager (version 1280, \"4.0 beta 5\") still bundles **JavaFX 17.0.2**, and that version has a known macOS bug in its native glass layer.\n\n```\n*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '0x0 is an invalid NSTrackingRectTag. Common possible reasons for this are: 1. already removed this trackingRectTag, 2. Truncated the NSTrackingRectTag to 32bit at some point.'\n*** First throw call stack:\n(\n\t0 CoreFoundation 0x00000001932917b0 __exceptionPreprocess + 176\n\t1 libobjc.A.dylib 0x000000018eeec65c objc_exception_throw + 88\n\t2 Foundation 0x000000018f7a0538 -[NSCalendarDate initWithCoder:] + 0\n\t3 AppKit 0x00000001995562a0 -[_NSTrackingAreaAKViewHelper removeTrackingRect:] + 196\n\t4 libglass.dylib 0x000000014ca1f03c -[GlassViewDelegate setFrameSize:] + 360\n\t5 libglass.dylib 0x000000014ca24134 -[GlassView3D setFrameSize:] + 92\n\t6 AppKit 0x0000000198f04134 -[NSView setFrame:] + 320\n\t7 libglass.dylib 0x000000014ca24194 -[GlassView3D setFrame:] + 76\n\t8 AppKit 0x0000000198f10bd0 -[NSView resizeWithOldSuperviewSize:] + 496\n\t9 AppKit 0x0000000198f10564 -[NSView resizeSubviewsWithOldSize:] + 380\n\t10 AppKit 0x0000000198ef63d4 -[NSView setFrameSize:] + 968\n\t11 AppKit 0x0000000198f04134 -[NSView setFrame:] + 320\n\t12 AppKit 0x0000000198f10bd0 -[NSView resizeWithOldSuperviewSize:] + 496\n\t13 AppKit 0x0000000198f10564 -[NSView resizeSubviewsWithOldSize:] + 380\n\t14 AppKit 0x0000000198ef63d4 -[NSView setFrameSize:] + 968\n\t15 AppKit 0x0000000198f0f6d0 -[NSThemeFrame setFrameSize:] + 268\n\t16 AppKit 0x0000000198f0f018 -[NSWindow _oldPlaceWindow:fromServer:] + 632\n\t17 AppKit 0x0000000198f0e440 -[NSWindow _setFrameCommon:display:fromServer:] + 1888\n\t18 libglass.dylib 0x000000014ca2f150 Java_com_sun_glass_ui_mac_MacWindow__1setBounds2 + 416\n\t19 ??? 0x000000011ab63c20 0x0 + 4743117856\n\t20 ??? 0x000000011ab5e6ac 0x0 + 4743095980\n\t21 ??? 0x000000011ab5e6ac 0x0 + 4743095980\n\t22 ??? 0x000000011ab5e6ac 0x0 + 4743095980\n\t23 ??? 0x000000011ab5f09c 0x0 + 4743098524\n\t24 ??? 0x000000011ab5e6ac 0x0 + 4743095980\n\t25 ??? 0x000000011ab5e6ac 0x0 + 4743095980\n\t26 ??? 0x000000011ab5e6ac 0x0 + 4743095980\n\t27 ??? 0x000000011ab5e6ac 0x0 + 4743095980\n\t28 ??? 0x000000011ab5e6ac 0x0 + 4743095980\n\t29 ??? 0x000000011ab5e6ac 0x0 + 4743095980\n\t30 ??? 0x000000011ab5e6ac 0x0 + 4743095980\n\t31 ??? 0x000000011ab5e6ac 0x0 + 4743095980\n\t32 ??? 0x000000011ab5e6ac 0x0 + 4743095980\n\t33 ??? 0x000000011ab5f09c 0x0 + 4743098524\n\t34 ??? 0x000000011ab5e270 0x0 + 4743094896\n\t35 ??? 0x00000001137a9278 0x0 + 4621767288\n\t36 ??? 0x000000011ab5e270 0x0 + 4743094896\n\t37 ??? 0x000000011ab5e6ac 0x0 + 4743095980\n\t38 ??? 0x000000011ab5f09c 0x0 + 4743098524\n\t39 ??? 0x000000011ab58140 0x0 + 4743070016\n\t40 libjvm.dylib 0x000000010af39cf4 _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread + 984\n\t41 libjvm.dylib 0x000000010af98f74 _ZL20jni_invoke_nonstaticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP10JavaThread + 916\n\t42 libjvm.dylib 0x000000010af9d690 jni_CallVoidMethod + 312\n\t43 libglass.dylib 0x000000014ca1aa58 -[GlassRunnable run] + 92\n\t44 Foundation 0x000000018f70aea0 __NSThreadPerformPerform + 264\n\t45 CoreFoundation 0x0000000193221920 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28\n\t46 CoreFoundation 0x00000001932218b4 __CFRunLoopDoSource0 + 224\n\t47 CoreFoundation 0x00000001932215ec __CFRunLoopDoSources0 + 232\n\t48 CoreFoundation 0x00000001932201bc __CFRunLoopRun + 832\n\t49 CoreFoundation 0x00000001932fac10 _CFRunLoopRunSpecificWithOptions + 536\n\t50 HIToolbox 0x000000019d9d85e0 RunCurrentEventLoopInMode + 320\n\t51 HIToolbox 0x000000019d9db96c ReceiveNextEventCommon + 492\n\t52 HIToolbox 0x000000019db61db8 _BlockUntilNextEventMatchingListInMode + 48\n\t53 AppKit 0x000000019920c8c0 _DPSBlockUntilNextEventMatchingListInMode + 292\n\t54 AppKit 0x0000000198ecb59c _DPSNextEvent + 576\n\t55 AppKit 0x00000001996625f8 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 832\n\t56 AppKit 0x00000001996620e8 -[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:] + 344\n\t57 libosxapp.dylib 0x0000000109ec7708 -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 136\n\t58 AppKit 0x0000000198ebe920 -[NSApplication run] + 396\n\t59 libosxapp.dylib 0x0000000109ec7528 +[NSApplicationAWT runAWTLoopWithApp:] + 132\n\t60 libawt_lwawt.dylib 0x000000010a1cf524 +[AWTStarter starter:headless:] + 380\n\t61 libosxapp.dylib 0x0000000109ec8d40 +[ThreadUtilities invokeBlockCopy:] + 28\n\t62 Foundation 0x000000018f70aea0 __NSThreadPerformPerform + 264\n\t63 CoreFoundation 0x0000000193221920 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28\n\t64 CoreFoundation 0x00000001932218b4 __CFRunLoopDoSource0 + 224\n\t65 CoreFoundation 0x00000001932215ec __CFRunLoopDoSources0 + 232\n\t66 CoreFoundation 0x00000001932201bc __CFRunLoopRun + 832\n\t67 CoreFoundation 0x00000001932fac10 _CFRunLoopRunSpecificWithOptions + 536\n\t68 libjli.dylib 0x0000000105039174 CreateExecutionEnvironment + 404\n\t69 libjli.dylib 0x0000000105035188 JLI_Launch + 1232\n\t70 java 0x0000000104ff3b9c main + 408\n\t71 dyld 0x000000018ef88d7c start + 6652\n)\nlibc++abi: terminating due to uncaught exception of type NSException\nCould not run the sketch (Target VM failed to initialize).\nFor more information, read Help → Troubleshooting.\n```\n\nThe key line is:\n`NSInternalInconsistencyException: 0x0 is an invalid NSTrackingRectTag`\n\n### Root cause\n\n- The bug is in JavaFX's `GlassViewDelegate.m` (`libglass.dylib`), not in Processing or the JDK. It crashes only when the running JDK was built against the macOS 13+ SDK. See [JDK-8296654](https://bugs.openjdk.org/browse/JDK-8296654) / [JDK-8297131](https://bugs.openjdk.org/browse/JDK-8297131).\n- Processing 4.5.x now bundles Temurin 17.0.20.1, which is built that way, so the library's old JavaFX 17.0.2 crashes.\n- Other projects hit the same crash and fixed it by updating JavaFX. Upgrading the JDK did not help them. See [adoptium-support#1043](https://github.com/adoptium/adoptium-support/issues/1043) and [openjfx/javafx-gradle-plugin#182](https://github.com/openjfx/javafx-gradle-plugin/pull/182).\n\n### Proposed fix\n\nIn [processing4-javafx `build.xml`](https://github.com/processing/processing4-javafx/blob/main/build.xml), change `gluon.version` from `17.0.2` to `17.0.21`, the current 17 LTS release, then rebuild and republish the library.\n\nStaying on 17.x keeps the API that `javafx.jar` was compiled against, including its `com.sun.*` usage (processing4-javafx#14). JavaFX 21.0.x should also work with JDK 17 if a bigger jump is preferred.\n\n### Workaround (tested)\n\nIn `libraries/javafx/library/macos-aarch64/`, replace the old JavaFX files with the ones from the Gluon [OpenJFX 17.0.21 SDK](https://gluonhq.com/products/javafx/) for macOS aarch64:\n- the 7 `javafx.*.jar` files in `modules/`\n- all of the `.dylib` files\n\n`javafx.jar` does not need rebuilding. After this change, FX2D sketches run normally.\n\n\n### Steps to reproduce this\n\n1. Use FX2D renderer\n\n\n### snippet\n\n```processing\nimport processing.javafx.*;\n\nvoid setup() {\n size(400, 400, FX2D);\n}\n\nvoid draw() {\n ellipse(200, 200, 100, 100);\n}\n```\n\n\n### Additional context\n\nThis issue is separate from earlier JavaFX module and classpath work, but it comes up right after it. Once [#1345](https://github.com/processing/processing4/pull/1345) let FX2D load its modules, sketches now get far enough to create a window and hit this native crash.\n- processing/processing4-javafx#17: Add modules for JavaFX\n- #1327: JavaFX Requires 'code' Folder to Run (closed by #1345)\n\n\n### Would you like to work on the issue?\n\nNo, I’m just reporting the issue","author":{"url":"https://github.com/azalea666","@type":"Person","name":"azalea666"},"datePublished":"2026-11-13T03:12:25Z","url":"https://github.com/processing/processing4/issues/1593"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c4029a4b-828f-0f3b-8766-0e7cbe4f13e6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D508:2F9BC:12DD68:1948E8:6B05F791 |
| html-safe-nonce | 15ad4d6353926e5f5093425d056dffb5dee9438450c3dad1d0c361b02d1a3312 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTA4OjJGOUJDOjEyREQ2ODoxOTQ4RTg6NkIwNUY3OTEiLCJ2aXNpdG9yX2lkIjoiMjEyMTMxMDAwNzQyNDU3OTQ3MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1428c7a64bc657ad93f7cbb16735ca486b27d4888ea71d935b5d7ec8779d28c0 |
| hovercard-subject-tag | issue:6363884892 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/processing/processing4/1593/issue_layout |
| twitter:image | https://opengraph.githubassets.com/50b54bedf918f0322747baef63c721cdac1e196eae4b3879a0535194d2b68ec1/processing/processing4/issues/1593 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/50b54bedf918f0322747baef63c721cdac1e196eae4b3879a0535194d2b68ec1/processing/processing4/issues/1593 |
| og:image:alt | Most appropriate sub-area of Processing 4? Core/Environment/Rendering Processing version 4.5.7 Operating system macOS 27.2.1 Bug description On macOS, any sketch using size(w, h, FX2D) crashes when... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | azalea666 |
| hostname | github.com |
| expected-hostname | github.com |
| None | c214754a6652274794ed4e054a7b71be999d69843f103ba54893001d45010ece |
| turbo-cache-control | no-preview |
| go-import | github.com/processing/processing4 git https://github.com/processing/processing4.git |
| octolytics-dimension-user_id | 1617169 |
| octolytics-dimension-user_login | processing |
| octolytics-dimension-repository_id | 844382769 |
| octolytics-dimension-repository_nwo | processing/processing4 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 844382769 |
| octolytics-dimension-repository_network_root_nwo | processing/processing4 |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7d164a4e71eb333b2b17fd5b17e18efb7855505c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width