johanvos / quantumjava

Samples related to "Quantum Computing for Java Developers"
BSD 3-Clause "New" or "Revised" License
134 stars 34 forks source link

mvn javafx:run error on silicon Mac #28

Open mik3hall opened 1 month ago

mik3hall commented 1 month ago

I was trying to run one of the examples, ch07 randombitdebug, on my current machine.

Model Name: MacBook Pro Model Identifier: Mac15,6 Model Number: MRX33LL/A Chip: Apple M3 Pro Total Number of Cores: 11 (5 performance and 6 efficiency) Memory: 18 GB

echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk-22.0.1.jdk/Contents/Home

I manually set this in case this was related to maven using it's own jdk.

I receive the following error, not sure if this is quantumjava, maven, javafx, or java version.

Oct 18, 2024 6:00:03 PM com.sun.glass.ui.mac.MacApplication lambda$waitForReactivation$6 WARNING: Timeout while waiting for app reactivation JavaFX Platform initialized 2024-10-18 18:00:03.997 java[12896:437447] Assertion failure in -[_NSTrackingAreaAKViewHelper removeTrackingRect:], _NSTrackingAreaAKManager.m:1812 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.' *** First throw call stack: ( 0 CoreFoundation 0x00007ff80691389e exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007ff806403d5b objc_exception_throw + 48 2 Foundation 0x00007ff8078765b6 -[NSCalendarDate initWithCoder:] + 0 3 AppKit 0x00007ff80a662331 -[_NSTrackingAreaAKViewHelper removeTrackingRect:] + 199 4 libglass.dylib 0x000000012dc0d299 -[GlassViewDelegate setFrameSize:] + 361 5 libglass.dylib 0x000000012dc12b58 -[GlassView3D setFrameSize:] + 88 6 AppKit 0x00007ff809eb1cf6 -[NSView setFrame:] + 347 7 libglass.dylib 0x000000012dc12bb5 -[GlassView3D setFrame:] + 69 8 AppKit 0x00007ff809ec1d06 -[NSView resizeWithOldSuperviewSize:] + 827 9 AppKit 0x00007ff809ec15a7 -[NSView resizeSubviewsWithOldSize:] + 503 10 AppKit 0x00007ff809ea1a0b -[NSView setFrameSize:] + 1461 11 AppKit 0x00007ff809eb1cf6 -[NSView setFrame:] + 347 12 AppKit 0x00007ff809ec1d06 -[NSView resizeWithOldSuperviewSize:] + 827 13 AppKit 0x00007ff809ec15a7 -[NSView resizeSubviewsWithOldSize:] + 503 14 AppKit 0x00007ff809ea1a0b -[NSView setFrameSize:] + 1461 15 AppKit 0x00007ff809ec000a -[NSThemeFrame setFrameSize:] + 466 16 AppKit 0x00007ff809ebf712 -[NSWindow _oldPlaceWindow:fromServer:] + 811 17 AppKit 0x00007ff809ebe5df -[NSWindow _setFrameCommon:display:fromServer:] + 3033 18 libglass.dylib 0x000000012dc047cf -[GlassWindow(Java) _setFlipFrame:display:animate:] + 239 19 libglass.dylib 0x000000012dc042cb -[GlassWindow(Java) _setWindowFrameWithRect:withDisplay:withAnimate:] + 283 20 libglass.dylib 0x000000012dc044dd -[GlassWindow(Java) _setBounds:y:xSet:ySet:w:h:cw:ch:] + 509 21 libglass.dylib 0x000000012dc1e160 Java_com_sun_glass_ui_mac_MacWindow1setBounds2 + 448 22 ??? 0x000000011e8fa78b 0x0 + 4807698315 ) libc++abi: terminating due to uncaught exception of type NSException [ERROR] Command execution failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 134 (Exit value: 134) at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404) at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166) at org.openjfx.JavaFXBaseMojo.executeCommandLine (JavaFXBaseMojo.java:567) at org.openjfx.JavaFXBaseMojo.executeCommandLine (JavaFXBaseMojo.java:434) at org.openjfx.JavaFXRunMojo.execute (JavaFXRunMojo.java:105) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103) at java.lang.reflect.Method.invoke (Method.java:580) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348) org.apache.commons.exec.ExecuteException: Process exited with an error: 134 (Exit value: 134) at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404) at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166) at org.openjfx.JavaFXBaseMojo.executeCommandLine(JavaFXBaseMojo.java:567) at org.openjfx.JavaFXBaseMojo.executeCommandLine(JavaFXBaseMojo.java:434) at org.openjfx.JavaFXRunMojo.execute(JavaFXRunMojo.java:105) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283) at org.apache.maven.cli.MavenCli.main(MavenCli.java:206) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348)

mik3hall commented 1 month ago

I am doing a MacOS application where this does work (still with some rendering issues), so probably related specifically to mvn javafx:run I would think.

I added my MacOS app as a GitHub project - https://github.com/mik3hall/qcapp

johanvos commented 2 weeks ago

Thanks for reporting. The dependencies need an update -- I'll look into that. I'll check your sample code to make sure it works with the new dependencies.

mik3hall commented 1 week ago

The sample code is yours. I was comparing its rendering to my application's.