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

[macOS][platform_view] Rotating PlatformView produces unexpected results and causes crashes #124490

Closed
0xZOne opened this issue Apr 10, 2023 · 12 comments
Assignees
Labels
a: desktop Running on desktop a: platform-views Embedding Android/iOS views in Flutter apps c: fatal crash Crashes that terminate the process c: rendering UI glitches reported at the engine/skia rendering level engine flutter/engine repository. See also e: labels. found in release: 3.10 Found to occur in 3.10 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-mac Building on or for macOS specifically r: fixed Issue is closed as already fixed in a newer version

Comments

@0xZOne
Copy link
Member

0xZOne commented Apr 10, 2023

image image

Steps to Reproduce

  1. Get test code: git clone git@github.com:0xZOne/platform_view_macos_example.git
  2. Execute flutter run -d macos
  3. Slide the slider named "Rotate" and observe the results
Crash Logs
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               platform_view_macos_example_example [30995]
Path:                  /Users/USER/*/platform_view_macos_example_example.app/Contents/MacOS/platform_view_macos_example_example
Identifier:            com.example.platformViewMacosExampleExample
Version:               1.0.0 (1)
Code Type:             X86-64 (Native)
Parent Process:        dart [30795]
Responsible:           iTerm2 [88768]
User ID:               502

Date/Time:             2023-04-10 13:58:15.5038 +0800
OS Version:            macOS 13.1 (22C65)
Report Version:        12
Bridge OS Version:     7.1 (20P2059)
Anonymous UUID:        511D7B1C-8BDD-C8FB-055D-2F784BF79E6F

Sleep/Wake UUID:       8782E79C-6C9D-4F62-903A-D82535C63651

Time Awake Since Boot: 640000 seconds
Time Since Wake:       11346 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

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

Termination Reason:    Namespace LIBSYSTEM, Code 2 Application Triggered Fault

Application Specific Information:
assertion failure: "!( sizeof(contentsScale) == sizeof(float) ? __inline_isnanf((float)(contentsScale)) : sizeof(contentsScale) == sizeof(double) ? __inline_isnand((double)(contentsScale)) : __inline_isnanl((long double)(contentsScale)))" -> %lld


Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	    0x7ff803203aa2 __abort_with_payload + 10
1   libsystem_kernel.dylib        	    0x7ff8032218b2 abort_with_payload_wrapper_internal + 82
2   libsystem_kernel.dylib        	    0x7ff8032218e4 abort_with_payload + 9
3   libsystem_c.dylib             	    0x7ff8031456c2 _os_crash_msg + 98
4   AppKit                        	    0x7ff8065a4997 __22-[NSTextLayer display]_block_invoke_2 + 1755
5   AppKit                        	    0x7ff80644b72f +[NSAppearance _performWithCurrentAppearance:usingBlock:] + 66
6   AppKit                        	    0x7ff8065a42b1 __22-[NSTextLayer display]_block_invoke + 139
7   AppKit                        	    0x7ff806485981 -[NSFocusStack performWithFocusView:inWindow:usingBlock:] + 92
8   AppKit                        	    0x7ff8065a3fca -[NSTextLayer display] + 335
9   QuartzCore                    	    0x7ff80add62c8 CA::Layer::display_if_needed(CA::Transaction*) + 900
10  QuartzCore                    	    0x7ff80af4f8da CA::Context::commit_transaction(CA::Transaction*, double, double*) + 648
11  QuartzCore                    	    0x7ff80adb7119 CA::Transaction::commit() + 725
12  FlutterMacOS                  	       0x108301304 -[FlutterThreadSynchronizer drain] + 164
13  FlutterMacOS                  	       0x108301bfd __50-[FlutterThreadSynchronizer performCommit:notify:]_block_invoke.7 + 61
14  libdispatch.dylib             	    0x7ff8030b77fb _dispatch_call_block_and_release + 12
15  libdispatch.dylib             	    0x7ff8030b8a44 _dispatch_client_callout + 8
16  libdispatch.dylib             	    0x7ff8030c57b9 _dispatch_main_queue_drain + 952
17  libdispatch.dylib             	    0x7ff8030c53f3 _dispatch_main_queue_callback_4CF + 31
18  CoreFoundation                	    0x7ff803352610 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
19  CoreFoundation                	    0x7ff803312b90 __CFRunLoopRun + 2454
20  CoreFoundation                	    0x7ff803311b80 CFRunLoopRunSpecific + 560
21  HIToolbox                     	    0x7ff80cc56766 RunCurrentEventLoopInMode + 292
22  HIToolbox                     	    0x7ff80cc56576 ReceiveNextEventCommon + 679
23  HIToolbox                     	    0x7ff80cc562b3 _BlockUntilNextEventMatchingListInModeWithFilter + 70
24  AppKit                        	    0x7ff80645df33 _DPSNextEvent + 909
25  AppKit                        	    0x7ff80645cdb4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1219
26  AppKit                        	    0x7ff80644f3f7 -[NSApplication run] + 586
27  AppKit                        	    0x7ff806423427 NSApplicationMain + 817
28  platform_view_macos_example_example	       0x1054fc799 main + 9 (AppDelegate.swift:5)
29  dyld                          	    0x7ff802f05310 start + 2432

Thread 1:: io.flutter.ui
0   libsystem_kernel.dylib        	    0x7ff8031f95c2 mach_msg2_trap + 10
1   libsystem_kernel.dylib        	    0x7ff803207604 mach_msg2_internal + 82
2   libsystem_kernel.dylib        	    0x7ff803200635 mach_msg_overwrite + 723
3   libsystem_kernel.dylib        	    0x7ff8031f98a8 mach_msg + 19
4   CoreFoundation                	    0x7ff803313cde __CFRunLoopServiceMachPort + 145
5   CoreFoundation                	    0x7ff80331274a __CFRunLoopRun + 1360
6   CoreFoundation                	    0x7ff803311b80 CFRunLoopRunSpecific + 560
7   FlutterMacOS                  	       0x10834d75d fml::MessageLoopDarwin::Run() + 141
8   FlutterMacOS                  	       0x1083451e5 fml::MessageLoopImpl::DoRun() + 37
9   FlutterMacOS                  	       0x10834bcb0 void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::Thread::Thread(std::_LIBCPP_ABI_NAMESPACE::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0> >(void*) + 176
10  libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
11  libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 2:: io.flutter.raster
0   libsystem_kernel.dylib        	    0x7ff8031f95c2 mach_msg2_trap + 10
1   libsystem_kernel.dylib        	    0x7ff803207604 mach_msg2_internal + 82
2   libsystem_kernel.dylib        	    0x7ff803200635 mach_msg_overwrite + 723
3   libsystem_kernel.dylib        	    0x7ff8031f98a8 mach_msg + 19
4   CoreFoundation                	    0x7ff803313cde __CFRunLoopServiceMachPort + 145
5   CoreFoundation                	    0x7ff80331274a __CFRunLoopRun + 1360
6   CoreFoundation                	    0x7ff803311b80 CFRunLoopRunSpecific + 560
7   FlutterMacOS                  	       0x10834d75d fml::MessageLoopDarwin::Run() + 141
8   FlutterMacOS                  	       0x1083451e5 fml::MessageLoopImpl::DoRun() + 37
9   FlutterMacOS                  	       0x10834bcb0 void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::Thread::Thread(std::_LIBCPP_ABI_NAMESPACE::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0> >(void*) + 176
10  libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
11  libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 3:: io.flutter.io
0   libsystem_kernel.dylib        	    0x7ff8031f95c2 mach_msg2_trap + 10
1   libsystem_kernel.dylib        	    0x7ff803207604 mach_msg2_internal + 82
2   libsystem_kernel.dylib        	    0x7ff803200635 mach_msg_overwrite + 723
3   libsystem_kernel.dylib        	    0x7ff8031f98a8 mach_msg + 19
4   CoreFoundation                	    0x7ff803313cde __CFRunLoopServiceMachPort + 145
5   CoreFoundation                	    0x7ff80331274a __CFRunLoopRun + 1360
6   CoreFoundation                	    0x7ff803311b80 CFRunLoopRunSpecific + 560
7   FlutterMacOS                  	       0x10834d75d fml::MessageLoopDarwin::Run() + 141
8   FlutterMacOS                  	       0x1083451e5 fml::MessageLoopImpl::DoRun() + 37
9   FlutterMacOS                  	       0x10834bcb0 void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::Thread::Thread(std::_LIBCPP_ABI_NAMESPACE::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0> >(void*) + 176
10  libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
11  libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 4:: io.worker.1
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 5:: io.worker.2
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 6:: io.worker.3
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 7:: io.worker.4
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 8:: io.worker.5
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 9:: io.worker.6
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 10:: io.worker.7
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 11:: io.worker.8
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 12:: io.worker.9
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 13:: io.worker.10
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 14:: io.worker.11
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 15:: io.worker.12
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 16:: io.worker.13
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 17:: io.worker.14
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 18:: io.worker.15
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 19:: io.worker.16
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff8032387e1 _pthread_cond_wait + 1243
2   FlutterMacOS                  	       0x10830ef64 std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock<std::_LIBCPP_ABI_NAMESPACE::mutex>&) + 36
3   FlutterMacOS                  	       0x1083401d3 fml::ConcurrentMessageLoop::WorkerMain() + 163
4   FlutterMacOS                  	       0x108340f7c void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 188
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 20:: dart:io EventHandler
0   libsystem_kernel.dylib        	    0x7ff8031fe216 kevent + 10
1   FlutterMacOS                  	       0x108ab7bf8 dart::bin::EventHandlerImplementation::EventHandlerEntry(unsigned long) + 344
2   FlutterMacOS                  	       0x108adcd83 dart::bin::ThreadStart(void*) + 83
3   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
4   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 21:: Dart Profiler ThreadInterrupter
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff803238816 _pthread_cond_wait + 1296
2   FlutterMacOS                  	       0x108d77106 dart::Monitor::WaitMicros(long long) + 134
3   FlutterMacOS                  	       0x108dfa873 dart::ThreadInterrupter::ThreadMain(unsigned long) + 355
4   FlutterMacOS                  	       0x108d765be dart::ThreadStart(void*) + 206
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 22:: Dart Profiler SampleBlockProcessor
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff803238816 _pthread_cond_wait + 1296
2   FlutterMacOS                  	       0x108d77106 dart::Monitor::WaitMicros(long long) + 134
3   FlutterMacOS                  	       0x108d7cf65 dart::SampleBlockProcessor::ThreadMain(unsigned long) + 197
4   FlutterMacOS                  	       0x108d765be dart::ThreadStart(void*) + 206
5   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
6   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 23:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	    0x7ff8031f95c2 mach_msg2_trap + 10
1   libsystem_kernel.dylib        	    0x7ff803207604 mach_msg2_internal + 82
2   libsystem_kernel.dylib        	    0x7ff803200635 mach_msg_overwrite + 723
3   libsystem_kernel.dylib        	    0x7ff8031f98a8 mach_msg + 19
4   CoreFoundation                	    0x7ff803313cde __CFRunLoopServiceMachPort + 145
5   CoreFoundation                	    0x7ff80331274a __CFRunLoopRun + 1360
6   CoreFoundation                	    0x7ff803311b80 CFRunLoopRunSpecific + 560
7   AppKit                        	    0x7ff8065be299 _NSEventThread + 132
8   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
9   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 24:
0   libsystem_pthread.dylib       	    0x7ff803233c58 start_wqthread + 0

Thread 25:
0   libsystem_pthread.dylib       	    0x7ff803233c58 start_wqthread + 0

Thread 26:
0   libsystem_pthread.dylib       	    0x7ff803233c58 start_wqthread + 0

Thread 27:: DartWorker
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff803238816 _pthread_cond_wait + 1296
2   FlutterMacOS                  	       0x108d77106 dart::Monitor::WaitMicros(long long) + 134
3   FlutterMacOS                  	       0x108dfb89f dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) + 559
4   FlutterMacOS                  	       0x108dfbaa7 dart::ThreadPool::Worker::Main(unsigned long) + 135
5   FlutterMacOS                  	       0x108d765be dart::ThreadStart(void*) + 206
6   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
7   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 28:: DartWorker
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff803238816 _pthread_cond_wait + 1296
2   FlutterMacOS                  	       0x108d77106 dart::Monitor::WaitMicros(long long) + 134
3   FlutterMacOS                  	       0x108c8f766 dart::MutatorThreadPool::OnEnterIdleLocked(dart::MonitorLocker*) + 294
4   FlutterMacOS                  	       0x108dfb6dd dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) + 109
5   FlutterMacOS                  	       0x108dfbaa7 dart::ThreadPool::Worker::Main(unsigned long) + 135
6   FlutterMacOS                  	       0x108d765be dart::ThreadStart(void*) + 206
7   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
8   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 29:: DartWorker
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff803238816 _pthread_cond_wait + 1296
2   FlutterMacOS                  	       0x108d77106 dart::Monitor::WaitMicros(long long) + 134
3   FlutterMacOS                  	       0x108dfb89f dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) + 559
4   FlutterMacOS                  	       0x108dfbaa7 dart::ThreadPool::Worker::Main(unsigned long) + 135
5   FlutterMacOS                  	       0x108d765be dart::ThreadStart(void*) + 206
6   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
7   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15

Thread 30:: DartWorker
0   libsystem_kernel.dylib        	    0x7ff8031fc11a __psynch_cvwait + 10
1   libsystem_pthread.dylib       	    0x7ff803238816 _pthread_cond_wait + 1296
2   FlutterMacOS                  	       0x108d77106 dart::Monitor::WaitMicros(long long) + 134
3   FlutterMacOS                  	       0x108dfb89f dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) + 559
4   FlutterMacOS                  	       0x108dfbaa7 dart::ThreadPool::Worker::Main(unsigned long) + 135
5   FlutterMacOS                  	       0x108d765be dart::ThreadStart(void*) + 206
6   libsystem_pthread.dylib       	    0x7ff803238259 _pthread_start + 125
7   libsystem_pthread.dylib       	    0x7ff803233c7b thread_start + 15


Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000002000209  rbx: 0x0000000000000000  rcx: 0x00007ff7baa02c68  rdx: 0x0000000000000000
  rdi: 0x0000000000000012  rsi: 0x0000000000000002  rbp: 0x00007ff7baa02cb0  rsp: 0x00007ff7baa02c68
   r8: 0x00007fdc43160e90   r9: 0x0000000000000000  r10: 0x0000000000000000  r11: 0x0000000000000246
  r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x0000000000000002  r15: 0x0000000000000012
  rip: 0x00007ff803203aa2  rfl: 0x0000000000000246  cr2: 0x000000010745a000
  
Logical CPU:     0
Error Code:      0x02000209 
Trap Number:     133


Binary Images:
    0x7ff8031f8000 -     0x7ff803231ff7 libsystem_kernel.dylib (*) <7c3dcc95-9f42-3c7c-8796-476ff67b9cf7> /usr/lib/system/libsystem_kernel.dylib
    0x7ff803100000 -     0x7ff803188fff libsystem_c.dylib (*) <376f7cb7-6dd2-3e00-976f-77dd755bdb0d> /usr/lib/system/libsystem_c.dylib
    0x7ff806420000 -     0x7ff807427fff com.apple.AppKit (6.9) <00f4aa78-a19f-3a8e-9650-9f90b7beefd6> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
    0x7ff80adb5000 -     0x7ff80b106ffb com.apple.QuartzCore (1.11) <7ee71304-11f0-30e3-a736-16a19555fed7> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
       0x1082da000 -        0x10a35ffff io.flutter.flutter-macos (1.0) <4c4c44ab-5555-3144-a1ba-6e1a96272465> /Users/USER/*/platform_view_macos_example_example.app/Contents/Frameworks/FlutterMacOS.framework/Versions/A/FlutterMacOS
    0x7ff8030b6000 -     0x7ff8030fcff3 libdispatch.dylib (*) <6282e528-6a67-334b-accf-1f8fd89369bd> /usr/lib/system/libdispatch.dylib
    0x7ff803294000 -     0x7ff80372dfff com.apple.CoreFoundation (6.9) <beb5fc0b-7196-3c1d-a59a-f62ada98f592> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x7ff80cc27000 -     0x7ff80cf1effd com.apple.HIToolbox (2.1.1) <db45022f-3922-35b3-9a06-377f66ed0fbe> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
       0x1054f9000 -        0x1054fcfff com.example.platformViewMacosExampleExample (1.0.0) <e6bec7db-0078-38f9-92ae-2ea50f639a60> /Users/USER/*/platform_view_macos_example_example.app/Contents/MacOS/platform_view_macos_example_example
    0x7ff802eff000 -     0x7ff802f93c6f dyld (*) <bb7a0970-8c62-3dce-a7a2-5cec9c501f11> /usr/lib/dyld
    0x7ff803232000 -     0x7ff80323dff7 libsystem_pthread.dylib (*) <5920e36f-53ec-33f0-b675-8ae48b58418c> /usr/lib/system/libsystem_pthread.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 2
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=477.4M resident=0K(0%) swapped_out_or_unallocated=477.4M(100%)
Writable regions: Total=2.8G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=2.8G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Accelerate framework               256K        2 
Activity Tracing                   256K        1 
CG backing stores                 6112K       12 
CG image                            48K        3 
ColorSync                          228K       26 
CoreAnimation                      180K       10 
CoreGraphics                        20K        4 
CoreUI image data                 1108K        8 
Foundation                          16K        1 
IOKit                             7940K        1 
Kernel Alloc Once                    8K        1 
MALLOC                           430.4M       80 
MALLOC guard page                   48K        9 
MALLOC_MEDIUM (reserved)           1.9G       16         reserved VM address space (unallocated)
MALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)
STACK GUARD                       56.1M       31 
Stack                             26.8M       33 
VM_ALLOCATE                       98.3M      254 
__CTF                               756        1 
__DATA                            18.5M      350 
__DATA_CONST                      14.4M      211 
__DATA_DIRTY                       660K      112 
__FONT_DATA                        2352        1 
__LINKEDIT                       193.6M        7 
__OBJC_RO                         65.4M        1 
__OBJC_RW                         1988K        2 
__TEXT                           283.8M      372 
dyld private memory                256K        1 
mapped file                      211.6M       30 
shared memory                      800K       22 
===========                     =======  ======= 
TOTAL                              3.6G     1603 
TOTAL, minus reserved VM space     1.4G     1603 

flutter doctor -v
[✓] Flutter (Channel main, 3.10.0-2.0.pre.27, on macOS 13.1 22C65 darwin-x64, locale zh-Hans-CN)
    • Flutter version 3.10.0-2.0.pre.27 on channel main at /Users/zero/fvm/versions/main
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fa976a1bef (7 hours ago), 2023-04-09 19:19:24 -0400
    • Engine revision 30daa2369d
    • Dart version 3.0.0 (build 3.0.0-417.0.dev)
    • DevTools version 2.23.1
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/zero/Library/Android/sdk
    • Platform android-33, build-tools 33.0.2
    • ANDROID_SDK_ROOT = /Users/zero/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] VS Code (version 1.76.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.60.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 13.1 22C65 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 111.0.5563.146

[✓] Network resources
    • All expected network resources are available.

• No issues found!
@danagbemava-nc danagbemava-nc added the in triage Presently being triaged by the triage team label Apr 10, 2023
@danagbemava-nc
Copy link
Member

The crash is reproducible using the code sample & steps provided above.

Moving the rotation slider also distorts the platform-view

None of the transforms are applied on stable.

flutter doctor -v
[!] Flutter (Channel master, 3.10.0-2.0.pre.29, on macOS 13.3.1 22E261 darwin-arm64, locale en-GB)
    • Flutter version 3.10.0-2.0.pre.29 on channel master at /Users/nexus/dev/sdks/flutters
    ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f4cd897e7e (8 hours ago), 2023-04-10 10:09:21 +0800
    • Engine revision 58ab7eaee6
    • Dart version 3.0.0 (build 3.0.0-417.0.dev)
    • DevTools version 2.23.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9619390/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode-14.3.0.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9619390/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] Android Studio (version 2022.1)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9477386/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1)
    • IntelliJ at /Users/nexus/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 73.0.4
    • Dart plugin version 231.8109.91

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1)
    • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.8109.175/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.77.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.60.0

[✓] Connected device (3 available)
    • Dean’s iPad (mobile) • 00008103-000825C811E3401E • ios            • iOS 16.3.1 20D67
    • macOS (desktop)      • macos                     • darwin-arm64   • macOS 13.3.1 22E261 darwin-arm64
    • Chrome (web)         • chrome                    • web-javascript • Google Chrome 112.0.5615.49
    ! Error: Dean’s iPad is busy: Fetching debug symbols for Dean’s iPad. Xcode will continue when Dean’s iPad is finished. (code -10)

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

@danagbemava-nc danagbemava-nc added engine flutter/engine repository. See also e: labels. platform-mac Building on or for macOS specifically a: platform-views Embedding Android/iOS views in Flutter apps c: rendering UI glitches reported at the engine/skia rendering level has reproducible steps The issue has been confirmed reproducible and is ready to work on c: fatal crash Crashes that terminate the process found in release: 3.10 Found to occur in 3.10 and removed in triage Presently being triaged by the triage team labels Apr 10, 2023
@chinmaygarde
Copy link
Member

This seems to be a case of UIKit not being able to handle the case where the contents scale that is NAN (__inline_isnanf((float)(contentsScale))). We should have checks in place to make sure the scale we pass to UIKit elements is valid. Since the assertion is in the transaction commit, it is hard to tell where we set the invalid scale. My guess would be somewhere in the mutator stack. Since there is a reduced test case, it might not be hard to find out.

cc @jmagman @cyanglaz

@chinmaygarde chinmaygarde added the P2 Important issues not at the top of the work list label Apr 10, 2023
@cyanglaz
Copy link
Contributor

cc @cbracken For macOS triage.

@cbracken cbracken self-assigned this Apr 10, 2023
@cbracken
Copy link
Member

Thanks - taking a look.

Heads up @0xZOne that platform views are not yet officially supported on macOS. We're still working on a few things like trackpad gestures, and on the framework side -- the UiKit classes work by chance, rather than by design.

That said, keep filing bugs - the more of these get uncovered before we announce support, the better :)

@VarthanV
Copy link

VarthanV commented May 18, 2023

@cbracken , Any timeline on when Platformview will become stable ? , So that we can adopt it in production

auto-submit bot pushed a commit to flutter/engine that referenced this issue May 18, 2023
This refactors `[FlutterMutatorView applyLayer:]` to split out orthogonal behaviour into smaller functions for better readability/maintainability.

Extracts:
* General transform composition to CATransformFromMutations
* Opacity handling
* MasterClip computation
* RoundedRectClip computation

This change is a cleanup change for readability and makes no semantic changes to how mutator views are applied. Existing unit tests in [FlutterMutatorViewTest.mm](https://github.com/flutter/engine/blob/main/shell/platform/darwin/macos/framework/Source/FlutterMutatorViewTest.mm) are expected to pass without changes.

This is refactoring prior to applying a fix for rotation handling.

Issue: flutter/flutter#124490

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
cbracken added a commit to cbracken/flutter_engine that referenced this issue May 19, 2023
Extracts `updatePathClipViewsWithPaths:origin:` which updates the stack
of AppKit clip views hosting the platform view.

This change is a cleanup change for readability and makes no semantic changes to how mutator views are applied. Existing unit tests in [FlutterMutatorViewTest.mm](https://github.com/flutter/engine/blob/main/shell/platform/darwin/macos/framework/Source/FlutterMutatorViewTest.mm) are expected to pass without changes.

This is refactoring prior to applying a fix for rotation handling.

Issue: flutter/flutter#124490
cbracken added a commit to cbracken/flutter_engine that referenced this issue May 19, 2023
Extracts `updatePathClipViewsWithPaths:origin:` which updates the stack
of AppKit clip views hosting the platform view.

This change is a cleanup change for readability and makes no semantic changes to how mutator views are applied. Existing unit tests in [FlutterMutatorViewTest.mm](https://github.com/flutter/engine/blob/main/shell/platform/darwin/macos/framework/Source/FlutterMutatorViewTest.mm) are expected to pass without changes.

This is refactoring prior to applying a fix for rotation handling.

Issue: flutter/flutter#124490
@cbracken
Copy link
Member

cbracken commented May 19, 2023

@VarthanV For when an issue might be fixed, see: https://github.com/flutter/flutter/wiki/Issue-hygiene#when-will-my-bug-be-fixed

We're actively working on PlatformViews for macOS right now, which will be followed by Windows.

auto-submit bot pushed a commit to flutter/engine that referenced this issue May 19, 2023
Extracts `updatePathClipViewsWithPaths:origin:` which updates the stack of AppKit clip views hosting the platform view.

This change is a cleanup change for readability and makes no semantic changes to how mutator views are applied. Existing unit tests in [FlutterMutatorViewTest.mm](https://github.com/flutter/engine/blob/main/shell/platform/darwin/macos/framework/Source/FlutterMutatorViewTest.mm) are expected to pass without changes.

This is refactoring prior to applying a fix for rotation handling.

Issue: flutter/flutter#124490

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
cbracken added a commit to cbracken/flutter_engine that referenced this issue May 26, 2023
This extracts an extra method from `[FlutterMutatorView
applyFlutterLayer:]` to perform the final PlatformViewContainer and
PlatformView re-nesting in the view stack, then apply transforms, and
finally apply the outer axis-aligned master clip rect around the whole
thing.

This is a refactoring for readability (primarily clearer
parameterisation) and applies no semantic changes to the code.

Issue: flutter/flutter#124490
auto-submit bot pushed a commit to flutter/engine that referenced this issue May 26, 2023
This extracts an extra method from `[FlutterMutatorView applyFlutterLayer:]` to perform the final PlatformViewContainer and PlatformView re-nesting in the view stack, then apply transforms, and finally apply the outer axis-aligned master clip rect around the whole thing.

This is a refactoring for readability (primarily clearer parameterisation) and applies no semantic changes to the code. This is the last in a series of refactoring applied to this method.

Issue: flutter/flutter#124490

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
@knopp
Copy link
Member

knopp commented May 29, 2023

I do remember testing rotation when working on the mutator view, but there are probably edge cases that I missed. I'll give this a go.

@knopp
Copy link
Member

knopp commented May 30, 2023

I have a fix for this here: https://github.com/knopp/engine/commits/macos_fix_platform_view_rotation
Just need to find some time to write tests for this.

@cbracken
Copy link
Member

I've actually got a stack of patches I'm in the middle of sharding out to refactor and land the fix, but didn't want to send it in one mega-patch in order to keep things manageable for reviewers. There are a couple more small refactor patches and then should be set. I'll have a look at your patch in case there are substantial differences. I've got a test.

@knopp
Copy link
Member

knopp commented May 31, 2023

The fix for this is quite straightforward:

  • The container view must implement isFlipped otherwise the rotation is clockwise instead of counter clockwise (this one was fun to figure - that [NSView isFlipped] affects view layer's sublayerTransform)
  • The _platformViewContainer.layer.sublayerTransform was adjusted wrongly. It's much easier to just get the affine transform and adjust the affine transform instead
  • Last part of the fix is to force clipping to path when the transform rotates or shears. In this case clipping to master clip rect is not enough since the master clip rect is expanded to account for the transformation.

cbracken added a commit to cbracken/flutter_engine that referenced this issue Jun 2, 2023
For consistency with Flutter (and all other platforms), Flutter views in
the macOS embedder set `isFlipped` to ensure a co-ordinate system with
the origin in the top-left, with y co-ordinates increasing towards the
bottom edge of the view.

Previously, we were using a stock NSView as the container, which uses a
bottom-left origin by default. Instead we extract the
PlatformView container view as its own class with `isFlipped` true.

This doesn't correct the issue of the view anchorpoint/position but does
correct rotation direction.

This also applies the transform back to origin prior to other transforms
when adjusting the platformview position rather than after.

Issue: flutter/flutter#124490
cbracken added a commit to cbracken/flutter_engine that referenced this issue Jun 2, 2023
For consistency with Flutter (and all other platforms), Flutter views in
the macOS embedder set `isFlipped` to ensure a co-ordinate system with
the origin in the top-left, with y co-ordinates increasing towards the
bottom edge of the view.

Previously, we were using a stock NSView as the container, which uses a
bottom-left origin by default. Instead we extract the
PlatformView container view as its own class with `isFlipped` true.

This doesn't correct the issue of the view anchorpoint/position but does
correct rotation direction.

This also applies the transform back to origin prior to other transforms
when adjusting the platformview position rather than after.

Issue: flutter/flutter#124490
auto-submit bot pushed a commit to flutter/engine that referenced this issue Jun 2, 2023
For consistency with Flutter (and all other platforms), Flutter views in the macOS embedder set `isFlipped` to ensure a co-ordinate system with the origin in the top-left, with y co-ordinates increasing towards the bottom edge of the view.

Previously, we were using a stock NSView as the container, which uses a bottom-left origin by default. Instead we extract the PlatformView container view as its own class with `isFlipped` true.

This doesn't correct the issue of the view anchorpoint/position but does correct rotation direction.

This also applies the transform back to origin prior to other transforms when adjusting the platformview position rather than after.

Issue: flutter/flutter#124490

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
@knopp
Copy link
Member

knopp commented Jun 3, 2023

Fixed via flutter/engine#42523

@knopp knopp closed this as completed Jun 3, 2023
@danagbemava-nc danagbemava-nc added the r: fixed Issue is closed as already fixed in a newer version label Jun 5, 2023
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: desktop Running on desktop a: platform-views Embedding Android/iOS views in Flutter apps c: fatal crash Crashes that terminate the process c: rendering UI glitches reported at the engine/skia rendering level engine flutter/engine repository. See also e: labels. found in release: 3.10 Found to occur in 3.10 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-mac Building on or for macOS specifically r: fixed Issue is closed as already fixed in a newer version
Projects
None yet
Development

No branches or pull requests

8 participants