archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
914 stars 267 forks source link

[Mac] Crash to desktop when Cmd-Z pressed in text control #1018

Open rxcolvin opened 5 months ago

rxcolvin commented 5 months ago

Happens randomly: actual state is lost, due to crash

Version of Archi

5.2.0

Archi Plug-ins

jArchi, coArchi

Operating System

Macos 13.6.1

Expected Behaviour

When I select undo the program should not crash

Actual Behaviour

Very occasionally after selecting undo archi crashes - log attached

Steps to Reproduce the Behaviour

  1. No specific steps - just when undo is selected - happens infrequently, at random (seemingly)
  2. archi-crash.txt archi-error-log.txt

Phillipus commented 5 months ago

Hi, I can't say why this might crash from the first log, but some log messages in the second log show that coArchi is not being loaded properly. The only thing I can suggest is to download and re-install Archi 5.2.0 and re-install the coArchi plug-in.

Phillipus commented 2 weeks ago

I'm re-opening this issue as I have figured out the cause is in Eclipse SWT - see https://github.com/eclipse-platform/eclipse.platform.swt/issues/1273

To reproduce this in Archi (don't do this unless you want a crash to desktop):

  1. Start Archi fresh
  2. Click on an element in a View to edit its name
  3. Type some characters and then press Escape
  4. Click on an element in a View to edit its name
  5. Press Cmd-Z

Or:

  1. Start Archi fresh
  2. Click on an element in a View to edit its name
  3. Type some characters and then press Escape
  4. Click on the "Name" text field in the Properties view
  5. Press Cmd-Z

It seems that the trigger is to type some characters into a multi-text control, dispose of it and then press Cmd-Z in another text control (single or multi)

rxcolvin commented 2 weeks ago

👍 👍

Phillipus commented 2 weeks ago

I have a workaround for the next version of Archi. Cmd-Z key presses will be disabled in some single-line text controls on Mac. This means local undo/redo when editing text in some single-line text controls will not work. Until/if a proper fix is found in Eclipse SWT I think this compromise is preferable to a complete crash to desktop.