Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIR 51.0.0.3][macOS] Worker::start() cause crash #3102

Closed
itlancer opened this issue Mar 4, 2024 · 2 comments
Closed

[AIR 51.0.0.3][macOS] Worker::start() cause crash #3102

itlancer opened this issue Mar 4, 2024 · 2 comments
Labels

Comments

@itlancer
Copy link

itlancer commented Mar 4, 2024

Problem Description

Worker::start() cause application crash using AIR 51.0.0.3 with macOS.

Tested with latest AIR 51.0.0.3 with macOS Intel-based device with different applications.
There is no such issue with Windows.
Also there is no such issue using AIR 50.2.4.4.
Didn't test with AIR 51.0.0.2.

Related issue: #2523

Steps to Reproduce

Launch application with code below on any macOS device.

Application example with sources attached.
air51_mac_worker_start_crash.zip

package {
	import flash.display.Sprite;
	import flash.system.Worker;
	import flash.system.WorkerDomain;
	import flash.events.Event;
	
	public class AIR51MacWorkerStartCrash extends Sprite {
		private var worker:Worker;
		
		public function AIR51MacWorkerStartCrash() {
			if (Worker.current.isPrimordial) {
				trace("main");
				addEventListener(Event.ADDED_TO_STAGE, init);
			} else {
				trace("worker");
			}
		}
		
		private function init(e:Event):void {
			removeEventListener(Event.ADDED_TO_STAGE, init);
			worker = WorkerDomain.current.createWorker(this.loaderInfo.bytes, true);
			worker.start();//This line cause crash
		}
	}
}

Actual Result:
Application crash:

Process:               mac_worker_crash [2974]
Path:                  /Volumes/VOLUME/*/mac_worker_crash.app/Contents/MacOS/mac_worker_crash
Identifier:            mac.worker.crash
Version:               1.0.0 (1.0.0)
Code Type:             X86-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2024-03-04 23:20:18.6108 +0300
OS Version:            macOS 13.1 (22C65)
Report Version:        12
Bridge OS Version:     7.1 (20P2059)
Anonymous UUID:        1349E91B-F18E-259F-0DC9-E53B57BEAB1F

Sleep/Wake UUID:       88FC3CA2-5681-4D42-8B83-257797E24D27

Time Awake Since Boot: 3600 seconds
Time Since Wake:       1367 seconds

System Integrity Protection: enabled

Notes:
dyld_process_snapshot_create_for_process failed with 5

Crashed Thread:        19

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Application Specific Backtrace 0:
0   CoreFoundation                      0x00007ff81a75940b __exceptionPreprocess + 242
1   libobjc.A.dylib                     0x00007ff81a2a5e25 objc_exception_throw + 48
2   CoreFoundation                      0x00007ff81a7815b6 _CFBundleGetValueForInfoKey + 0
3   AppKit                              0x00007ff81d851584 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 307
4   AppKit                              0x00007ff81d83e353 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1247
5   AppKit                              0x00007ff81d9d9072 -[NSPanel _initContent:styleMask:backing:defer:contentView:] + 50
6   AppKit                              0x00007ff81d83de6d -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
7   AppKit                              0x00007ff81d9d902b -[NSPanel initWithContentRect:styleMask:backing:defer:] + 59
8   AppKit                              0x00007ff81d83c38b -[NSWindowTemplate nibInstantiate] + 354
9   AppKit                              0x00007ff81d80a822 -[NSIBObjectData instantiateObject:] + 222
10  AppKit                              0x00007ff81d809f94 -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 476
11  AppKit                              0x00007ff81d7fea6f loadNib + 420
12  AppKit                              0x00007ff81d7fde57 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 737
13  AppKit                              0x00007ff81d7fda81 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 201
14  AppKit                              0x00007ff81db50c60 -[NSAlert init] + 101
15  Adobe AIR                           0x0000000103bebc77 startAIR + 5304476
16  Adobe AIR                           0x0000000103e3ea77 startAIR + 7741084
17  Adobe AIR                           0x0000000103e00418 startAIR + 7485501
18  Adobe AIR                           0x0000000103e00f63 startAIR + 7488392
19  Adobe AIR                           0x0000000103a92338 startAIR + 3888989
20  Adobe AIR                           0x0000000103a92a14 startAIR + 3890745
21  Adobe AIR                           0x0000000103a420ce startAIR + 3560691
22  Adobe AIR                           0x0000000103a3e502 startAIR + 3545383
23  libsystem_pthread.dylib             0x00007ff81a605259 _pthread_start + 125
24  libsystem_pthread.dylib             0x00007ff81a600c7b thread_start + 15

Expected Result:
Worker will be started without crash.

Known Workarounds

none
*Use AIR 50.2.4.4

@itlancer itlancer added the Bug label Mar 4, 2024
@ajwfrost
Copy link
Collaborator

ajwfrost commented Mar 5, 2024

Ah...

Crashed Thread:        19
14  AppKit                              0x00007ff81db50c60 -[NSAlert init] + 101

We can't show an alert from a background thread. I think this is the worker instantiation, mistakenly trying to show an alert to say that it's a beta version of AIR....

thanks

@itlancer itlancer changed the title [AIR 51.0.0.3][macOS][ Worker::start() cause crash [AIR 51.0.0.3][macOS] Worker::start() cause crash Mar 5, 2024
@itlancer
Copy link
Author

Fixed with latest AIR SDK 51.0.0.4.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants