Commit 0f26ad8
LANGUAGES: Fix silent segfault due to module dependency in part-cw#330
Using "(not safe)" in languages/scm.sh causes a segfault whenever apps include scheduler before ln_glgui in their MODULE list.
This was extremely hard to debug as there is no crash dump, lldb only shows a jump error and it doesn't happen in debug mode. In the end the actual problem is (#!unbound2 frame-period-custom: '#<procedure #2>) caused by (glgui-timings-at-10msec!) being called in a function-exists? in modules/scheduler/scheduler.scm, while glgui-timings-set! is an internally declared function pointing to timings-set!, which is only initialized after the define of glgui-event runs.
The solution is to either ensure scheduler is never listed before ln_glgui in MODULES, or fixing this by making it a scm_coremodules, which this change does. It is possible that this order change causes other problems for custom modules that need to be run before ln_glgui, but are not a scm_coremodules but the ones we ship are fine.1 parent f0e039f commit 0f26ad8
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
0 commit comments