Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple M2 Mirth Connect JDK17 issue #6026

Open
MatthiasDM opened this issue Dec 14, 2023 · 23 comments
Open

Apple M2 Mirth Connect JDK17 issue #6026

MatthiasDM opened this issue Dec 14, 2023 · 23 comments
Labels
bug Something isn't working Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-12093 triaged

Comments

@MatthiasDM
Copy link

Describe the bug
Running Mirth Connect using JDK 17 produces a non working Channels and Dashboard.
Occurs only on Mac M2 afaik!

To Reproduce
Setup steps (if required). Example:

  1. Setup Mirth Connect Administrator Launces to used the bundled JDK17 (or any other JDK17)
  2. Check show java console
  3. Start Mirth Connect

Steps to reproduce the behavior:

  1. Go to Channels
  2. Click on a row in the table
  3. View the debug logs.
  4. See error

Additional context
I need JDK 17 to develop a plugin that uses dependencies compiled with jdk > 8.

@MatthiasDM MatthiasDM added the bug Something isn't working label Dec 14, 2023
@jonbartels
Copy link
Contributor

@MatthiasDM what errors are logged?

Is this similar?
#5975

@MatthiasDM
Copy link
Author

MatthiasDM commented Dec 14, 2023

Ah yes it is exactly that.

Using Using JRE version 17.0.6+10-LTS OpenJDK 64-Bit Server VM

Also tried with Zulu JDK, with and without JavaFX.

The only version so far that works is the bundled java 8, but that is too old for my plugin development.

java.lang.IllegalArgumentException: column must be valid, was-1 at org.jdesktop.swingx.JXTreeTable.isHierarchical(JXTreeTable.java:2022) at org.jdesktop.swingx.JXTreeTable.getEditingRow(JXTreeTable.java:1162) at java.desktop/javax.swing.JTable$AccessibleJTable.getAccessibleAt(Unknown Source) at java.desktop/sun.lwawt.macosx.CAccessibility$23.call(Unknown Source) at java.desktop/sun.lwawt.macosx.CAccessibility$23.call(Unknown Source) at java.desktop/sun.lwawt.macosx.LWCToolkit$CallableWrapper.run(Unknown Source) at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

@ab-mg-23
Copy link

Crazy out of left field idea: Can you try disabling all the OSX Accessibility features and see if it still bombs out? The part of the stack trace that caught my attention was:

java.desktop/javax.swing.JTable$AccessibleJTable.getAccessibleAt(Unknown Source) at
java.desktop/sun.lwawt.macosx.CAccessibility$23.call(Unknown Source) at
java.desktop/sun.lwawt.macosx.CAccessibility$23.call(Unknown Source) at
java.desktop/sun.lwawt.macosx.LWCToolkit$CallableWrapper.run(Unknown Source) at 

@jonbartels
Copy link
Contributor

I looked at this issue. I googled for similar errors. The apparent solution seems to be to add an if column == -1 test to prevent the error.

I searched the Mirth code to see how it used JXTreeTable.

I can see the code being used in Mirth but it is not clear how that code is actually called. Based on the stack trace and the bug report, "Click on a row in the table", is it the onClick listener? I am not sure how to find it, but I think there is a click handler that is missing the colIndex == -1 check.

Here is one implementation but its for the header click, not the row click:

