rsjaffe / MIDI2LR

An application and plugin to remotely control Lightroom with a MIDI controller
http://rsjaffe.github.io/MIDI2LR/
GNU General Public License v3.0
675 stars 83 forks source link

Crashes on exit at M1 #499

Closed remov-b4-flight closed 2 years ago

remov-b4-flight commented 3 years ago

Describe the bug MIDI2LR sometimes crashes on exit. Machine is Newly I got M1 MBA. Unclear with processor Intel/ARM difference.

MIDI2LR_2021-01-01-122837_ricky.crash.txt

To Reproduce Steps to reproduce the behavior:

  1. Launch Lightroom
  2. Automatically launched MIDI2LR
  3. Working with LR (even no MIDI2LR touched)
  4. Exit Lightroom

Expected behavior Lightroom & MIDI2LR normally exit.

System(please complete the following information):

rsjaffe commented 3 years ago

could you replace MIDI2LR.app in the MIDI2LR.lrplugin bundle with the contents of this zip file? https://www.dropbox.com/s/7znsj06fml7u7r4/MIDI2LRdebug.zip?dl=0

This is the same version of MIDI2LR.app but includes debug symbols. Reply with a new crash dump—I hope the symbols will help me interpret it better.

rsjaffe commented 3 years ago

Does it consistently crash on closing when you do the following?

  1. start MIDI2LR normally
  2. change one of the command assignments
  3. close MIDI2LR without first trying to save the new profile
rsjaffe commented 3 years ago

Try the new release 4.3.0.0 and see if that fixes things.

remov-b4-flight commented 3 years ago

Is this crash log that you want? (debug version of 4.2.1.0) MIDI2LR_2021-01-02-230613_ricky.crash.txt Crash not seem to be related save profile or not Crash continues 4.3.0.0 also.

rsjaffe commented 3 years ago

Could you attach a copy of the MIDI2LR.log file showing the crash? That'll help me identify when in the shutdown process it occurs. The file is found in ~/Library/Logs/MIDI2LR.

remov-b4-flight commented 3 years ago

This is Log MIDI2LR.log

rsjaffe commented 3 years ago

It's crashing late in shutdown. I'm going to delay zeroing out some pointers and see if that helps. Here's a new version of MIDI2LR.app. Unzip and replace the MIDI2LR.app inside MIDI2LR.lrplugin with this version to see if the problem is fixed. Thanks. https://www.dropbox.com/s/7xeos4vlfpa34cn/MIDI2LR43extra.zip?dl=0

remov-b4-flight commented 3 years ago

This seems to be good.

rsjaffe commented 3 years ago

Thanks! Could you try this final version of MIDI2LR.app? If this works, I'll make this a new bug-fix release. Thank you for you work. https://www.dropbox.com/s/1waxfi2c6hybzh5/MIDI2LR431.zip?dl=0

remov-b4-flight commented 3 years ago

Oh, The new MIDI2LR.app and previous one also crashed.

rsjaffe commented 3 years ago

One more try. If this fails, then the problem is probably with the third-party libraries I use. https://www.dropbox.com/s/vealqn4wr4u13pv/MIDI2LR431plus.zip?dl=0

remov-b4-flight commented 3 years ago

Hmm... it crashes at about half the rate.

rsjaffe commented 3 years ago

One last? try. https://www.dropbox.com/s/iaojlqz4uukf69o/MIDI2LR4313.zip?dl=0

rsjaffe commented 3 years ago

I did find one more potential race condition. Could you try this version 4.3.1.4: https://www.dropbox.com/s/3ljyifr1ryupuft/MIDI2LR4314.zip?dl=0

remov-b4-flight commented 3 years ago

Both crashes...

rsjaffe commented 3 years ago

Unfortunately I'm having trouble interpreting the crash data. Here's yet one more try at fixing the shutdown issue. Could you try this? If it crashes, please attach the crash report again. Thanks for your work. https://www.dropbox.com/s/9fxdn1d2speq9ox/MIDI2LR4315.zip?dl=0

remov-b4-flight commented 3 years ago

Here's 4.3.1.5 log MIDI2LR.log

MIDI2LR_2021-01-11-193519_ricky.crash.txt

rsjaffe commented 3 years ago

Still working on it. Could you try this 4.3.1.6? It should label the threads in the crash report. If it crashes, please post crash report again. Thanks. https://www.dropbox.com/s/yqn3ih7q59ixum2/MIDI2LR4316.zip?dl=0

remov-b4-flight commented 3 years ago

sorry for absent. still crashed.

rsjaffe commented 3 years ago

Thanks for testing that. Could you post the crash report?

remov-b4-flight commented 3 years ago

4.3.1.6 logs MIDI2LR.log MIDI2LR_2021-01-31-163935_ricky.crash.txt

rsjaffe commented 3 years ago

Now I know exactly where it crashed. There's a race condition, but it's in a 3-rd party library, so hard to trace. I believe the following fixes it. Could you try this and tell me if things are now ok? https://www.dropbox.com/s/m8imasnr0anv2b0/MIDI2LR4317.zip?dl=0

rsjaffe commented 3 years ago

Were you able to test the latest patch?

remov-b4-flight commented 3 years ago

Still crashing... MIDI2LR_2021-02-07-213908_ricky.crash.txt MIDI2LR.log

rsjaffe commented 3 years ago

This link is to version 4.3.1.10 : if you could test it and reply with results and version number I'd appreciate it: https://www.dropbox.com/s/ehkecw2knyxw74a/MIDI2LR43110.zip?dl=0

rsjaffe commented 2 years ago

Fixed in 5.1.1