I just run a very simple NSAppleScript:
"do shell script \"echo command\" with administrator privileges"
However, I got error as below:
NSAppleScriptErrorNumber = "-2147450879";
But it works fine on my friend‘s mac, anybody know how to solve this problem.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I get many crash logs from my mac app as below:
Application Specific Information:
assertion failure: "(self)-_enumeratingSubviewsCount ((1 6) - 1)" - %lld
I know literal meaning when a super view have subviews more than 2 to the 6th power, which is 128.
However, when I make a test app, which addSuviews to 200. But it doesn't crash. The test demo code show below
for (int i = 0; i 200; i++) {
NSView *view = [[NSView alloc] initWithFrame:NSMakeRect(0, 0, 20, 20)];
[self.window.contentView addSubview:view];
}
Anybody know how to fix this problem. Thanks.
We have an Mac app, which worked fine on 10.14 and 10.15. Howerver when user upgrade to Big sur, we get a lot about crash log. Such as below, it seems not crash on our Application.
Thread 2 Crashed:: Dispatch queue: com.apple.root.user-interactive-qos
0 libsystem_platform.dylib 0x00007fff204a3673 os_unfair_lock_lock + 10
1 com.apple.AppKit 0x00007fff22f5c83e -[NSScreenDisplayLink _fire] + 46
2 com.apple.AppKit 0x00007fff236ea2cd ___NSRunLoopTimerCreateWithHandler_block_invoke + 34
3 com.apple.CoreFoundation 0x00007fff2057290d CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20
4 com.apple.CoreFoundation 0x00007fff205723e8 __CFRunLoopDoTimer + 922
5 com.apple.CoreFoundation 0x00007fff20571f42 __CFRunLoopDoTimers + 307
6 com.apple.CoreFoundation 0x00007fff2055857f __CFRunLoopRun + 2008
7 com.apple.CoreFoundation 0x00007fff205576ce CFRunLoopRunSpecific + 563
8 com.apple.Foundation 0x00007fff212e4fa1 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
9 com.apple.AppKit 0x00007fff22ffa49c -[NSAnimation(NSInternal) _runBlocking] + 453
10 com.apple.AppKit 0x00007fff22ffa25a __42-[NSAnimation(NSInternal) _runInNewThread]_block_invoke + 97
11 libdispatch.dylib 0x00007fff202b55dd _dispatch_call_block_and_release + 12
12 libdispatch.dylib 0x00007fff202b67c7 _dispatch_client_callout + 8
13 libdispatch.dylib 0x00007fff202c59b5 _dispatch_root_queue_drain + 676
14 libdispatch.dylib 0x00007fff202c5fb8 _dispatch_worker_thread2 + 92
15 libsystem_pthread.dylib 0x00007fff2045e453 _pthread_wqthread + 244
16 libsystem_pthread.dylib 0x00007fff2045d467 start_wqthread + 15
I only reproduce from Xcode once, as show Below, anyone who know how to solve this problem.