View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006080 | DarkRadiant | General | public | 24.08.2022 15:51 | 13.01.2024 05:32 |
Reporter | DavyJones | Assigned To | greebo | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
OS | Linux | OS Version | Arch | ||
Product Version | 3.1.0 | ||||
Target Version | 3.2.0 | Fixed in Version | 3.2.0 | ||
Summary | 0006080: Every attempt to load a texture will trigger a SIGSEGV signal caught: 11 | ||||
Description | Its all about Linux version Everytime when I try create new object, prefab etc or just hold left mouse button and start paint got this: SIGSEGV signal caught: 11 0: /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so(_ZN6applog15SegFaultHandler14_handleSigSegvEi+0x4a7) [0x7f0262fe9387] 1: /usr/lib/libc.so.6(+0x38a40) [0x7f026936ba40] 2: /usr/lib/libwx_gtk3u_stc-3.2.so.0(_ZTI12FontRealised+0) [0x7f0269e59188] (darkradiant:6595): Gdk-WARNING **: 18:44:06.095: The program 'darkradiant' received an X Window System error. This probably reflects a bug in the program. The error was 'BadDrawable (invalid Pixmap or Window parameter)'. (Details: serial 4678 error_code 9 request_code 155 (unknown) minor_code 4) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the GDK_SYNCHRONIZE environment variable to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) full backtrace under gdb (GDK_SYNCHRONIZE=1) here: Thread 1 "darkradiant" received signal SIGSEGV, Segmentation fault. 0x00007ffff6ef5188 in typeinfo for FontRealised () from /usr/lib/libwx_gtk3u_stc-3.2.so.0 (gdb) bt #0 0x00007ffff6ef5188 in typeinfo for FontRealised () at /usr/lib/libwx_gtk3u_stc-3.2.so.0 0000001 0x00007fffeba14aaa in image::LoadBMPBuff(stream::PointerInputStream&, unsigned long) () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000002 0x00007fffeba14d16 in image::BMPLoader::load(ArchiveFile&) const () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000003 0x00007fffeba1eb7a in image::ImageLoader::imageFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000004 0x00007fffebe37012 in shaders::GLTextureManager::loadStandardTexture(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000005 0x00007fffebe37f21 in shaders::GLTextureManager::getShaderNotFound() () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000006 0x00007fffebe38718 in shaders::GLTextureManager::getBinding(std::shared_ptr<NamedBindable> const&, BindableTexture::Role) () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000007 0x00007fffebde8d06 in shaders::CShader::getEditorImage() () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so #8 0x00007fffebc974c2 in render::OpenGLShader::constructEditorPreviewPassFromMaterial() () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000009 0x00007fffebc9b60d in render::OpenGLShader::construct() () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000010 0x00007fffebc9afd4 in render::OpenGLShader::realise() () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000011 0x00007fffebcbb545 in render::OpenGLRenderSystem::capture(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<std::shared_ptr<render::OpenGLShader> ()> const&) () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000012 0x00007fffebcbb62e in render::OpenGLRenderSystem::capture(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000013 0x00007fffeb8bf5d2 in SurfaceShader::SurfaceShader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<RenderSystem> const&) () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000014 0x00007fffeb8ba621 in Face::Face(Brush&, BasicVector3<double> const&, BasicVector3<double> const&, BasicVector3<double> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, TextureProjection const&) () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000015 0x00007fffeb885b50 in Brush::addPlane(BasicVector3<double> const&, BasicVector3<double> const&, BasicVector3<double> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, TextureProjection const&) () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000016 0x00007fffeb8872df in Brush::constructCuboid(AABB const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000017 0x00007fffebd724ab in selection::RadiantSelectionSystem::foreachBrush(std::function<void (Brush&)> const&) () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000018 0x00007fffebd0de5f in selection::algorithm::resizeBrushesToBounds(AABB const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000019 0x00007fffebd0e30d in selection::algorithm::resizeSelectedBrushesToBounds(std::vector<cmd::Argument, std::allocator<cmd::Argument> > const&) () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000020 0x00007fffeb8eae85 in cmd::CommandSystem::executeCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<cmd::Argument, std::allocator<cmd::Argument> > const&) () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so 0000021 0x0000555555b08e6a in ui::BrushCreatorTool::onMouseMove(ui::MouseToolEvent&) () 0000022 0x0000555555b1796e in non-virtual thunk to ui::XYWnd::processMouseMoveEvent(std::shared_ptr<ui::MouseTool> const&, int, int) () 0000023 0x00007ffff7f2c0d8 in wxutil::MouseToolHandler::onGLCapturedMouseMove(int, int, unsigned int) () at /usr/local/bin/../lib/darkradiant/libwxutil.so 0000024 0x0000555555b20188 in ui::XYWnd::handleGLCapturedMouseMotion(std::shared_ptr<ui::MouseTool> const&, int, int, unsigned int) () 0000025 0x00007ffff7f223f8 in wxutil::FreezePointer::onMouseMotion(wxMouseEvent&) () at /usr/local/bin/../lib/darkradiant/libwxutil.so 0000026 0x00007ffff794b5b2 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () at /usr/lib/libwx_baseu-3.2.so.0 0000027 0x00007ffff794dff7 in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () at /usr/lib/libwx_baseu-3.2.so.0 0000028 0x00007ffff794e345 in wxEvtHandler::TryHereOnly(wxEvent&) () at /usr/lib/libwx_baseu-3.2.so.0 0000029 0x00007ffff794e3ef in wxEvtHandler::ProcessEventLocally(wxEvent&) () at /usr/lib/libwx_baseu-3.2.so.0 0000030 0x00007ffff794e50a in wxEvtHandler::ProcessEvent(wxEvent&) () at /usr/lib/libwx_baseu-3.2.so.0 0000031 0x00007ffff794eebb in wxEvtHandler::SafelyProcessEvent(wxEvent&) () at /usr/lib/libwx_baseu-3.2.so.0 0000032 0x00007ffff74cab70 in () at /usr/lib/libwx_gtk3u_core-3.2.so.0 0000033 0x00007ffff5886fd8 in () at /usr/lib/libgtk-3.so.0 0000034 0x00007ffff5fd8fd0 in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0 0000035 0x00007ffff6005798 in () at /usr/lib/libgobject-2.0.so.0 0000036 0x00007ffff5ff662c in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0 0000037 0x00007ffff5ff6e74 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0 0000038 0x00007ffff5b46815 in () at /usr/lib/libgtk-3.so.0 0000039 0x00007ffff59e40eb in () at /usr/lib/libgtk-3.so.0 0000040 0x00007ffff59e4fcb in gtk_main_do_event () at /usr/lib/libgtk-3.so.0 0000041 0x00007ffff5746cc3 in () at /usr/lib/libgdk-3.so.0 0000042 0x00007ffff5795068 in () at /usr/lib/libgdk-3.so.0 0000043 0x00007ffff7cd9c6b in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0 0000044 0x00007ffff7d30001 in () at /usr/lib/libglib-2.0.so.0 0000045 0x00007ffff7cd91cf in g_main_loop_run () at /usr/lib/libglib-2.0.so.0 0000046 0x00007ffff59dae2f in gtk_main () at /usr/lib/libgtk-3.so.0 0000047 0x00007ffff74a3f66 in wxGUIEventLoop::DoRun() () at /usr/lib/libwx_gtk3u_core-3.2.so.0 0000048 0x00007ffff7898862 in wxEventLoopBase::Run() () at /usr/lib/libwx_baseu-3.2.so.0 0000049 0x00007ffff7874f08 in wxAppConsoleBase::MainLoop() () at /usr/lib/libwx_baseu-3.2.so.0 0000050 0x00007ffff78d6fa0 in wxEntry(int&, wchar_t**) () at /usr/lib/libwx_baseu-3.2.so.0 0000051 0x00005555556bd08e in main () P.S. already try nvidia proprietary driver and under open source nouveau with same result, so I suppose this is not a driver issue The Dark Mod 2.10 works like a charm and the darkradiant ver 2.* too | ||||
Steps To Reproduce | Start darkradiant, hold left mouse and try to paint something on main window or create new object, prefab etc | ||||
Tags | Bug | ||||
It appears you're using the newer wxWidgets 3.2 release, may I ask which distro you're on? It's possible that this is something related to this new release, we haven't had a chance to fix it yet (if I'm not mistaken). | |
I am using Arch Linux I also try compile with https://aur.archlinux.org/packages/wxgtk3-dev (3.1.7) with same result unfortunately arch drop support wxwidget with gtk2 |
|
This is the same thing I encountered, wx 3.2 and 3.1.7 both had the issue. I had narrowed the issue down to texture loading. It crashes when you create a brush, try to view a model, etc. It doesn't matter which texture format, each of the loaders crash when they try to write the decompressed image into the RGBAImage. That's as far as I got when debugging it. @DavyJones if you're interested, I'm about to release a flatpak version. Keep an eye on https://forums.thedarkmod.com/index.php?/topic/21478-darkradiant-install-with-flatpak-linux in the next day or two. |
|
I definitely take a look on this, thx @jonri ! | |
I looked into this, and I believe something is linked incorrectly. It appears there is a class RGBAImage in both the libradiantcore binary as well as the /usr/lib/libwx_gtk3u_stc-3.2.so.0.0.0 module (in Arch). The GDB stacktrace already reveals that something weird is going on: - 0 0x00007ffff6ef5188 in typeinfo for FontRealised () at /usr/lib/libwx_gtk3u_stc-3.2.so.0 - 1 0x00007fffeba14aaa in image::LoadBMPBuff(stream::PointerInputStream&, unsigned long) () at /usr/local/bin/../lib/darkradiant/modules/libradiantcore.so Nothing in that LoadBMPBuff method is ever calling anything near the Scintilla library. On my end, I get the same when loading TGA files, and both code paths sooner or later try to access a member of the RGBAImage class defined in DarkRadiant's libs/RGBAImage.h. The compiler doesn't complain about any duplicated class, because RGBAImage is a private implementation detail in the scintilla sources (compare wxWidgets sources, file src\stc\scintilla\src\XPM.h), and DarkRadiant's sources cannot even include that XPM.h file. But the libwx_gtk3u_stc-3.2.so shared module exports the RGBAImage symbol, and I suspect the linker is connecting the wrong vtable in ibwx_gtk3u_stc: [greebo@FLAXN:~][2]$ readelf ~/dr/lib/darkradiant/modules/libradiantcore.so -W -C -s | grep "vtable for RGBA" (08-26 19:55) 35194: 0000000001a86ad0 88 OBJECT WEAK DEFAULT 21 vtable for RGBAImage 117323: 0000000001a86ad0 88 OBJECT WEAK DEFAULT 21 vtable for RGBAImage [greebo@FLAXN:~]$ readelf -s -C -W /usr/lib/libwx_gtk3u_stc-3.2.so.0.0.0 | grep "vtable for RGBAImage" (08-26 19:55) 2403: 00000000002101d8 32 OBJECT GLOBAL DEFAULT 18 vtable for RGBAImage I'll try moving DarkRadiant's RGBAImage class into a namespace to see if that resolves the problem. |
|
Yes, that fixed the problem. After moving RGBAImage to namespace image the textures are loading fine. | |
DarkRadiant: master 97e7eab7 26.08.2022 19:14 Details Diff |
0006080: Move RGBAImage to image namespace. This fixes the crash on invoking any member of the RGBAImage class, which had been erroneously linked to a function table of the same name in libwx_gtk3u_stc-3.2.so |
Affected Issues 0006080 |
|
mod - libs/RGBAImage.h | Diff File | ||
mod - radiantcore/imagefile/JPEGLoader.cpp | Diff File | ||
mod - radiantcore/imagefile/TGALoader.cpp | Diff File | ||
mod - radiantcore/shaders/MapExpression.cpp | Diff File | ||
mod - radiantcore/shaders/textures/HeightmapCreator.h | Diff File | ||
mod - radiantcore/shaders/textures/TextureManipulator.cpp | Diff File | ||
DarkRadiant: master 53ea5027 26.08.2022 19:23 Details Diff |
0006080: Remove debug output |
Affected Issues 0006080 |
|
mod - radiantcore/imagefile/TGALoader.cpp | Diff File | ||
DarkRadiant: master 38c50f4b 26.08.2022 19:24 Details Diff |
0006080: Fix unit test compilation |
Affected Issues 0006080 |
|
mod - test/ImageLoading.cpp | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
24.08.2022 15:51 | DavyJones | New Issue | |
24.08.2022 15:51 | DavyJones | Tag Attached: Bug | |
24.08.2022 15:52 | DavyJones | Summary | Segfault when try => Everytime when I try create new object, prefab etc or just hold left mouse button and start paint got SIGSEGV signal caught: 11 |
24.08.2022 15:52 | DavyJones | Steps to Reproduce Updated | |
24.08.2022 15:54 | DavyJones | Description Updated | |
24.08.2022 16:14 | greebo | Status | new => acknowledged |
24.08.2022 16:14 | greebo | Note Added: 0015206 | |
24.08.2022 17:55 | DavyJones | Note Added: 0015208 | |
25.08.2022 14:12 | jonri | Note Added: 0015210 | |
26.08.2022 11:08 | DavyJones | Note Added: 0015211 | |
26.08.2022 17:56 | greebo | Status | acknowledged => confirmed |
26.08.2022 17:56 | greebo | Note Added: 0015212 | |
26.08.2022 19:10 | greebo | Assigned To | => greebo |
26.08.2022 19:10 | greebo | Status | confirmed => assigned |
26.08.2022 19:11 | greebo | Target Version | => 3.2.0 |
26.08.2022 19:11 | greebo | Note Added: 0015213 | |
26.08.2022 19:16 | greebo | Changeset attached | => DarkRadiant master 97e7eab7 |
26.08.2022 19:19 | greebo | Summary | Everytime when I try create new object, prefab etc or just hold left mouse button and start paint got SIGSEGV signal caught: 11 => Every attempt to load a texture will trigger a SIGSEGV signal caught: 11 |
26.08.2022 19:19 | greebo | Status | assigned => resolved |
26.08.2022 19:19 | greebo | Resolution | open => fixed |
26.08.2022 19:19 | greebo | Fixed in Version | => 3.2.0 |
26.08.2022 19:21 | greebo | OS | => Linux |
26.08.2022 19:21 | greebo | OS Version | => Arch |
26.08.2022 19:23 | greebo | Changeset attached | => DarkRadiant master 53ea5027 |
26.08.2022 19:24 | greebo | Changeset attached | => DarkRadiant master 38c50f4b |
13.01.2024 05:32 | greebo | Status | resolved => closed |