Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.15k stars 301 forks source link

Komodo Edit Hangs on Big Sur If Closing Unsaved File #3905

Open ssigwart opened 3 years ago

ssigwart commented 3 years ago

Short Summary

BigSur hangs when closing a file with changes.

Steps to Reproduce

  1. Open either a new file or existing file.
  2. Type a character.
  3. Attempt to close the file.

Expected results

Actual results

Platform Information

Komodo Edit 12.0 macOS Big Sur 11.0.1

Additional Information

ssigwart commented 3 years ago

I tracked it down to this line: https://github.com/Komodo/KomodoEdit/blob/0a152c79489b66296f7a2d7f15d8d2f5accd0ccc/src/chrome/komodo/content/bindings/views-editor.p.xml#L1174-L1176 If I change that to var res = "Yes";, var res = "No";, or var res = "Cancel"; it does not hang.

ssigwart commented 3 years ago

From what I can tell, replacing that line with anything that will pause JavaScript execution (e.g. alert or confirm) also causes it to hang.

th3coop commented 3 years ago

https://community.komodoide.com/t/komodo-and-big-sur-do-not-upgrade/5191/14

th3coop commented 3 years ago

@ssigwart I wasn't able to find anything that hints at why this is occurring in the Mozilla code. The only reference I found to hanging firefox instances when dialogs open were from quite a long time ago. I haven't had any luck getting Komodo building on this upgraded Big Sur machine either.

ssigwart commented 3 years ago

@th3coop, thanks for looking. I assume the IDE issue is more critical. Looking into that, I see this when I sample the process when it starts/hangs. It looks like something recursively gets called, but I don't really know how to analyze the samples. I'm guessing the IDE issue and this issue might be related.

...
[0x10f69100c]
    981 Thread_22742: DOM Worker
    + 979 ffi_call  (in XUL) + 1309  [0x1152b6fbd]
    + ! 979 ffi_call  (in XUL) + 1309  [0x1152b6fbd]
    + !   979 ffi_call  (in XUL) + 1309  [0x1152b6fbd]
    + !     979 ffi_call  (in XUL) + 1309  [0x1152b6fbd]
    + !       979 ffi_call  (in XUL) + 1309  [0x1152b6fbd]
    + !         979 ffi_call  (in XUL) + 1309  [0x1152b6fbd]
    + !           979 ffi_call  (in XUL) + 1309  [0x1152b6fbd]
    + !             979 ffi_call  (in XUL) + 1309  [0x1152b6fbd]
    + !               979 ffi_call  (in XUL) + 1309  [0x1152b6fbd]
    + !                 979 ffi_call  (in XUL) + 1309  [0x1152b6fbd]
...
th3coop commented 3 years ago

@ssigwart, I'm 99% certain that this issue is the same as what's going on in IDE. The process samples aren't very helpful to me either. I think without the ability to link in crashreport symbols we can't really know whats' being called, unless you can do that mapping with these sample dumps too. If Komodo would just CRASH then ask you to submit a crash report we'd maybe be able to achieve that mapping with the resulting report sent to us.

ssigwart commented 3 years ago

@th3coop, I've never really done much with crash reports and symbols, so I probably can't be of much help, but if you want to trigger a crash, I wonder if you can add a 60 second timeout that would execute some code you know will make it crash.

th3coop commented 3 years ago

Workaround here https://community.komodoide.com/t/komodo-and-big-sur-do-not-upgrade/5191/16