-
-
Notifications
You must be signed in to change notification settings - Fork 327
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
GLMakie segmentation fault #4373
Comments
Would you please post a MWE? |
I have also been getting segfaults when interacting/zooming with figures with GLMakie on my M1 MacBook pro. This doesn't happen on Windows. Not much of a MWE, just plot something (maybe it happens more regularly with heatmaps?), interact a bunch with it, and it ends up crashing. |
I don't really have a MWE - it's an app I've been building up to view some datasets that are currently private. I'm working to get it towards a workable state along with example data but in the meantime if there's any advice on how to diagnose the problem I'm happy to take a look locally. |
Hi, I've now released a version of the package - which is still giving problems with segmentation faults. The package is NMRAnalysis (v0.2.0). The interface needs some data to run, I've uploaded a small dataset here: https://github.com/chriswaudby/NMRAnalysis-bug-data/blob/main/data.tgz This contains a single directory, using NMRAnalysis
hetnoe2d(["21/pdata/231","21/pdata/232"],[false,true]) On my system (M3 MacBook), I occasionally get a segfault when the window opens, or upon my first interaction with it - clicking a button, pressing a key, or trying to resize the window. On my student's computer (M1 MacBook) there's a segfault 100% of the time immediately. On a linux cluster, I don't seem to have any issues. My versioninfo:
|
Is it the same as: #4771 (comment) ? |
No, I took a look at the MWE from 4771 and don’t have any problems.I don’t have any problems with simple plots - it’s something that seems to have developed as the complexity of the package has increased. It’s sporadic in my hands (maybe 1 in every 3 or 4 calls) which makes it hard to pin down, but seems to happen all the time on my student’s system!On 12 Feb 2025, at 12:41, Simon ***@***.***> wrote:
Is it the same as: #4771 (comment) ?
Did this start happening at some point and was working fine before?—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
SimonDanisch left a comment (MakieOrg/Makie.jl#4373)
Is it the same as: #4771 (comment) ?
Did this start happening at some point and was working fine before?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hm, maybe it's related and just doesn't lead to a segfault as often on your system. |
Great, happy to help with any testing. On 12 Feb 2025, at 13:15, Simon ***@***.***> wrote:
Hm, maybe it's related and just doesn't lead to a segfault as often on your system.
I think we found a fix for #4771, so maybe you can try that once it's online and see if that fixes it.—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
SimonDanisch left a comment (MakieOrg/Makie.jl#4373)
Hm, maybe it's related and just doesn't lead to a segfault as often on your system.
I think we found a fix for #4771, so maybe you can try that once it's online and see if that fixes it.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
PR is up: #4782 |
I've just run Julia through lldb and attaching a backtrace below - maybe this is helpful?
|
Interesting that it happens in |
OK, have tried this but #4785 doesn’t seem to help. I set MODERNGL_DEBUGGING to true and rebuilt the package but I didn’t notice any additional output?
julia> Process 1489 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x00000001e8be963c GLEngine`gleRunVertexSubmitImmediate + 3424
GLEngine`gleRunVertexSubmitImmediate:
-> 0x1e8be963c <+3424>: ldr s0, [x9]
0x1e8be9640 <+3428>: str s0, [sp, #0xc0]
0x1e8be9644 <+3432>: b 0x1e8be964c ; <+3440>
0x1e8be9648 <+3436>: mov w24, #0x0 ; =0
Target 0: (julia) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x00000001e8be963c GLEngine`gleRunVertexSubmitImmediate + 3424
frame #1: 0x00000001e8b83a68 GLEngine`gleDrawArraysOrElements_ExecCore + 624
frame #2: 0x00000001e8b7d894 GLEngine`glDrawElements_GL3Exec + 412
frame #3: 0x0000000353e1756c nfnZR_lCtp6.dylib`julia_render_59071 at functionloading.jl:73
frame #4: 0x0000000353ce6ac0 nfnZR_lCtp6.dylib`jfptr_render_59072 + 64
frame #5: 0x0000000353ca3080 nfnZR_lCtp6.dylib`julia_StandardPostrender_64038 at GLRenderObject.jl:68
frame #6: 0x0000000353ca30d0 nfnZR_lCtp6.dylib`jfptr_StandardPostrender_64039 + 52
frame #7: 0x0000000353cdee58 nfnZR_lCtp6.dylib`julia_render_59122 at GLRender.jl:93
frame #8: 0x0000000353e09b24 nfnZR_lCtp6.dylib`jfptr_render_59123 + 60
frame #9: 0x0000000353d5f9d0 nfnZR_lCtp6.dylib`julia_render_59082 at GLRender.jl:71
frame #10: 0x0000000353e925c0 nfnZR_lCtp6.dylib`jfptr_render_59083 + 56
frame #11: 0x0000000353df56a0 nfnZR_lCtp6.dylib`julia_render_59184 at rendering.jl:132
frame #12: 0x0000000353cce978 nfnZR_lCtp6.dylib`julia_YY.render_frameYY.158_60702 at rendering.jl:78
frame #13: 0x0000000353df44fc nfnZR_lCtp6.dylib`julia_refreshwindowcb_60164 at rendering.jl:29
frame #14: 0x0000000353df4600 nfnZR_lCtp6.dylib`julia_YY.82_60173 at screen.jl:960
frame #15: 0x0000000353ccf1d0 nfnZR_lCtp6.dylib`jfptr_YY.82_60174 + 64
frame #16: 0x0000000362ee00b8
frame #17: 0x0000000199ee0428 QuartzCore`CA::Layer::display_if_needed(CA::Transaction*) + 744
frame #18: 0x000000019a0651a4 QuartzCore`CA::Context::commit_transaction(CA::Transaction*, double, double*) + 512
frame #19: 0x0000000199ec2e4c QuartzCore`CA::Transaction::commit() + 648
frame #20: 0x00000001956589d0 AppKit`__62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 272
frame #21: 0x0000000196018208 AppKit`___NSRunLoopObserverCreateWithHandler_block_invoke + 64
frame #22: 0x0000000191cd187c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
frame #23: 0x0000000191cd1768 CoreFoundation`__CFRunLoopDoObservers + 536
frame #24: 0x0000000191cd0d94 CoreFoundation`__CFRunLoopRun + 776
frame #25: 0x0000000191cd0434 CoreFoundation`CFRunLoopRunSpecific + 608
frame #26: 0x000000019c47419c HIToolbox`RunCurrentEventLoopInMode + 292
frame #27: 0x000000019c473e2c HIToolbox`ReceiveNextEventCommon + 220
frame #28: 0x000000019c473d30 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 76
frame #29: 0x000000019552fd68 AppKit`_DPSNextEvent + 660
frame #30: 0x0000000195d25808 AppKit`-[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
frame #31: 0x000000019580cfdc AppKit`-[NSWindow(NSWindowResizing) _resizeWithEvent:] + 612
frame #32: 0x000000019572c2e4 AppKit`-[NSTitledFrame attemptResizeWithEvent:] + 156
frame #33: 0x000000019572c0fc AppKit`-[NSThemeFrame handleMouseDown:] + 196
frame #34: 0x00000001957a2894 AppKit`-[NSThemeFrame mouseDown:] + 32
frame #35: 0x00000001956d0dcc AppKit`-[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 3472
frame #36: 0x000000019565c40c AppKit`-[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 288
frame #37: 0x000000019565c118 AppKit`-[NSWindow(NSEventRouting) sendEvent:] + 284
frame #38: 0x0000000195d24828 AppKit`-[NSApplication(NSEventRouting) sendEvent:] + 1604
frame #39: 0x00000003169a0980 libglfw.3.4.dylib`_glfwPollEventsCocoa + 144
frame #40: 0x0000000353c859a4 nfnZR_lCtp6.dylib`julia_pollevents_60055 at glfw3.jl:702
frame #41: 0x0000000353db4278 nfnZR_lCtp6.dylib`julia_on_demand_renderloop_60210 at screen.jl:1028
frame #42: 0x0000000353c8b9bc nfnZR_lCtp6.dylib`julia_renderloop_59818 at screen.jl:1056
frame #43: 0x0000000353c8c7a4 nfnZR_lCtp6.dylib`jfptr_renderloop_59819 + 56
frame #44: 0x0000000353db0258 nfnZR_lCtp6.dylib`julia_YY.79_60159 at screen.jl:916
frame #45: 0x0000000353c88fc4 nfnZR_lCtp6.dylib`jfptr_YY.79_60160 + 52
frame #46: 0x0000000100a6e2ac libjulia-internal.1.11.3.dylib`start_task [inlined] jl_apply(args=0x000000030e805620, nargs=1) at julia.h:2157:12 [opt]
frame #47: 0x0000000100a6e2a0 libjulia-internal.1.11.3.dylib`start_task at task.c:1202:19 [opt]
… On 12 Feb 2025, at 17:28, Simon ***@***.***> wrote:
SimonDanisch
left a comment
(MakieOrg/Makie.jl#4373)
Interesting that it happens in refreshwindowcb.. That gets triggert from the OS e.g. when the window gets focussed/uncovered.
It maybe, that the context is not active, or it gets called from e.g. a thread.
I'm not convinced this helps, but could you try this: #4785 ?
Also, you should set ENV["MODERNGL_DEBUGGING"] = "true", before loading any package.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
<#4785> <#4373 (comment)> <https://github.com/notifications/unsubscribe-auth/ADHS3DCH5MZTD346G74GVYL2POAEXAVCNFSM6AAAAABOLXWMO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJUGM4TSMJRHA>
SimonDanisch
left a comment
(MakieOrg/Makie.jl#4373)
<#4373 (comment)>
Interesting that it happens in refreshwindowcb.. That gets triggert from the OS e.g. when the window gets focussed/uncovered.
It maybe, that the context is not active, or it gets called from e.g. a thread.
I'm not convinced this helps, but could you try this: #4785 <#4785> ?
Also, you should set ENV["MODERNGL_DEBUGGING"] = "true", before loading any package.
—
Reply to this email directly, view it on GitHub <#4373 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADHS3DCH5MZTD346G74GVYL2POAEXAVCNFSM6AAAAABOLXWMO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJUGM4TSMJRHA>.
You are receiving this because you authored the thread.
|
Another trace from a segfault that arose after zooming in to a plot:
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x00000001e8be963c GLEngine`gleRunVertexSubmitImmediate + 3424
GLEngine`gleRunVertexSubmitImmediate:
-> 0x1e8be963c <+3424>: ldr s0, [x9]
0x1e8be9640 <+3428>: str s0, [sp, #0xc0]
0x1e8be9644 <+3432>: b 0x1e8be964c ; <+3440>
0x1e8be9648 <+3436>: mov w24, #0x0 ; =0
Target 0: (julia) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x00000001e8be963c GLEngine`gleRunVertexSubmitImmediate + 3424
frame #1: 0x00000001e8b83a68 GLEngine`gleDrawArraysOrElements_ExecCore + 624
frame #2: 0x00000001e8b7d894 GLEngine`glDrawElements_GL3Exec + 412
frame #3: 0x000000032430cbd4 nfnZR_8pCiU.dylib`julia_render_59077 at functionloading.jl:73
frame #4: 0x000000032443b2b0 nfnZR_8pCiU.dylib`jfptr_render_59078 + 64
frame #5: 0x000000032435b520 nfnZR_8pCiU.dylib`julia_StandardPostrender_63972 at GLRenderObject.jl:68
frame #6: 0x0000000324489650 nfnZR_8pCiU.dylib`jfptr_StandardPostrender_63973 + 52
frame #7: 0x00000003243f5aa0 nfnZR_8pCiU.dylib`julia_render_59046 at GLRender.jl:93
frame #8: 0x00000003243f5d6c nfnZR_8pCiU.dylib`jfptr_render_59047 + 60
frame #9: 0x000000032432c450 nfnZR_8pCiU.dylib`julia_render_59006 at GLRender.jl:71
frame #10: 0x000000032432c49c nfnZR_8pCiU.dylib`jfptr_render_59007 + 56
frame #11: 0x000000032428eeec nfnZR_8pCiU.dylib`julia_render_59126 at rendering.jl:132
frame #12: 0x000000032429176c nfnZR_8pCiU.dylib`julia_YY.render_frameYY.160_60662 at rendering.jl:78
frame #13: 0x00000003243a42f4 nfnZR_8pCiU.dylib`julia_on_demand_renderloop_60150 at rendering.jl:29
frame #14: 0x0000000324382420 nfnZR_8pCiU.dylib`julia_renderloop_59760 at screen.jl:1055
frame #15: 0x0000000324259898 nfnZR_8pCiU.dylib`jfptr_renderloop_59761 + 56
frame #16: 0x0000000324276180 nfnZR_8pCiU.dylib`julia_YY.79_60101 at screen.jl:916
frame #17: 0x000000032439caac nfnZR_8pCiU.dylib`jfptr_YY.79_60102 + 52
frame #18: 0x0000000100a6e2ac libjulia-internal.1.11.3.dylib`start_task [inlined] jl_apply(args=0x0000000356a92430, nargs=1) at julia.h:2157:12 [opt]
frame #19: 0x0000000100a6e2a0 libjulia-internal.1.11.3.dylib`start_task at task.c:1202:19 [opt]
… On 12 Feb 2025, at 17:44, Chris Waudby ***@***.***> wrote:
OK, have tried this but #4785 doesn’t seem to help. I set MODERNGL_DEBUGGING to true and rebuilt the package but I didn’t notice any additional output?
julia> Process 1489 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x00000001e8be963c GLEngine`gleRunVertexSubmitImmediate + 3424
GLEngine`gleRunVertexSubmitImmediate:
-> 0x1e8be963c <+3424>: ldr s0, [x9]
0x1e8be9640 <+3428>: str s0, [sp, #0xc0]
0x1e8be9644 <+3432>: b 0x1e8be964c ; <+3440>
0x1e8be9648 <+3436>: mov w24, #0x0 ; =0
Target 0: (julia) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x00000001e8be963c GLEngine`gleRunVertexSubmitImmediate + 3424
frame #1: 0x00000001e8b83a68 GLEngine`gleDrawArraysOrElements_ExecCore + 624
frame #2: 0x00000001e8b7d894 GLEngine`glDrawElements_GL3Exec + 412
frame #3: 0x0000000353e1756c nfnZR_lCtp6.dylib`julia_render_59071 at functionloading.jl:73
frame #4: 0x0000000353ce6ac0 nfnZR_lCtp6.dylib`jfptr_render_59072 + 64
frame #5: 0x0000000353ca3080 nfnZR_lCtp6.dylib`julia_StandardPostrender_64038 at GLRenderObject.jl:68
frame #6: 0x0000000353ca30d0 nfnZR_lCtp6.dylib`jfptr_StandardPostrender_64039 + 52
frame #7: 0x0000000353cdee58 nfnZR_lCtp6.dylib`julia_render_59122 at GLRender.jl:93
frame #8: 0x0000000353e09b24 nfnZR_lCtp6.dylib`jfptr_render_59123 + 60
frame #9: 0x0000000353d5f9d0 nfnZR_lCtp6.dylib`julia_render_59082 at GLRender.jl:71
frame #10: 0x0000000353e925c0 nfnZR_lCtp6.dylib`jfptr_render_59083 + 56
frame #11: 0x0000000353df56a0 nfnZR_lCtp6.dylib`julia_render_59184 at rendering.jl:132
frame #12: 0x0000000353cce978 nfnZR_lCtp6.dylib`julia_YY.render_frameYY.158_60702 at rendering.jl:78
frame #13: 0x0000000353df44fc nfnZR_lCtp6.dylib`julia_refreshwindowcb_60164 at rendering.jl:29
frame #14: 0x0000000353df4600 nfnZR_lCtp6.dylib`julia_YY.82_60173 at screen.jl:960
frame #15: 0x0000000353ccf1d0 nfnZR_lCtp6.dylib`jfptr_YY.82_60174 + 64
frame #16: 0x0000000362ee00b8
frame #17: 0x0000000199ee0428 QuartzCore`CA::Layer::display_if_needed(CA::Transaction*) + 744
frame #18: 0x000000019a0651a4 QuartzCore`CA::Context::commit_transaction(CA::Transaction*, double, double*) + 512
frame #19: 0x0000000199ec2e4c QuartzCore`CA::Transaction::commit() + 648
frame #20: 0x00000001956589d0 AppKit`__62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 272
frame #21: 0x0000000196018208 AppKit`___NSRunLoopObserverCreateWithHandler_block_invoke + 64
frame #22: 0x0000000191cd187c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
frame #23: 0x0000000191cd1768 CoreFoundation`__CFRunLoopDoObservers + 536
frame #24: 0x0000000191cd0d94 CoreFoundation`__CFRunLoopRun + 776
frame #25: 0x0000000191cd0434 CoreFoundation`CFRunLoopRunSpecific + 608
frame #26: 0x000000019c47419c HIToolbox`RunCurrentEventLoopInMode + 292
frame #27: 0x000000019c473e2c HIToolbox`ReceiveNextEventCommon + 220
frame #28: 0x000000019c473d30 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 76
frame #29: 0x000000019552fd68 AppKit`_DPSNextEvent + 660
frame #30: 0x0000000195d25808 AppKit`-[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
frame #31: 0x000000019580cfdc AppKit`-[NSWindow(NSWindowResizing) _resizeWithEvent:] + 612
frame #32: 0x000000019572c2e4 AppKit`-[NSTitledFrame attemptResizeWithEvent:] + 156
frame #33: 0x000000019572c0fc AppKit`-[NSThemeFrame handleMouseDown:] + 196
frame #34: 0x00000001957a2894 AppKit`-[NSThemeFrame mouseDown:] + 32
frame #35: 0x00000001956d0dcc AppKit`-[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 3472
frame #36: 0x000000019565c40c AppKit`-[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 288
frame #37: 0x000000019565c118 AppKit`-[NSWindow(NSEventRouting) sendEvent:] + 284
frame #38: 0x0000000195d24828 AppKit`-[NSApplication(NSEventRouting) sendEvent:] + 1604
frame #39: 0x00000003169a0980 libglfw.3.4.dylib`_glfwPollEventsCocoa + 144
frame #40: 0x0000000353c859a4 nfnZR_lCtp6.dylib`julia_pollevents_60055 at glfw3.jl:702
frame #41: 0x0000000353db4278 nfnZR_lCtp6.dylib`julia_on_demand_renderloop_60210 at screen.jl:1028
frame #42: 0x0000000353c8b9bc nfnZR_lCtp6.dylib`julia_renderloop_59818 at screen.jl:1056
frame #43: 0x0000000353c8c7a4 nfnZR_lCtp6.dylib`jfptr_renderloop_59819 + 56
frame #44: 0x0000000353db0258 nfnZR_lCtp6.dylib`julia_YY.79_60159 at screen.jl:916
frame #45: 0x0000000353c88fc4 nfnZR_lCtp6.dylib`jfptr_YY.79_60160 + 52
frame #46: 0x0000000100a6e2ac libjulia-internal.1.11.3.dylib`start_task [inlined] jl_apply(args=0x000000030e805620, nargs=1) at julia.h:2157:12 [opt]
frame #47: 0x0000000100a6e2a0 libjulia-internal.1.11.3.dylib`start_task at task.c:1202:19 [opt]
> On 12 Feb 2025, at 17:28, Simon ***@***.***> wrote:
>
>
> SimonDanisch
> left a comment
> (MakieOrg/Makie.jl#4373)
> Interesting that it happens in refreshwindowcb.. That gets triggert from the OS e.g. when the window gets focussed/uncovered.
> It maybe, that the context is not active, or it gets called from e.g. a thread.
> I'm not convinced this helps, but could you try this: #4785 ?
> Also, you should set ENV["MODERNGL_DEBUGGING"] = "true", before loading any package.
>
> —
> Reply to this email directly, view it on GitHub, or unsubscribe.
> You are receiving this because you authored the thread.
>
> <#4785> <#4373 (comment)> <https://github.com/notifications/unsubscribe-auth/ADHS3DCH5MZTD346G74GVYL2POAEXAVCNFSM6AAAAABOLXWMO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJUGM4TSMJRHA>
>
> SimonDanisch
> left a comment
> (MakieOrg/Makie.jl#4373)
> <#4373 (comment)>
> Interesting that it happens in refreshwindowcb.. That gets triggert from the OS e.g. when the window gets focussed/uncovered.
> It maybe, that the context is not active, or it gets called from e.g. a thread.
> I'm not convinced this helps, but could you try this: #4785 <#4785> ?
> Also, you should set ENV["MODERNGL_DEBUGGING"] = "true", before loading any package.
>
> —
> Reply to this email directly, view it on GitHub <#4373 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADHS3DCH5MZTD346G74GVYL2POAEXAVCNFSM6AAAAABOLXWMO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJUGM4TSMJRHA>.
> You are receiving this because you authored the thread.
>
|
I'm creating a data analysis package using GLMakie. I have a toggle switch to turn on data fitting. This normally works fine. However, if I resize the figure window before pressing the switch, I get a segmentation fault:
No other error messages are displayed. I'm unsure how to even begin to debug this - any advice would be welcome.
The text was updated successfully, but these errors were encountered: