Closed lbibass closed 3 years ago
can you try to recompile and re run, but with modifying
src\slic3r\GUI\GUI_Preview.cpp@744
if ( wxGetApp().preset_bundle->printers.get_edited_preset().config.option("z_offset") != nullptr )
to
if ( wxGetApp().preset_bundle && wxGetApp().preset_bundle->printers.get_edited_preset().config.option("z_offset"))
?
I really don't see what else can cause a crash.
Or can you test the latest nightly, it has the change.
Or can you test the latest nightly, it has the change.
There is no difference. There is still an immediate crash as soon as the splash screen disappears.
Can you zip & give me your superslicer user directory? maybe it will allow me to replicate. If you rename it to have a new empty one, does it crash?
Can you try to build at different commit, to see what is the wrong commit? first trying with dfc9671dc604a8b7154e288053929cd47cae3516 If it works and the latest nightly crash, then try 3d1cd5c7602f2e30b0dd5e9b29f99165a9524b9d or it doesn't works, can you try with 715d58da888e591116a82f70ba6ff30020275ced (note that these two last commits will change the name of the app, so they will trigger / need a new cmake)
Just a quick info: d4f5d64 works for me correctly, but dfc9671 doesn't work, it fails with a segfault on startup. However, I observed, that sometimes it doesn't crash and the app loads fine. I would say 3 of 5 startup crashes. I'll try to bisect the problem to a specific commit...
@akospalfi thanks there is only
daa2c66546ac83eff67fc1f24f15158e7b2dc775 0fe1664f19f65a2d6ebd9fa402f54c06792e2dde b6d278a36f9917482a85e5786445cae49859cf95 715d58da888e591116a82f70ba6ff30020275ced
between them. daa2c66546ac83eff67fc1f24f15158e7b2dc775 fix the macosx icon (some little changes in the Info.plist inside the dmg. Very low probability 0fe1664f19f65a2d6ebd9fa402f54c06792e2dde is little fix for gcode export. 0 proba that's the issue b6d278a36f9917482a85e5786445cae49859cf95 add a menu entry. Low probability 715d58da888e591116a82f70ba6ff30020275ced add spacing settings. Very high probability that's the problem. But why only on macos?
As it seems that's random ( you can make it launch), I'm going to do a pass on it to check for thread-unsafe things. I'm going to output a new nightly in some hours. If it succeeds to compile, it contains some threadsafing code for settings, so maybe it contains the fix. If you can try.
Yes, I've cherry picked only 715d58d on top of d4f5d64 and the app started to crash randomly on startups. I'll try to make a debug build tomorrow and send you a proper backtrace.
As it seems that's random ( you can make it launch), I'm going to do a pass on it to check for thread-unsafe things. I'm going to output a new nightly in some hours. If it succeeds to compile, it contains some threadsafing code for settings, so maybe it contains the fix. If you can try.
Sure, I'll try it happily.
I protected the only line where a problem can occur (in 715d58d) I'll launch a build on that (it's at the current CI branch)
Seems the CI build is failed, but I think I've got some progress.. I've managed to build a debug build and this build always crashes on startup (strange...). Anyways I was able to capture a backtrace, I hope that helps somehow:
So it seems printer_technology
becomes null at Plater.cpp:6219:38
after 715d58d (with d4f5d64 it has a non-null value).
I just picked your fix (102c882d) to my branch, but the appstart fails at the same point in
superslicer`Slic3r::BackgroundSlicingProcess::select_technology(this=0x000000011e060a90, tech=0) at BackgroundSlicingProcess.cpp:117:18
Just to add to this issue, I have tried all the pre-release 2.3 versions from the releases page. They all crash immediately after the splash screen. MacOS doesn't report a crash as with some other software. The app simply closes immediately. So it doesn't provide me with a possibility to get a crash report. The stable 2.2 version from the releases page does work correctly for me.
@akospalfi it's an assert error, probably not related to the issue. I just add some log to understand what's going on here. can someone on mac test the action build 235 ? It should output some text on the console, can you copy them here?
@supermerill I've tried this action build 235. This one sometimes crashes and sometimes doesn't.
@akospalfi it's an assert error, probably not related to the issue. I just add some log to understand what's going on here. can someone on mac test the action build 235 ? It should output some text on the console, can you copy them here? this is the output from running the executable on the command line.
[2021-04-29 13:56:10.429864] [0x0000000205781e00] [error] 3dx drivers module loading error: dlopen(/Library/Frameworks/3DconnexionClient.framework/3DconnexionClient, 5): image not found
BackgroundSlicingProcess:select_technology(2)
printer_technology:from_preset(- default FFF -) = 93
BackgroundSlicingProcess:select_technology(93)
BackgroundSlicingProcess:select_technology(1)
fish: Job 1, '/Volumes/SuperSlicer/SuperSlice…' terminated by signal SIGSEGV (Address boundary error)
I also am now unable to launch the Brim Ears version as well, even though it used to launch correctly.
@supermerill Oh, yes, sorry these asserts seemed so suspicious to me I forgot that I wanted to track the root of the crash... I've checked out the same branch that was built by action 235, turned off the asserts and rerun the app in the debugger:
palfia@Akoss-iMac build % lldb ./src/superslicer
(lldb) target create "./src/superslicer"
Current executable set to '/Volumes/WORK/myprojects/SuperSlicer/SuperSlicer/build/src/superslicer' (x86_64).
(lldb) process launch -- --loglevel 5 --datadir "/Users/palfia/Library/Application Support/SuperSlicer"
Process 11654 launched: '/Volumes/WORK/myprojects/SuperSlicer/SuperSlicer/build/src/superslicer' (x86_64)
[2021-04-29 20:47:03.307465] [0x0000000111327e00] [debug] full path: 16849348648804176793
[2021-04-29 20:47:03.307724] [0x0000000111327e00] [debug] single instance: undefined. other params: /Volumes/WORK/myprojects/SuperSlicer/SuperSlicer/build/src/superslicer;--loglevel;5;--datadir;"/Users/palfia/Library/Application Support/SuperSlicer"
[2021-04-29 20:47:03.307738] [0x0000000111327e00] [debug] full lock path: /Users/palfia/Library/Application Support/SuperSlicer/cache/16849348648804176793.lock
[2021-04-29 20:47:03.307792] [0x0000000111327e00] [info] instance check: Another instance not found or single-instance not set.
2021-04-29 20:47:03.314583+0200 superslicer[11654:3334020] SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=11654
2021-04-29 20:47:03.314653+0200 superslicer[11654:3334020] SecTaskCopyDebugDescription: superslicer[11654]/0#-1 LF=0
[2021-04-29 20:47:03.714388] [0x0000000111327e00] [info] Checking if indices need to be installed from resources...
20:47:03: Debug: Adding duplicate image handler for 'JPEG file'
[2021-04-29 20:47:03.726337] [0x0000000111327e00] [trace] Best translation language detected (may be different from user locales): en_GB
[2021-04-29 20:47:03.726379] [0x0000000111327e00] [trace] Switching wxLocales to en_GB
BackgroundSlicingProcess:select_technology(1)
[2021-04-29 20:47:04.029943] [0x0000000111327e00] [info] 3dx mac handler starts
[2021-04-29 20:47:04.030196] [0x0000000111327e00] [error] 3dx drivers module loading error: dlopen(/Library/Frameworks/3DconnexionClient.framework/3DconnexionClient, 5): image not found
[2021-04-29 20:47:04.030208] [0x0000000111327e00] [info] 3dx drivers loaded: NO
[2021-04-29 20:47:04.032302] [0x0000000111327e00] [info] Undo / Redo snapshot taken: New Project, Undo / Redo stack memory: 0MB Resident memory: 139MB; Peak memory usage: 139MB
BackgroundSlicingProcess:select_technology(2)
/Volumes/WORK/myprojects/SuperSlicer/SuperSlicer/deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets/src/osx/notebook_osx.cpp(148): assert ""((nPage) < GetPageCount())"" failed in SetPageImage(): SetPageImage: invalid notebook page
Collecting stack trace information, please wait...2021-04-29 20:47:17.760584+0200 superslicer[11654:3334020] SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=11654
2021-04-29 20:47:17.760685+0200 superslicer[11654:3334020] SecTaskCopyDebugDescription: superslicer[11654]/0#-1 LF=0
/Volumes/WORK/myprojects/SuperSlicer/SuperSlicer/deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets/src/osx/notebook_osx.cpp(148): assert ""((nPage) < GetPageCount())"" failed in SetPageImage(): SetPageImage: invalid notebook page
Collecting stack trace information, please wait...[2021-04-29 20:47:32.717735] [0x0000000111327e00] [debug] GLCanvas3D: Use Retina OpenGL: true
[2021-04-29 20:47:32.717810] [0x0000000111327e00] [debug] GLCanvas3D: Use Retina OpenGL: true
printer_technology:from_preset(- default FFF -) = 44
BackgroundSlicingProcess:select_technology(44)
BackgroundSlicingProcess:select_technology(1)
/Volumes/WORK/myprojects/SuperSlicer/SuperSlicer/deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets/include/wx/vector.h(482): assert "idx < m_size" failed in at().
Collecting stack trace information, please wait...[2021-04-29 20:47:44.804145] [0x0000000111327e00] [debug] GLCanvas3D: Use Retina OpenGL: true
[2021-04-29 20:47:44.804188] [0x0000000111327e00] [debug] GLCanvas3D: Use Retina OpenGL: true
Process 11654 stopped
* thread #1, name = 'slic3r_main', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x0000000101cc34b2 superslicer`Slic3r::GUI::Tab::load_current_preset(this=0x000000011198a800) at Tab.cpp:3033:67
3030 }
3031 else {
3032 int page_id = wxGetApp().tab_panel()->FindPage(tab);
-> 3033 wxGetApp().tab_panel()->GetPage(page_id)->Show(false);
3034 wxGetApp().tab_panel()->RemovePage(page_id);
3035 }
3036 }
Target 0: (superslicer) stopped.
(lldb) po wxGetApp().tab_panel()->FindPage(tab)
warning: (x86_64) /Volumes/WORK/myprojects/SuperSlicer/SuperSlicer/build/src/slic3r/liblibslic3r_gui.a(Tab.cpp.o) 0xa900244050: DW_AT_specification(0x0016b3ac) has no decl
warning: (x86_64) /Volumes/WORK/myprojects/SuperSlicer/SuperSlicer/build/src/slic3r/liblibslic3r_gui.a(Tab.cpp.o) 0xa900244c4a: DW_AT_specification(0x0016b41a) has no decl
warning: (x86_64) /Volumes/WORK/myprojects/SuperSlicer/SuperSlicer/build/src/slic3r/liblibslic3r_gui.a(Tab.cpp.o) 0xa90024b400: DW_AT_specification(0x0016b43c) has no decl
-1
(lldb) po wxGetApp().tab_panel()->GetPage(page_id)
/Volumes/WORK/myprojects/SuperSlicer/SuperSlicer/deps/build/dep_wxWidgets-prefix/src/dep_wxWidgets/include/wx/vector.h(482): assert "idx < m_size" failed in at().
Collecting stack trace information, please wait...20:48:16: Debug: cannot read address information for stack frame #0
nullptr
(lldb) bt
* thread #1, name = 'slic3r_main', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x0000000101cc34b2 superslicer`Slic3r::GUI::Tab::load_current_preset(this=0x000000011198a800) at Tab.cpp:3033:67
frame #1: 0x00000001018c00eb superslicer`Slic3r::GUI::GUI_App::load_current_presets(this=0x000000011202b000, check_printer_presets_=true) at GUI_App.cpp:2010:9
frame #2: 0x00000001018bc2ec superslicer`Slic3r::GUI::GUI_App::on_init_inner(this=0x000000011202b000) at GUI_App.cpp:955:9
frame #3: 0x00000001018ba545 superslicer`Slic3r::GUI::GUI_App::OnInit(this=0x000000011202b000) at GUI_App.cpp:770:16
frame #4: 0x000000010319f3a1 superslicer`wxApp::CallOnInit(this=0x000000011202b000) at utils.mm:439:22
frame #5: 0x0000000103358586 superslicer`wxEntry(argc=0x0000000103bc6730, argv=0x00000001115fc9a0) at init.cpp:491:25
frame #6: 0x00000001033587bb superslicer`wxEntry(argc=0x00007ffeefbf7a08, argv=0x00007ffeefbff8f0) at init.cpp:519:12
frame #7: 0x0000000101896b1f superslicer`Slic3r::GUI::GUI_Run(params=0x00007ffeefbf7a08) at GUI_Init.cpp:84:22
frame #8: 0x000000010000d305 superslicer`Slic3r::CLI::run(this=0x00007ffeefbff7d0, argc=5, argv=0x00007ffeefbff8f0) at PrusaSlicer.cpp:572:16
frame #9: 0x0000000100011f59 superslicer`main(argc=5, argv=0x00007ffeefbff8f0) at PrusaSlicer.cpp:773:18
frame #10: 0x00007fff203d2621 libdyld.dylib`start + 1
(lldb)
So the page_id
is -1 at this point in Tab.cpp:3033
and then the wxGetApp().tab_panel()->GetPage(page_id)
returns a nullptr.
My other observation is that if I start the app with a totally empty profile then the app crashes on every startup at the point I quoted above. However if I use a populated profile then sometimes the app can start (randomly crashes). But even when it loads then the print settings preset and filament settings preset combos are empty (and the tabs for these are also missing).
An update: commit 93e5584 works perfectly. I will try progressively more recent commits until it breaks.
edit: 1b35362 works.
Edit: d4f5d64 works.
edit: breaks at dfc9671.
edit: 3d1cd5c doesn't compile. ld: can't write output file to 'src/Slic3r' because that path is a directory
@lbibass thank you, but akospalfi already did that, see https://github.com/supermerill/SuperSlicer/issues/1110#issuecomment-828871855
I submitted the nightly #236: log macos bug, to let you run it and post the output. If the content is again insoluble, I'll try with partial merge of 715d58da888e591116a82f70ba6ff30020275ced
edit: 3d1cd5c doesn't compile. ld: can't write output file to 'src/Slic3r' because that path is a directory
3d1cd5c will fail, it's after dfc9671dc604a8b7154e288053929cd47cae3516 Can you try 715d58da888e591116a82f70ba6ff30020275ced ? merge 715d58da888e591116a82f70ba6ff30020275ced with d4f5d643f3c2b62b724651818b4037f0fd8dd164 for easier compilation if needed.
In the action menu, there is no the build 237 and 238 Can someone with a macos run them to see if they crash. 237 is 715d58d + d4f5d64 238 is the same but with half of 715d58d changes removed.
238: Loaded 10 out of 10 times without issues
237: Loaded 6 out of 10 times.
Unrelated to the issue, but when I try to import my config bundle from Prusa Slicer, I get this error:
ConfigBase::set_deserialize()
failed for parameter "gcode_flavor", value "reprapfirmware"
thank you @mvieleers
now, can somebody run the nightly build
and also give me the log of a run of the 236 build
Unrelated to the issue, but when I try to import my config bundle from Prusa Slicer, I get this error:
k, will fix.
239: Attempt 1: Crashed, attempt 2: ok, attempt 3: crashed, attempt 4: ok, attempt5: crash, attempt6: ok, attempt 7: crashed: attempt 8: ok, attempt 9: crashed, attempt: 10: ok
Version 240: Able to open 3 out of 10 times.
Version 241: Crashed 5 out of 10 times.
and also give me the log of a run of the 236 build
Happy to do this, but not really sure how I can provide you this log....
Happy to do this, but not really sure how I can provide you this log....
on linux, I would start the software in a console and copyhere the lines that would appear on the console.
I don't have linux. On a Mac. I have a the console.app. This is what I was able to capture in that regarding 236. Hope it helps in some way.
Describe the bug SuperSlicer Crashes on launch. To Reproduce Steps to reproduce the behavior: Attempt to open SuperSlicer.
3D Model and Slic3r Configuration Export N/A Expected behavior App Launches. Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context Add any other context about the problem here. Here's the debug log reported by macos. This crash also occurs when running a build compiled on my native machine. This was not a problem as of commit d4f5d643f3c2b62b724651818b4037f0fd8dd164.
log:
```Process: SuperSlicer [34192] Path: /private/var/folders/*/SuperSlicer.app/Contents/MacOS/SuperSlicer Identifier: com.merill.slic3r/ Version: SuperSlicer Slic3r_2.3.56.0 (Slic3r_2.3.56.0) Code Type: X86-64 (Translated) Parent Process: ??? [1] Responsible: SuperSlicer [34192] User ID: 501 Date/Time: 2021-04-26 17:38:00.388 -0400 OS Version: macOS 11.2.3 (20D91) Report Version: 12 Anonymous UUID: A7484206-1361-AE4B-248C-74F12DFEDDC0 Sleep/Wake UUID: DF1B5D9F-5453-47E1-A1D5-70D70F84CF2A Time Awake Since Boot: 70000 seconds Time Since Wake: 8800 seconds System Integrity Protection: enabled Notes: Translocated Process Crashed Thread: 0 slic3r_main Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0xc49dffff88371bf9 -> 0xffffffff88371bf9 (possible pointer authentication failure) Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [34192] VM Regions Near 0xffffffff88371bf9: --> mapped file 7fffe0000000-7fffe22cc000 [ 34.8M] r--/r-- SM=COW Object_id=f3266aa1 Thread 0 Crashed:: slic3r_main Dispatch queue: com.apple.main-thread 0 com.merill.slic3r/ 0x0000000102cea604 Slic3r::GUI::Tab::load_current_preset() + 964 1 com.merill.slic3r/ 0x0000000102bf0cc8 Slic3r::GUI::GUI_App::load_current_presets(bool) + 248 2 com.merill.slic3r/ 0x0000000102bec4e8 Slic3r::GUI::GUI_App::on_init_inner() + 3912 3 com.merill.slic3r/ 0x0000000102beb55b Slic3r::GUI::GUI_App::OnInit() + 11 4 com.merill.slic3r/ 0x0000000103a3ef51 wxApp::CallOnInit() + 417 5 com.merill.slic3r/ 0x0000000103bd1976 wxEntry(int&, wchar_t**) + 198 6 com.merill.slic3r/ 0x0000000103bd1bab wxEntry(int&, char**) + 59 7 com.merill.slic3r/ 0x0000000102bdc69c Slic3r::GUI::GUI_Run(Slic3r::GUI::GUI_InitParams&) + 236 8 com.merill.slic3r/ 0x00000001023359ab Slic3r::CLI::run(int, char**) + 17435 9 com.merill.slic3r/ 0x000000010233a237 main + 439 10 libdyld.dylib 0x00007fff20355621 start + 1 Thread 1:: com.apple.rosetta.exceptionserver 0 runtime 0x00007ffdffd74238 0x7ffdffd72000 + 8760 1 runtime 0x00007ffdffd7e354 0x7ffdffd72000 + 50004 2 runtime 0x00007ffdffd7f1f8 0x7ffdffd72000 + 53752 Thread 2: 0 runtime 0x00007ffdffdcc99c 0x7ffdffd72000 + 371100 Thread 3: 0 runtime 0x00007ffdffdcc99c 0x7ffdffd72000 + 371100 Thread 4: 0 runtime 0x00007ffdffdcc99c 0x7ffdffd72000 + 371100 Thread 5: 0 runtime 0x00007ffdffdcc99c 0x7ffdffd72000 + 371100 Thread 6:: com.apple.NSEventThread 0 ??? 0x00007ffe9634eab8 ??? 1 libsystem_kernel.dylib 0x00007fff20305e7e mach_msg_trap + 10 2 com.apple.CoreFoundation 0x00007fff2043250d __CFRunLoopServiceMachPort + 316 3 com.apple.CoreFoundation 0x00007fff20430bf6 __CFRunLoopRun + 1319 4 com.apple.CoreFoundation 0x00007fff2042ffe2 CFRunLoopRunSpecific + 567 5 com.apple.AppKit 0x00007fff22d0b7c6 _NSEventThread + 124 6 libsystem_pthread.dylib 0x00007fff2033a950 _pthread_start + 224 7 libsystem_pthread.dylib 0x00007fff2033647b thread_start + 15 Thread 7: 0 runtime 0x00007ffdffdcc99c 0x7ffdffd72000 + 371100 Thread 8: 0 runtime 0x00007ffdffdcc99c 0x7ffdffd72000 + 371100 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x00006000022ccd00 rbx: 0xffffffffffffffff rcx: 0xc49dffff88371a41 rdx: 0x000000002f800078 rdi: 0x00006000022ccd00 rsi: 0x0000000000000000 rbp: 0x000000030bf21cf0 rsp: 0x000000030bf21c60 r8: 0x00000000000000cb r9: 0x00000000000007fb r10: 0x0000000000002530 r11: 0x0000000000000050 r12: 0x00007f9f5e263000 r13: 0x00007f9f3f617e60 r14: 0x0000600001919510 r15: 0x0000000004147800 rip: 0x0000000102cea604 rfl: 0x0000000000000242 Binary Images: 0x10232a000 - 0x1040e5fff +com.merill.slic3r/ (SuperSlicer Slic3r_2.3.56.0 - Slic3r_2.3.56.0) <5FA8C71A-D493-3AE0-A625-F57683DFA986> /var/folders/*/SuperSlicer.app/Contents/MacOS/SuperSlicer 0x114474000 - 0x114483fff libobjc-trampolines.dylib (818.2) <0FECD337-2668-3E38-B494-E75D781B054C> /usr/lib/libobjc-trampolines.dylib 0x11a554000 - 0x11a5bbfff com.apple.AppleMetalOpenGLRenderer (1.0 - 1) <700DD696-2785-38FB-ACA0-07F939D1B00C> /System/Library/Extensions/AppleMetalOpenGLRenderer.bundle/Contents/MacOS/AppleMetalOpenGLRenderer 0x11a6a9000 - 0x11ade4fff com.apple.AGXMetal13-3 (172.26.2 - 172.26.2) <6361D994-024D-3335-9F50-6902739D307E> /System/Library/Extensions/AGXMetal13_3.bundle/Contents/MacOS/AGXMetal13_3 0x205ae8000 - 0x205b83fff dyld (832.7.3) <0D4EA85F-7E30-338B-9215-314A5A5539B6> /usr/lib/dyld 0x7ffdffd72000 - 0x7ffdffde5fff +runtime (203.30)