DavidWingate/CIFilterBox

Crashes a lot

Closed this issue · 8 comments

Great app!

The app crashes a lot when I am using some images to test. I could send an image that will make a crash if you want to reproduce it.

My adress is johan.ekenstedt@arboreal.se

Thanks for letting me know! Yes, I'd like to test this. I'll send a message separately with an address to send the image file. Thank you.

This app is potentially a huge time saver for me when I try to figure out a chain of filters I need. (Purchased on macOS Appstore)

However, I'm getting a lot of crashes also. For example, just after I selected CIColorClamp, followed by CIColorControls, I get a crash (the only actions I took after opening the app).

From the "Problem Report" :-

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConstantDoubleNumber W]: unrecognized selector sent to instance 0x7ff85eb30ba0'
terminating with uncaught exception of type NSException
abort() called

Application Specific Backtrace 0:
0 CoreFoundation 0x00007ff81cce21e3 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff81ca42c13 objc_exception_throw + 48
2 CoreFoundation 0x00007ff81cd66f3b -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007ff81cc48df5 forwarding + 1356
4 CoreFoundation 0x00007ff81cc48818 _CF_forwarding_prep_0 + 120
5 CoreImage 0x00007ff825edb470 -[CIColorClamp outputImage] + 229
6 CIFilterBox 0x0000000101127c84 CIFilterBox + 68740

Thanks for the report! I think this might be two separate things:

  1. The app seems to be sending the wrong type of number format to the CIColorClamp filter, and the filter is causing the crash. This happened in early testing, and I thought I had made it impossible, but apparently not!

  2. I am aware that there is some sort of memory leak. When you go through all of the filters, each one stores its last output image in memory. I managed to solve this in a different app, so hopefully that solution will work here as well.

Unfortunately I can't reproduce the crash on my machine. Could you give me the exact numbers typed into the boxes so I can try to reproduce? Thanks.

On the memory issue, when I go through all ~200 filters the memory footprint goes up to about 700MB, which is not good! But shouldn't cause a crash. Is this happening with the stock images or does it only happen with custom images?

It will be a few days before I get the chance to look into this properly. Crash reports only started coming in recently, so it might be related to system updates. Any additional info you can provide will be gratefully received!

In the meantime, could you try deleting the deleting the prefs plist and see if that prevents the immediate crashes? Just so I can cross it off the list. Thanks.

Sorry the app is not working as it should, I'm keen to get it fixed as soon as I can.

I can consistently get a crash, for example, by
1 - Open app
2 - Click on CIColorClamp
3 - Click on CIColorControls
4 - Click on CIColorClamp
I didn't actually enter any values - just the above.

OK, after a lot of updates and messing around I'm starting to see some wonky behaviour! I still haven't pinpointed the cause yet but I'll open it up and get to work on a fix (something in SwiftUI has changed between Big Sur and Monterey). Thanks for reporting the error, I'll have it up and running as soon as I can!

Update has just been accepted to the Mac App Store (version 1.0.1), so it should be with you imminently! Tested on MacOS 12.3.1, should be no more crashes. Thanks for helping me resolve this, and if you spot any more problems (or have any suggestions) let me know. Thanks!