Re: Exception not being caught in try statement

2021-05-12 Thread Mark Allan via Cocoa-dev
Hi all, Thanks to everyone for their suggestions. I spent far too much time working around this bug, but have finally got to the bottom of the original issue. It turns out this is a known issue with some other apps as well, and (thanks to https://trac.cyberduck.io/ticket/11231#comment:25

Re: Exception not being caught in try statement

2021-03-29 Thread Martin Wierschin via Cocoa-dev
Breaking the RTFD loading process down into subtasks is a good idea. It might be worth trying to sidestep the issue using NSAttributedString. You can try loading the data yourself as Mike suggested and then use initWithRTFD or initWithRTFDFileWrapper. Once you have the text in an attributed

Re: Exception not being caught in try statement

2021-03-28 Thread Gabriel Zachmann via Cocoa-dev
I can't really answer your questions ... but just a dumb suggestion: have you tried removing all tabs from your RTF file? Best regards, Gabriel >> >> Any ideas what's going on? Other than the file not being found, why else >> might the object at line 3 in the backtrace be nil...and more

Re: Exception not being caught in try statement

2021-03-27 Thread Stephane Sudre via Cocoa-dev
It's trying to insert a NSTextTab * object. On Fri, Mar 26, 2021 at 12:11 PM Mark Allan via Cocoa-dev wrote: > > Hi folks, > > Some users are reporting a crash that I can't reproduce, and in an attempt to > gain additional diagnostics from a user, I wrapped the affected line in a > try/catch

Re: Exception not being caught in try statement

2021-03-26 Thread Mike Abdullah via Cocoa-dev
This does seem quite surprising. However, here’s the thing: this code is very strange approach to take. Number 1: Cocoa doesn’t support exceptions as an error-handling mechanism except where explicitly stated and supported. You’re trying to use them, which is asking for trouble. The system

Re: Exception not being caught in try statement

2021-03-26 Thread Rob Petrovec via Cocoa-dev
Don’t forget to include a sample app that demonstrates the problem. —Rob > On Mar 26, 2021, at 12:02 PM, Gary L. Wade via Cocoa-dev > wrote: > > Try surrounding the call with beginEditing and endEditing on the text > storage. If it still happens, submit a feedback to Apple with the full

Re: Exception not being caught in try statement

2021-03-26 Thread Gary L. Wade via Cocoa-dev
Try surrounding the call with beginEditing and endEditing on the text storage. If it still happens, submit a feedback to Apple with the full crash log. -- Gary L. Wade http://www.garywade.com/ > On Mar 26, 2021, at 4:11 AM, Mark Allan via Cocoa-dev > wrote: > > Hi folks, > > Some users are

Exception not being caught in try statement

2021-03-26 Thread Mark Allan via Cocoa-dev
Hi folks, Some users are reporting a crash that I can't reproduce, and in an attempt to gain additional diagnostics from a user, I wrapped the affected line in a try/catch block. For two users it resolve the crash, but for a third, it's still crashing at the same point! The crash occurs when