slint icon indicating copy to clipboard operation
slint copied to clipboard

App crash with femtovg on mac

Open qarmin opened this issue 1 month ago • 1 comments

Bug Description

Original report with full logs - https://github.com/qarmin/czkawka/issues/1648

Thread 0 Crashed:: main
0   libsystem_platform.dylib      	       0x18356e394 _platform_memmove + 52
1   AppKit                        	       0x1889079cc -[NSSoftwareSurface frontBuffer] + 576
2   AppKit                        	       0x188906454 -[NSCGLSurface flushRect:] + 512
3   AppKit                        	       0x1889061a4 NSCGLSurfaceFlush + 132
4   GLEngine                      	       0x1e8475e40 glSwap_Exec + 256
5   OpenGL                        	       0x1e827f6f8 CGLFlushDrawable + 64
6   AppKit                        	       0x187b24e68 -[NSOpenGLContext flushBuffer] + 28
7   mac_krokiet_heif_avif_arm64   	       0x1012165fc glutin::api::cgl::context::ContextInner::flush_buffer::h1dbd04e5e617446a + 56
8   mac_krokiet_heif_avif_arm64   	       0x1011f2fa8 _$LT$i_slint_backend_winit..renderer..femtovg..glcontext..OpenGLContext$u20$as$u20$i_slint_renderer_femtovg..opengl..OpenGLInterface$GT$::swap_buffers::h1f1661739d9ac92e + 44
9   mac_krokiet_heif_avif_arm64   	       0x101221aac _$LT$i_slint_renderer_femtovg..opengl..OpenGLBackend$u20$as$u20$i_slint_renderer_femtovg..GraphicsBackend$GT$::present_surface::h7fb292dd64b0b968 + 56
10  mac_krokiet_heif_avif_arm64   	       0x1011f3ae4 _$LT$i_slint_backend_winit..renderer..femtovg..GlutinFemtoVGRenderer$u20$as$u20$i_slint_backend_winit..renderer..WinitCompatibleRenderer$GT$::render::h568ccf45dba3d132 + 1680
11  mac_krokiet_heif_avif_arm64   	       0x1011ebeec i_slint_backend_winit::winitwindowadapter::WinitWindowAdapter::draw::he7a517ed61c14ee9 + 320
12  mac_krokiet_heif_avif_arm64   	       0x1011f1864 _$LT$i_slint_backend_winit..event_loop..EventLoopState$u20$as$u20$winit..application..ApplicationHandler$LT$i_slint_backend_winit..SlintEvent$GT$$GT$::window_event::h4d2b63fffb71aefe + 776
13  mac_krokiet_heif_avif_arm64   	       0x1011ded6c winit::platform::pump_events::EventLoopExtPumpEvents::pump_app_events::_$u7b$$u7b$closure$u7d$$u7d$::ha4b4f0ca312373fc + 356
14  mac_krokiet_heif_avif_arm64   	       0x1011dd920 winit::platform_impl::macos::event_loop::map_user_event::_$u7b$$u7b$closure$u7d$$u7d$::h18d5d118d149eae1 + 720
15  mac_krokiet_heif_avif_arm64   	       0x10124e190 winit::platform_impl::macos::app_state::ApplicationDelegate::handle_event::ha5b17830207ebde3 + 144
16  mac_krokiet_heif_avif_arm64   	       0x10125a58c winit::platform_impl::macos::view::WinitView::draw_rect::h47e1c0084b593f97 + 148
17  AppKit                        	       0x1883796dc -[_NSOpenGLViewBackingLayer display] + 716
18  QuartzCore                    	       0x18d232980 CA::Layer::display_if_needed(CA::Transaction*) + 756
19  QuartzCore                    	       0x18d3ca0b4 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 608
20  QuartzCore                    	       0x18d21a39c CA::Transaction::commit() + 644
21  AppKit                        	       0x188680d2c -[NSWindow _setFrameCommon:display:fromServer:] + 2976
22  AppKit                        	       0x18866ebd8 -[NSWindow(NSScreenLayout) _setFrame:fromAdjustmentToScreen:anchorIfNeeded:animate:] + 628
23  AppKit                        	       0x187b385ac -[NSWindow _adjustWindowToScreen] + 1184
24  AppKit                        	       0x18868727c -[NSWindow _displayChangedSoAdjustWindows:] + 100

Reproducible Code (if applicable)

Project - https://github.com/qarmin/czkawka/tree/10.0.0/krokiet

Probably quite hard to reproduce - user had crash after ~0.5h of scanning(exact steps unkonwn)

Environment Details

  • Slint Version: 1.12.1
  • Programming Language: rust
  • Backend/Renderer: femtovg - opengl

Code Type: ARM-64 (Native) Role: Background Parent Process: Exited process [45722] Coalition: com.apple.Terminal [960] Responsible Process: Terminal [41031] User ID: 501

Date/Time: 2025-10-12 23:52:03.5080 +0200 Launch Time: 2025-10-12 20:33:28.3293 +0200 Hardware Model: Mac16,10 OS Version: macOS 26.0.1 (25A362)

Product Impact

No response

qarmin avatar Dec 01 '25 06:12 qarmin

At first glance it looks like we're trying to render immediately after a screen (resolution?) change, or perhaps during a resize of the window. It's odd that make_current() etc all succeeded, macOS didn't report any issue.

tronical avatar Dec 01 '25 08:12 tronical