public void setColumnAndToggleSortOrder(int column) {

Which class handles the row click for the Channel view?

@MatthiasDM
Copy link
Author

Crazy out of left field idea: Can you try disabling all the OSX Accessibility features and see if it still bombs out? The part of the stack trace that caught my attention was:

java.desktop/javax.swing.JTable$AccessibleJTable.getAccessibleAt(Unknown Source) at
java.desktop/sun.lwawt.macosx.CAccessibility$23.call(Unknown Source) at
java.desktop/sun.lwawt.macosx.CAccessibility$23.call(Unknown Source) at
java.desktop/sun.lwawt.macosx.LWCToolkit$CallableWrapper.run(Unknown Source) at 

I have tried this but that did not work. Any other ideas?

@jonbartels
Copy link
Contributor

This issue bit me today.

I am on an M1 Macbook on Sonoma 14.2. I had an instance fail in the same way as Matthias on Java 17 but it worked fine on Java 8.

@ARShelleyNextGen - Check out this thread for MacOS support. Short version is that users on M1 and M2 Macs running Sonoma get errors from Mirth under Java 17 from the Launcher but not Java 8. The community is pecking at the issue but it might require the big guns from NextGen. This should also be important to NextGen so Mirth can run on later MacOS systems with modern Java versions.

@MatthiasDM
Copy link
Author

With regards to the release yesterday of 4.5.0 i saw that from 4.7.0 the minimum java required will be java 11.

Does this mean that if this bug is not fixed in 4.7.0, the application will not work anymore (or at least, not workable) on Apple M2 chips. Because for clarity, this bug occurs with java versions > 8.

@DevSysEngineer
Copy link

Dear all,

I am having exactly the same problem and my colleagues with the same hardware specifications are also facing the same problem. When I checked the Java console, I found that one error always comes back. When this error occurs, the interface will be slow and not always responsive to my clicks.

Hardware:
15-inch, M2, 2023
OS: Sonoma 14.3.1 (23D60)
Mirth Connect Administrator launcher 1.4.51 Java 17 bundled

java.lang.IllegalArgumentException: column must be valid, was-1
	at org.jdesktop.swingx.JXTreeTable.isHierarchical(JXTreeTable.java:2022)
	at org.jdesktop.swingx.JXTreeTable.getEditingRow(JXTreeTable.java:1162)
	at java.desktop/javax.swing.JTable$AccessibleJTable.getAccessibleAt(Unknown Source)
	at java.desktop/sun.lwawt.macosx.CAccessibility$23.call(Unknown Source)
	at java.desktop/sun.lwawt.macosx.CAccessibility$23.call(Unknown Source)
	at java.desktop/sun.lwawt.macosx.LWCToolkit$CallableWrapper.run(Unknown Source)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

@pacmano1
Copy link
Collaborator

pacmano1 commented Feb 20, 2024

If any of you set display (scaling) to "Default" and turn off all accessibility settings does this persist? Curious.

I mean:

image

@DevSysEngineer
Copy link

Hello @pacmano1,

I configured my display settings to default settings, but still the same problem.

Scherm­afbeelding 2024-02-21 om 10 14 29 Scherm­afbeelding 2024-02-21 om 10 13 27 Scherm­afbeelding 2024-02-21 om 10 11 52

@TSteenhoven
Copy link

@pacmano1

Is also tried to only use the default text-size, I had it on the highest setting.
Alas, still the same error as @DevSysEngineer :

Scherm­afbeelding 2024-02-28 om 20 33 51 Scherm­afbeelding 2024-02-28 om 20 34 28 Scherm­afbeelding 2024-02-28 om 20 34 34

Error:
column must be valid, was-1
java.lang.IllegalArgumentException: column must be valid, was-1
at org.jdesktop.swingx.JXTreeTable.isHierarchical(JXTreeTable.java:2022)
at org.jdesktop.swingx.JXTreeTable.getEditingRow(JXTreeTable.java:1162)
at java.desktop/javax.swing.JTable$AccessibleJTable.getAccessibleChild(Unknown Source)
at java.desktop/javax.swing.JTable$AccessibleJTable.getAccessibleAt(Unknown Source)
at java.desktop/javax.swing.JTable$AccessibleJTable.valueChanged(Unknown Source)
at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
at java.desktop/javax.swing.DefaultListSelectionModel.setSelectionInterval(Unknown Source)
at java.desktop/javax.swing.DefaultListSelectionModel.addSelectionInterval(Unknown Source)
at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.resetRowSelection(Unknown Source)
at org.jdesktop.swingx.JXTreeTable$ListToTreeSelectionModelWrapper.resetRowSelection(JXTreeTable.java:2146)
at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(Unknown Source)
at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(Unknown Source)
at com.mirth.connect.client.ui.editors.BaseEditorPane.addNewElement(BaseEditorPane.java:486)
at com.mirth.connect.client.ui.editors.BaseEditorPane.addNewElement(BaseEditorPane.java:404)
at com.mirth.connect.client.ui.editors.filter.FilterPane.addNewElement(FilterPane.java:198)
at com.mirth.connect.client.ui.editors.BaseEditorPane.doAddNewElement(BaseEditorPane.java:398)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at sun.reflect.misc.Trampoline.invoke(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.base/sun.reflect.misc.MethodUtil.invoke(Unknown Source)
at java.desktop/java.beans.EventHandler.invokeInternal(Unknown Source)
at java.desktop/java.beans.EventHandler$1.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.desktop/java.beans.EventHandler.invoke(Unknown Source)
at jdk.proxy2/jdk.proxy2.$Proxy66.actionPerformed(Unknown Source)
at org.jdesktop.swingx.action.BoundAction.actionPerformed(BoundAction.java:231)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at org.jdesktop.swingx.JXHyperlink.fireActionPerformed(JXHyperlink.java:264)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.desktop/java.awt.Component.processEvent(Unknown Source)
at java.desktop/java.awt.Container.processEvent(Unknown Source)
at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

@pacmano1
Copy link
Collaborator

I am dying here also. I can reproduce it now consistently which is a bit of a help, but still no clue why it is happening.

@martindruart
Copy link

I have the same problem

@DevSysEngineer
Copy link

Did someone any status update or fix? It's not workable on a MacBook with this issue.

@ARShelleyNextGen
Copy link
Collaborator

At this time, we do not have a timeline. I will raise awareness with our product team and see if we can provide any further update related potential consideration of when this will be targeted/planned or addressed.

cc: @JackieK5

@hgolov
Copy link

hgolov commented Mar 14, 2024

Hi all! I was experiencing the same issue, but then noticed that I could select the Java version on the Launch interface. I selected Java 8 instead of Java 17 and it's now working perfectly! I hope this helps someone.

@MatthiasDM
Copy link
Author

Hi all! I was experiencing the same issue, but then noticed that I could select the Java version on the Launch interface. I selected Java 8 instead of Java 17 and it's now working perfectly! I hope this helps someone.

Indeed, this is what i do now, but the problem is that as of version 4.7.0 the minimum java required will be java 11.

@pacmano1
Copy link
Collaborator

Actually even with Java 8 I still have problems on M2 so it is not a guaranteed fix.

@MatthiasDM
Copy link
Author

@hgolov
Copy link

hgolov commented Mar 18, 2024

Thanks for the heads up!

@DevSysEngineer
Copy link

Any status update on this? We are still facing problems...

@pladesma pladesma added triaged Internal-Issue-Created An issue has been created in NextGen's internal issue tracker labels Apr 3, 2024
@TSteenhoven
Copy link

For the time being I'm probably forced to go back to our intel Macbooks, as no combination of Mirth and Java (8,11,17) provides a solution to the problem.

Is there something that we can provide to help with analysis of the problem?

@yimengZJl
Copy link

I had the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-12093 triaged
Projects
None yet
Development

No branches or pull requests