AlloyTools / org.alloytools.alloy

Alloy is a language for describing structures and a tool for exploring them. It has been used in a wide range of applications from finding holes in security mechanisms to designing telephone switching networks. This repository contains the code for the tool.
Other
695 stars 124 forks source link

Load Theme... > Don't Save => #169

Closed esb-dev closed 2 years ago

esb-dev commented 2 years ago

Can you reproduce the following (strange behavour)?

  1. Open visualization of some instance of a specification
  2. Change the theme
  3. Click Theme > Load Theme and choose Don't Save
  4. Don't Save or Save Result: in GUI nothing happens

In IntelliJ I got an exception:

2022-01-20 11:13:16.127 java[50042:9410543] -[NSApplication runModalForWindow:] may not be invoked inside of transaction begin/commit pair, or inside of transaction commit (usually this means it was invoked inside of a view's -drawRect: method.) The modal dialog has been suppressed to avoid deadlock. (
    0   AppKit                              0x00007ff8169051e0 -[NSApplication runModalForWindow:] + 183
    1   AppKit                              0x00007ff817062a69 -[NSSavePanel runModal] + 451
    2   AppKit                              0x00007ff817063075 -[NSSavePanel runModalForDirectory:file:types:] + 168
    3   libawt_lwawt.dylib                  0x000000012d9d2d68 -[CFileDialog safeSaveOrLoad] + 391

Workaround:

  1. Open visualization of some instance of a specification
  2. Change the theme
  3. Reset Theme
  4. Click Theme > Load Theme

Seems to be a bug in

Class VizGUI.java Method doLoadTheme()

esb-dev commented 2 years ago

I think you can close this issue.

I've set Util.OnMac() to false. Then the behavior is okay. Therefore I think, the strange behavior #169 is a consequence of the problem from issue #154.