View Issue Details

IDProjectCategoryView StatusLast Update
0005490DarkRadiantCompilation/Buildpublic29.01.2021 14:56
Reportercoldtobi Assigned Toorbweaver  
Status resolvedResolutionduplicate 
Product Version2.10.0 
Fixed in Version2.11.0 
Summary0005490: darkradiant 2.10.0 crashes in pybind / python scripting interface
DescriptionI was packaging darkradiant 2.10. for Debian, but unfortunatly I'm getting a SEGV immediatly with the resulting package.
It could be a Debian issue; though 2.9. works still fine… A bit lost here, maybe you have some hints… I have some Deja Vu, but can't recall right now…)

(PS: Can the CMake base build also be configured to disable the scripting interface?)

The deb packages are available on the Debian CI:

(dont get confused that it says "failed" on the CI state, I did not check yet why it is no longer reproducible building…)

0x00007fffeb8af22b in _PyObject_GC_Malloc () from /usr/lib/x86_64-linux-gnu/
(gdb) bt
#0 0x00007fffeb8af22b in _PyObject_GC_Malloc () at /usr/lib/x86_64-linux-gnu/
0000001 0x00007fffeb8af4f3 in _PyObject_GC_New () at /usr/lib/x86_64-linux-gnu/
0000002 0x00007fffeb7a5a14 in PyDict_New () at /usr/lib/x86_64-linux-gnu/
0000003 0x00007fffebd238c9 in pybind11::dict::dict() (this=0x5555567ecfb8)
    at ./libs/pybind/pybind11/pytypes.h:1277
0000004 script::PythonModule::PythonModule() (this=0x5555567ecfb0) at ./plugins/script/PythonModule.cpp:23
0000005 0x00007fffebd32d44 in script::ScriptingSystem::initialiseModule(IApplicationContext const&)
    (this=0x555555ba4640, ctx=<optimized out>) at ./plugins/script/ScriptingSystem.cpp:306
0000006 0x00007ffff0ca275b in module::ModuleRegistry::initialiseModuleRecursive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (this=0x555555acd400, name=<optimized out>)
    at ./radiantcore/modulesystem/ModuleRegistry.cpp:130
0000007 0x00007ffff0ca252d in module::ModuleRegistry::initialiseModuleRecursive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (this=0x555555acd400, name=<optimized out>)
    at ./radiantcore/modulesystem/ModuleRegistry.cpp:120
#8 0x00007ffff0ca2cac in module::ModuleRegistry::loadAndInitialiseModules() (this=0x555555acd400)
    at ./radiantcore/modulesystem/ModuleRegistry.cpp:179
0000009 0x00007ffff0ce804d in radiant::Radiant::startup() (this=<optimized out>)
    at ./radiantcore/Radiant.cpp:87
0000010 0x00005555556c93f5 in RadiantApp::onStartupEvent(wxCommandEvent&) (this=
    0x555555a1ec90, ev=<optimized out>) at ./radiant/RadiantApp.cpp:172
0000011 0x00007ffff7d35241 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () at /usr/lib/x86_64-linux-gnu/
0000012 0x00007ffff7d355ba in wxEvtHandler::SearchDynamicEventTable(wxEvent&) ()
    at /usr/lib/x86_64-linux-gnu/
0000013 0x00007ffff7d35650 in wxEvtHandler::TryHereOnly(wxEvent&) ()
    at /usr/lib/x86_64-linux-gnu/
0000014 0x00007ffff7d35703 in wxEvtHandler::ProcessEventLocally(wxEvent&) ()
    at /usr/lib/x86_64-linux-gnu/
0000015 0x00007ffff7d357a1 in wxEvtHandler::ProcessEvent(wxEvent&) ()
    at /usr/lib/x86_64-linux-gnu/
0000016 0x00007ffff7d3614e in wxEvtHandler::ProcessPendingEvents() ()
    at /usr/lib/x86_64-linux-gnu/
0000017 0x00007ffff7bbbf7f in wxAppConsoleBase::ProcessPendingEvents() ()
    at /usr/lib/x86_64-linux-gnu/
0000018 0x00007ffff7726a69 in wxApp::DoIdle() () at /usr/lib/x86_64-linux-gnu/
0000019 0x00007ffff7726b63 in () at /usr/lib/x86_64-linux-gnu/
0000020 0x00007ffff5b8fc3f in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/
0000021 0x00007ffff5b8ffe8 in () at /usr/lib/x86_64-linux-gnu/
0000022 0x00007ffff5b902db in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/
0000023 0x00007ffff61c7b95 in gtk_main () at /usr/lib/x86_64-linux-gnu/
0000024 0x00007ffff7743955 in wxGUIEventLoop::DoRun() ()
    at /usr/lib/x86_64-linux-gnu/
0000025 0x00007ffff7bf497d in wxEventLoopBase::Run() () at /usr/lib/x86_64-linux-gnu/
0000026 0x00007ffff7bbd9a6 in wxAppConsoleBase::MainLoop() ()
    at /usr/lib/x86_64-linux-gnu/
