SD crashes when one particular script is loaded but isn't running

I’m a new user of SD, using the paid version

I have a script that loads and runs fine in Script Editor.app, but when I load it into SD and start scrolling through it, it crashes SD. Sometimes it crashes as soon as it loads, but mostly it stays loaded until I scroll in any direction. The script runs without issues - it never crashes when it’s running

The script isn’t even running, it’s just loaded. I get a proper crash report which shows the following:

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000016fb1ffd0
Termination Reason: Namespace SIGNAL, Code 10 Bus error: 10
Terminating Process: exc handler [25452]

I’m using a MacBook Air M3 - I tried installing SD on my Intel Mac mini and the script doesn’t crash

Can anyone help with troubleshooting tips please? I am happy to paste in the crash report - I saved it as a text file but obviously the forum doesn’t allow uploads of text files

I don’t really want to post the script - it’s long and I’m a beginner, and it also pulls in other libraries. I can say that the script runs absolutely fine - it’s got lots of try blocks and it logs everything it does to a file, and this crash never happens in Script Editor.app

Thanks!

I don’t see a crash report from you. When Script Debugger offers to submit a crash report, please allow it to do so. With this information I may be able to figure out how Script Debugger is failing.

Alternatively, you can post the Crash Report as an attachment here. Once I’ve seen the crash report we can figure out how to proceed.

Hi - SD never offers to send a crash report, these are ones that macOS generates and sends to Apple when SD crashes

Is there a way of getting SD to generate one?

With uploading, forgive my ignorance but I couldn’t see a way to do it. The only options seemed to be to upload images. I’m new and my searching skills are bad, so I accept that this is probably my fault :slightly_smiling_face:

Obviously I’m happy to upload the macOS crash report; please let me know if you want to see it

Thank you for responding. I really appreciate it

I’ve adjusted things so you should be able to upload a .ips or .crash file. Lets start there and see where that leads.

As a general advice for providing large amounts of text (as you may encounter this need on other forums), you can post your logs on Pastebin then provide a link.

1 Like

You should be able to drag the file you want to upload into the forum post editor. This action uploads the file to the forum and inserts a link to the uploaded file into your post.

Hi - I don’t get the option to save the Apple crash report, so I’m gonna try pasting it into a text file and dragging it into a post

I still can’t upload the file, even with dragging and dropping. The dialog box says “Sorry, the file you are trying to upload is not authorized (authorized extensions: jpg, jpeg, png, gif, zip, applescript, shortcut, heic, heif, md, svg, pdf, ips, crash)”

I’m submitting it as a .zip file instead.

sigh no, it won’t even allow me to do that. The error message tells me that new users can’t upload attachments

I’m gonna do this via the support email address

Thank you for sending me a crash report privately. Something in your script is causing AppleScript to go into an infinite recursion loop:

Thread 6:: WebCore: Scrolling
0   libsystem_kernel.dylib        	       0x18d802f54 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x18d815604 mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x18d80baf8 mach_msg_overwrite + 480
3   libsystem_kernel.dylib        	       0x18d80329c mach_msg + 24
4   CoreFoundation                	       0x18d92ca3c __CFRunLoopServiceMachPort + 160
5   CoreFoundation                	       0x18d92b29c __CFRunLoopRun + 1212
6   CoreFoundation                	       0x18d92a724 CFRunLoopRunSpecific + 588
7   CoreFoundation                	       0x18d9a59d0 CFRunLoopRun + 64
8   JavaScriptCore                	       0x1abaf6294 WTF::Detail::CallableWrapper<WTF::RunLoop::create(WTF::ASCIILiteral, WTF::ThreadType, WTF::Thread::QOS)::$_0, void>::call() + 52
9   JavaScriptCore                	       0x1abb2aff8 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 244
10  JavaScriptCore                	       0x1ab9585b8 WTF::wtfThreadEntryPoint(void*) + 16
11  libsystem_pthread.dylib       	       0x18d8442e4 _pthread_start + 136
12  libsystem_pthread.dylib       	       0x18d83f0fc thread_start + 8

Thread 7 Crashed::  Dispatch queue: NSOperationQueue 0x125f8ff80 (QOS: UNSPECIFIED)
0   dyld                          	       0x18d507ff8 DyldSharedCache::forEachCache(void (DyldSharedCache const*, bool&) block_pointer) const + 8
1   dyld                          	       0x18d507fd8 DyldSharedCache::forEachRange(void (char const*, unsigned long long, unsigned long long, unsigned int, unsigned long long, unsigned int, unsigned int, bool&) block_pointer, void (DyldSharedCache const*, unsigned int) block_pointer) const + 124
2   dyld                          	       0x18d4f2890 dyld4::APIs::findImageMappedAt(void const*, dyld3::MachOLoaded const**, bool*, char const**, void const**, unsigned long long*, unsigned char*, dyld4::Loader const**) + 268
3   dyld                          	       0x18d4f6338 dyld4::APIs::_dyld_find_unwind_sections(void*, dyld_unwind_sections*) + 124
4   libunwind.dylib               	       0x19b3d1df0 libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_arm64>::setInfoBasedOnIPRegister(bool) + 140
5   libunwind.dylib               	       0x19b3d4b10 libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_arm64>::step(bool) + 888
6   libunwind.dylib               	       0x19b3d6cb8 _Unwind_RaiseException + 456
7   libc++abi.dylib               	       0x18d7fcc7c __cxa_throw + 84
8   AppleScript                   	       0x232e95908 Raise(long, long) + 156
9   AppleScript                   	       0x232ed9868 TUASVector::WriteForTarget(AEStream&, unsigned char) + 120
10  AppleScript                   	       0x232ed9874 TUASVector::WriteForTarget(AEStream&, unsigned char) + 132
11  AppleScript                   	       0x232ed9874 TUASVector::WriteForTarget(AEStream&, unsigned char) + 132
12  AppleScript                   	       0x232ed9874 TUASVector::WriteForTarget(AEStream&, unsigned char) + 132
13  AppleScript                   	       0x232ed9874 TUASVector::WriteForTarget(AEStream&, unsigned char) + 132
14  AppleScript                   	       0x232ed9874 TUASVector::WriteForTarget(AEStream&, unsigned char) + 132
15  AppleScript                   	       0x232ed9874 TUASVector::WriteForTarget(AEStream&, unsigned char) + 132
16  AppleScript                   	       0x232ed9874 TUASVector::WriteForTarget(AEStream&, unsigned char) + 132
17  AppleScript                   	       0x232ed9874 TUASVector::WriteForTarget(AEStream&, unsigned char) + 132
18  AppleScript                   	       0x232ed9874 TUASVector::WriteForTarget(AEStream&, unsigned char) + 132
19  AppleScript                   	       0x232ed9874 TUASVector::WriteForTarget(AEStream&, unsigned char) + 132
20  AppleScript                   	       0x232ed9874 TUASVector::WriteForTarget(AEStream&, unsigned char) + 132
...

This kind of thing happens while editing because Script Debugger is always looking for opportunities to show you the value of the AppleScript expression under your mouse pointer.

This kind of thing can happen if you have a circular parent/child script object relationship.

I think I’ll need to see the code you have along with any pointers you can offer for where to hover the mouse that causes the crash you are experiencing. We may be able to improve Script Debugger to avoid this crash or we may just have to change your script to avoid causing AppleScript its self to crash.