0000027 0x00007ffff7c45a19 in wxEntry(int&, wchar_t**) () at /usr/lib/x86_64-linux-gnu/
0000028 0x00005555556522d2 in main(int, char**) (argc=<optimized out>, argv=<optimized out>)
    at ./radiant/main.cpp:7
(gdb) quit
A debugging session is active.

    Inferior 1 [process 24541] will be killed.

Quit anyway? (y or n) y

TagsNo tags attached.


duplicate of 0005469 resolvedgreebo Crash in master on startup 




16.01.2021 17:26

developer   ~0013463

Unfortunately I can't reproduce this. I tried building the .deb both from my own master branch and from Greebo's master, and both produce a binary which starts up fine. I assume there must be some difference in build environment which gives rise to this behaviour, but I don't have any idea what the difference could be.


16.01.2021 17:28

developer   ~0013464

In answer to your question: currently no, the scripting interface cannot be disabled at build time. I did not introduce this option into the CMake build scripts because the current code does not treat the scripting module as optional, and failing to build the module would therefore cause undefined behaviour (null reference). We could reintroduce this if it was particularly needed.


16.01.2021 17:35

reporter   ~0013465

I've recompiled 2.9 with the current dependencies in Debian: It works. This might an indication that its not an updated dependencies causing this. Time permitting, I'll trying to do some bisecting tomorrow.


16.01.2021 17:36

reporter   ~0013466

Last edited: 16.01.2021 17:37

View 2 revisions

@Orbweaver: Can you post or mail me the .buildinfo file? And/Or put the generated debs somewhere?
(tobi at debian dot org)


16.01.2021 18:56

administrator   ~0013467

Since the crash is happening during module initialisation, my guess is on the pybind11 objects being used too early. Newer Python or pybind11 versions are more sensitive to objects being created before the binding is properly initialized, which might be the case here. I have to investigate to be sure though.


17.01.2021 06:01

administrator   ~0013470

I just realised you're talking about the 2.10 release. This issue you're mentioning has been fixed in 0005469. Maybe cherry-pick the fix for this package?


17.01.2021 07:40

reporter   ~0013472

@geebo I cherry-picked this one:
And that seems to fix the crash.

Thanks a lot!


17.01.2021 08:32

administrator   ~0013473



17.01.2021 19:45

developer   ~0013476

Oops, I never noticed the mention of 2.10. That might explain why I couldn't reproduce the issue, since I was compiling latest master (which corresponds to the upcoming 2.11). In any case, I'm glad that it's sorted now.


18.01.2021 06:40

reporter   ~0013480

Do you have an ETA for 2.11?
(Debian is freezing right now for Bullseye release [1], but if it is before Feb 12th minus a week (the time I need + testing migration delay) , I can try to get that in Debian 11 as well.)


19.01.2021 05:04

administrator   ~0013481

We're in stabilising mode right now, usually I try to get some things done during the weekends. Can't promise anything, but if the bug wave calms down quickly, then it's possible.


29.01.2021 14:11

administrator   ~0013564

FYI, DR 2.11 has just left the factory


29.01.2021 14:56

reporter   ~0013566


Uploading to ftp-master (via ftp to
  Uploading darkradiant_2.11.0-1.dsc: done.
  Uploading darkradiant_2.11.0.orig.tar.gz: done.
  Uploading darkradiant_2.11.0-1.debian.tar.xz: done.
  Uploading darkradiant_2.11.0-1_source.buildinfo: done.
  Uploading darkradiant_2.11.0-1_source.changes: done.
Successfully uploaded packages.


Have a nice weekend!

Issue History

Date Modified Username Field Change
16.01.2021 13:09 coldtobi New Issue
16.01.2021 16:53 orbweaver Assigned To => orbweaver
16.01.2021 16:53 orbweaver Status new => acknowledged
16.01.2021 17:26 orbweaver Note Added: 0013463
16.01.2021 17:28 orbweaver Note Added: 0013464
16.01.2021 17:35 coldtobi Note Added: 0013465
16.01.2021 17:36 coldtobi Note Added: 0013466
16.01.2021 17:37 coldtobi Note Edited: 0013466 View Revisions
16.01.2021 18:56 greebo Note Added: 0013467
17.01.2021 06:00 greebo Relationship added related to 0005469
17.01.2021 06:01 greebo Note Added: 0013470
17.01.2021 06:02 greebo Relationship replaced duplicate of 0005469
17.01.2021 07:40 coldtobi Note Added: 0013472
17.01.2021 08:32 greebo Status acknowledged => resolved
17.01.2021 08:32 greebo Resolution open => duplicate
17.01.2021 08:32 greebo Fixed in Version => 2.11.0
17.01.2021 08:32 greebo Note Added: 0013473
17.01.2021 19:45 orbweaver Note Added: 0013476
18.01.2021 06:40 coldtobi Note Added: 0013480
19.01.2021 05:04 greebo Note Added: 0013481
29.01.2021 14:11 greebo Note Added: 0013564
29.01.2021 14:56 coldtobi Note Added: 0013566