Jump to content
The Dark Mod Forums

DarkRadiant 2.0.0 released


Recommended Posts

DarkRadiant 2.0.0 is finally ready for download. This is a major release, the entire UI code has been migrated from GTK+2 to wxWidgets 3.0. Most of the work went into the migration, but a few features and stability fixes made it into this release nonetheless, for example fixed rendering of projected lights and some usability improvements.

 

Download DarkRadiant from our website: http://darkradiant.sourceforge.net/. Thanks go out to the brave pre-release testers, most prominently motorsep and SteveL!

 

You will need to download the VC++ redistributable to 2013 for your Windows system, get it here:

It wil take a bit until the website and wiki will be updated, but I'll slowly work towards that goal. I'll also ask OrbWeaver if he is motivated to look into uploading an Ubuntu 14.04 release to his PPA. Note that releases of Ubuntu older than 14.04 don't have a proper wxWidgets 3.0 development package, so it's unlikely that these will be able to run DarkRadiant 2.0+.

 

Some Remarks

  • It's not necessary to clear out your preferences created by older versions of DarkRadiant. DR 2.0 should be able to load them just fine.
  • However, at this point, the older 1.8.x releases can not load the preferences that were created by DR 2.0+, so please keep backups of your settings if you intend to switch back.
  • This release has been tested as well as possible given the small number of volunteers around here. Switching the UI framework was a major change and it's very well possible that there are some kinks to iron out here and there. Just save your production work as often as possible, as you've always been doing (hopefully).
  • Windows XP is no longer supported. If you still need to work on that platform, you'll need to keep using the older DR versions.
  • At the moment there's only a x64 build available, I'll try to push an x86 build if there's demand for it (post below in that case).

As usual and especially for this release, please report any bugs or feature requests here in these forums, following these guidelines:

  • Bugs (including steps for reproduction) can go directly on the tracker. When unsure about a bug/issue, feel free to ask.
  • Feature requests should be suggested (and possibly discussed) here in these forums before they may be added to the tracker.

As probably not everybody is reading the changelogs, here is the summary of changes:

 

New Features / Changes

  • Migrate GTK and GLib code to wxWidgets 3.0 (#3777)
  • Fast/slow camera movement switch (#2381)
  • Add "Paste Texture Name only" to mouse shortcuts (#3795)
  • Selecting a shader in the TextureBrowser should fill the ShaderClipboard with the shader name (#3794)
  • Render wireframe from behind for selected patches (#84)

Bugfixes

  • Fixed: Light shaders appearing the wrong way around (orientation) in DR campared to in-game (#3359).
  • Fixed: Rendering of projected lights is not correct (#272)
  • Fixed: Can no longer see edges of selections (#3799)
  • Fixed: Filtering entities doesn't deselect them (#3783)

A more comprehensive list of changes can be found on the our bugtracker changelog.

 

Have fun mapping!

Edited by greebo
Link to comment
Share on other sites

Gratz on the release, and THANK YOU for saving DR from disappearing from under us as GTK support for Windows dwindles. An incredible piece of work. It's a trivial point compared with the enormous achievement of migrating the UI, but my favourite bit is being able to see a patch from behind :) And the whole thing feels cleaner and more modern. Get stuck in guys.

Link to comment
Share on other sites

Don't know if this is a bug but i was playing with the md5 animation viewer in DR 2.0 and my PC complained of low memory and asked me to close programs.

 

Only had DR and Google chrome open and i have 8GB of RAM, this never happened with Chrome before so i suspect DR is the culprit.

Link to comment
Share on other sites

I'll also ask OrbWeaver if he is motivated to look into uploading an Ubuntu 14.04 release to his PPA.

 

No problem, however I am experiencing some major issues with the latest build on Linux (I assume your master branch is the correct one to merge).

 

There are several hundred console error messages at startup similar the the following (even after completely wiping my ~/.darkradiant directory):

 

 

12:44:02: Debug: No accel key found, accel string ignored.
12:44:02: Debug: No accel key found, accel string ignored.
12:44:02: Debug: No accel key found, accel string ignored.
12:44:02: Debug: No accel key found, accel string ignored.
12:44:02: Debug: No accel key found, accel string ignored.
12:44:02: Debug: Unknown accel modifier: ' ctrl'
12:44:02: Debug: Unrecognized accel key 'shift~numpad_subtract', accel string ignored.
12:44:02: Debug: No accel key found, accel string ignored.
12:44:02: Debug: No accel key found, accel string ignored.
12:44:02: Debug: No accel key found, accel string ignored.
12:44:02: Debug: Unrecognized accel key ' ctrl~numpad_subtract', accel string ignored.
12:44:02: Debug: No accel key found, accel string ignored.
12:44:02: Debug: Unrecognized accel key ' ctrl~i', accel string ignored.
12:44:02: Debug: No accel key found, accel string ignored.
12:44:02: Debug: Unrecognized accel key ' ctrl~e', accel string ignored.
12:44:02: Debug: No accel key found, accel string ignored.

 

 

Sometimes the splash screen deadlocks, with the following stack trace:

 

 

#0  0x00007ffff3d6ec6d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fffec30cb72 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007fffec30e3ff in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007fffec30e512 in xcb_wait_for_reply () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#4  0x00007ffff221348f in _XReply () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#5  0x00007ffff220f0cd in XSync () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#6  0x00007ffff27b43b1 in gdk_flush () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#7  0x00007ffff2784d2e in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#8  0x00007ffff2785720 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#9  0x00007ffff27b2a46 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#10 0x00007ffff2797ae1 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#11 0x00007ffff5d94a6e in wxWindowDCImpl::DoDrawBitmap(wxBitmap const&, int, int, bool) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#12 0x0000000000593267 in wxDC::DrawBitmap (this=0x7fffffffcab0, bmp=..., x=0, y=0, useMask=false) at /usr/include/wx-3.0/wx/dc.h:1212
#13 0x00000000005924b2 in ui::wxImagePanel::render (this=0xd6a450, dc=...) at ui/splash/Splash.cpp:74
#14 0x00000000005923e9 in ui::wxImagePanel::paintEvent (this=0xd6a450, evt=...) at ui/splash/Splash.cpp:62
#15 0x00007ffff56e311e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#16 0x00007ffff5856282 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#17 0x00007ffff5856333 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#18 0x00007ffff585668d in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#19 0x00007ffff5856703 in wxEvtHandler::ProcessEventLocally(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#20 0x00007ffff5856765 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#21 0x00007ffff58564f7 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#22 0x00007ffff5d91471 in wxWindow::GTKSendPaintEvents(_GdkRegion const*) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#23 0x00007ffff5d91af4 in ?? () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#24 0x00007ffff2b3c815 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#25 0x00007ffff251c3b8 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#26 0x00007ffff252dd3d in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#27 0x00007ffff25356f9 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#28 0x00007ffff2535ce2 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#29 0x00007ffff2c4c724 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#30 0x00007ffff2b3b610 in gtk_main_do_event () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#31 0x00007ffff279dedf in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#32 0x00007ffff279de85 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#33 0x00007ffff279de85 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#34 0x00007ffff279ab5a in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#35 0x00007ffff279b5cd in gdk_window_process_updates () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#36 0x00007ffff5d8befc in wxWindow::Update() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#37 0x0000000000592aa6 in ui::Splash::queueDraw (this=0xd3dbc0) at ui/splash/Splash.cpp:129
#38 0x00000000005929ae in ui::Splash::setText (this=0xd3dbc0, text=...) at ui/splash/Splash.cpp:110
#39 0x0000000000592a44 in ui::Splash::setProgressAndText (this=0xd3dbc0, text=..., fraction=0.949999988) at ui/splash/Splash.cpp:121
#40 0x00000000004815b7 in radiant::RadiantModule::postModuleInitialisation (this=0xc5d8d0) at RadiantModule.cpp:249
#41 0x000000000047c8d3 in RadiantApp::onStartupEvent (this=0xc9d3d0, ev=...) at main.cpp:91
#42 0x00007ffff56e311e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#43 0x00007ffff5856282 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#44 0x00007ffff58565e6 in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#45 0x00007ffff585666e in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#46 0x00007ffff5856703 in wxEvtHandler::ProcessEventLocally(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#47 0x00007ffff5856765 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#48 0x00007ffff5857783 in wxEvtHandler::ProcessPendingEvents() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#49 0x00007ffff56e6cd7 in wxAppConsoleBase::ProcessPendingEvents() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#50 0x00007ffff5d5c902 in wxApp::DoIdle() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#51 0x00007ffff5d5ca13 in ?? () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#52 0x00007ffff15d2ce5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#53 0x00007ffff15d3048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#54 0x00007ffff15d330a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#55 0x00007ffff2b3a447 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#56 0x00007ffff5d6f145 in wxGUIEventLoop::DoRun() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#57 0x00007ffff5725440 in wxEventLoopBase::Run() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#58 0x00007ffff56e51fd in wxAppConsoleBase::MainLoop() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#59 0x000000000047ab58 in main (argc=1, argv=0x7fffffffde38) at main.cpp:153

 

 

Sometimes this is actually a crash (with a XLib error message) rather than a deadlock, although much of the stacktrace seems similar.

 

There are also segfaults on shutdown:

 

 

#0  0x00007ffff579dfab in wxMBConv::ToWChar(wchar_t*, unsigned long, char const*, unsigned long) const () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#1  0x00007ffff579fb20 in wxMBConv::cMB2WC(char const*, unsigned long, unsigned long*) const () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#2  0x00007ffff57acf2f in wxString::ConvertStr(char const*, unsigned long, wxMBConv const&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#3  0x00000000005080e8 in wxString::ImplStr (str=0x9168fc8 "Script", n=153231824, conv=...) at /usr/include/wx-3.0/wx/string.h:480
#4  0x0000000000508271 in wxString::assign (this=0x7fffffffced0, sz=0x9168fc8 "Script", n=153231824) at /usr/include/wx-3.0/wx/string.h:2637
#5  0x000000000050814b in wxString::wxString (this=0x7fffffffced0, str=...) at /usr/include/wx-3.0/wx/string.h:1328
#6  0x00007fffcc6c4077 in ui::GroupDialog::updatePageTitle (this=0x87de400, pageNumber=3) at GroupDialog.cpp:302
#7  0x00007fffcc6c40e2 in ui::GroupDialog::onPageSwitch (this=0x87de400, ev=...) at GroupDialog.cpp:308
#8  0x00007ffff56e311e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#9  0x00007ffff5856282 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#10 0x00007ffff58565e6 in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#11 0x00007ffff585666e in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#12 0x00007ffff5856703 in wxEvtHandler::ProcessEventLocally(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#13 0x00007ffff5856765 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#14 0x00007ffff5eab44a in wxNotebookBase::SendPageChangedEvent(int, int) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#15 0x00007ffff251c3b8 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff252dfd1 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ffff2535a29 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007ffff2535ce2 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x00007ffff2b5bf9c in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#20 0x00007ffff251f487 in g_cclosure_marshal_VOID__OBJECTv () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007ffff251c5e7 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#22 0x00007ffff2535088 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#23 0x00007ffff2535ce2 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007ffff5de2c5d in wxNotebook::DoRemovePage(unsigned long) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#25 0x00007ffff5e0e13d in wxBookCtrlBase::DeletePage(unsigned long) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#26 0x00007ffff5de10eb in wxNotebook::DeleteAllPages() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#27 0x00007ffff5de11d9 in wxNotebook::~wxNotebook() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#28 0x00007ffff5de1339 in wxNotebook::~wxNotebook() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#29 0x00007ffff5ee4c03 in wxWindowBase::Destroy() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#30 0x00007ffff5ee4c35 in wxWindowBase::DestroyChildren() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#31 0x00007ffff5d89c45 in wxWindow::~wxWindow() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#32 0x00007ffff5d81072 in wxTopLevelWindowGTK::~wxTopLevelWindowGTK() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#33 0x00007ffff5e5bb1c in wxFrameBase::~wxFrameBase() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#34 0x000000000051c389 in wxutil::TransientWindow::~TransientWindow (this=0x87de400, __in_chrg=<optimised out>) at ../libs/wxutil/window/TransientWindow.h:48
#35 0x00007fffcc6c7ccb in ui::GroupDialog::~GroupDialog (this=0x87de400, __in_chrg=<optimised out>) at GroupDialog.h:31
#36 0x00007fffcc6c7d06 in ui::GroupDialog::~GroupDialog (this=0x87de400, __in_chrg=<optimised out>) at GroupDialog.h:31
#37 0x00007fffcc6c7d47 in boost::checked_delete<ui::GroupDialog> (x=0x87de400) at /usr/include/boost/checked_delete.hpp:34
#38 0x00007fffcc6c8ba4 in boost::detail::sp_counted_impl_p<ui::GroupDialog>::dispose (this=0x87e6280) at /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:78
#39 0x000000000047b8c4 in boost::detail::sp_counted_base::release (this=0x87e6280) at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:146
#40 0x000000000047b93d in boost::detail::shared_count::~shared_count (this=0x7fffffffdab8, __in_chrg=<optimised out>) at /usr/include/boost/smart_ptr/detail/shared_count.hpp:371
#41 0x00007fffcc6c621e in boost::shared_ptr<ui::GroupDialog>::~shared_ptr (this=0x7fffffffdab0, __in_chrg=<optimised out>) at /usr/include/boost/smart_ptr/shared_ptr.hpp:328
#42 0x00007fffcc6c6a4d in boost::shared_ptr<ui::GroupDialog>::reset (this=0x7fffcc90d9c0 <ui::GroupDialog::InstancePtr()::_instancePtr>) at /usr/include/boost/smart_ptr/shared_ptr.hpp:619
#43 0x00007fffcc6c3a17 in ui::GroupDialog::onRadiantShutdown (this=0x87de400) at GroupDialog.cpp:241
#44 0x00007fffcc6c8576 in sigc::bound_mem_functor0<void, ui::GroupDialog>::operator() (this=0x87e5f88) at /usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1787
#45 0x00007fffcc6c828a in sigc::adaptor_functor<sigc::bound_mem_functor0<void, ui::GroupDialog> >::operator() (this=0x87e5f80) at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:251
#46 0x00007fffcc6c7eb7 in sigc::internal::slot_call0<sigc::bound_mem_functor0<void, ui::GroupDialog>, void>::call_it (rep=0x87e5f50) at /usr/include/sigc++-2.0/sigc++/functors/slot.h:103
#47 0x0000000000484cfd in sigc::internal::signal_emit0<void, sigc::nil>::emit (impl=0xf6d060) at /usr/include/sigc++-2.0/sigc++/signal.h:776
#48 0x000000000048659e in sigc::signal0<void, sigc::nil>::emit (this=0xc5d8f0) at /usr/include/sigc++-2.0/sigc++/signal.h:2673
#49 0x0000000000480d67 in radiant::RadiantModule::broadcastShutdownEvent (this=0xc5d8d0) at RadiantModule.cpp:159
#50 0x000000000064912e in ui::MainFrame::shutdown (this=0xc75420) at ui/mainframe/MainFrame.cpp:404
#51 0x00000000006483c9 in ui::MainFrame::destroy (this=0xc75420) at ui/mainframe/MainFrame.cpp:253
#52 0x000000000047ab90 in main (argc=1, argv=0x7fffffffde38) at main.cpp:159

 

 

and this one which I've seen twice:

 

 

#0  0x00007ffff5856ade in wxEvtHandler::DoUnbind(int, int, int, wxEventFunctor const&, wxObject*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#1  0x00000000004ee522 in wxEvtHandler::Disconnect (this=0x888c6d0, winid=-1, lastId=-1, eventType=10054, func=
(void (wxEvtHandler::*)(wxEvtHandler * const, wxEvent &)) 0x7fffcafe2802 <EventManager::onKeyReleaseWx(wxKeyEvent&)>, this adjustment -16, userData=0x0, eventSink=0xe466e0) at /usr/include/wx-3.0/wx/event.h:3505
#2  0x00000000004ee5b0 in wxEvtHandler::Disconnect (this=0x888c6d0, winid=-1, eventType=10054, func=(void (wxEvtHandler::*)(wxEvtHandler * const, wxEvent &)) 0x7fffcafe2802 <EventManager::onKeyReleaseWx(wxKeyEvent&)>, this adjustment -16,
userData=0x0, eventSink=0xe466e0) at /usr/include/wx-3.0/wx/event.h:3513
#3  0x00000000004ee5ff in wxEvtHandler::Disconnect (this=0x888c6d0, eventType=10054, func=(void (wxEvtHandler::*)(wxEvtHandler * const, wxEvent &)) 0x7fffcafe2802 <EventManager::onKeyReleaseWx(wxKeyEvent&)>, this adjustment -16, userData=0x0,
eventSink=0xe466e0) at /usr/include/wx-3.0/wx/event.h:3519
#4  0x00007fffcafe17b0 in EventManager::disconnect (this=0xe466d0, widget=...) at EventManager.cpp:351
#5  0x00000000005671eb in ui::TextureBrowser::destroyWindow (this=0x887b080) at ui/texturebrowser/TextureBrowser.cpp:1035
#6  0x000000000064910e in ui::MainFrame::shutdown (this=0xc75420) at ui/mainframe/MainFrame.cpp:401
#7  0x00000000006483c9 in ui::MainFrame::destroy (this=0xc75420) at ui/mainframe/MainFrame.cpp:253
#8  0x000000000047ab90 in main (argc=1, argv=0x7fffffffde38) at main.cpp:159

 

 

It seems like there's something very screwy going on with event handling in Linux, which is going to need debugging. I think first I will see if the splash screen updates can be made synchronous rather than using the queueDraw mechanism, in case this is the cause of the problem.

Link to comment
Share on other sites

@Greebo, I have started a 2.0 bugs & feedback thread, would you like people to log bug trackers for bugs they find..?

Yes, if they are valid of course. Some of the issues reported are sounding very strange, especially the ones that involve restarting DR (several times??) to resovle them. Also, issues that already appear in 1.8.1 (which has to be checked against) can be reported, but don't expect me to jump onto them.

Link to comment
Share on other sites

OrbWeaver, thanks for looking into this. I do recall that I was able to run DarkRadiant in my Ubuntu virtual machine without running into crashes, but I haven't seriously done any mapping since the graphics driver support within VirtualBox is very rudimentary.

 

I can explain the hundreds of debug messages - these come from a workaround I had to implement to stop wxWidgets from creating global accelerators for my menu shortcuts. In the Windows variant, wxWidgets will parse the menu item caption and extract the accelerators (e.g. "Ctrl-K" or "L") from them, to create global hotkeys which are unguided missiles further on. The accelerators interfered heavily during mapping, it was basically unusable, so I tried to outsmart the wxWidgets parser by using tilde signs like Ctrl~K. That's where the warnings are coming from, I suppose - it's a shame that those are spamming the console in Linux. My next step would be to check whether the Linux implementation of wxWidgets does the same global hotkey madness as in Windows - if it does not, then the accelerator strings can be sent to the wxMenuItems without tilde signs to avoid the warnings in Linux.

 

The crashes at shutdown sound like events firing after their sinks have been destroyed, this doesn't happen in the Windows implementation. But I suppose they can be fixed by finding the right destruction or unregistration order, after identifiying which event/object combo causes the issue.

Link to comment
Share on other sites

I can explain the hundreds of debug messages - these come from a workaround I had to implement to stop wxWidgets from creating global accelerators for my menu shortcuts. In the Windows variant, wxWidgets will parse the menu item caption and extract the accelerators (e.g. "Ctrl-K" or "L") from them, to create global hotkeys which are unguided missiles further on. The accelerators interfered heavily during mapping, it was basically unusable, so I tried to outsmart the wxWidgets parser by using tilde signs like Ctrl~K.

 

OK, I won't worry about these warnings for the time being then. I saw this page: http://wiki.wxwidget...events_globally which mentions overriding wxApp::FilterEvent to handle keyboard shortcuts. Perhaps in the long term this might be a solution to the problem you encountered, by intercepting any keyboard events that were mapped by DarkRadiant's event manager and blocking them from reaching wxWidgets itself?

 

It looks like I can fix the segfault/deadlock in the splash screen by simply removing all splash screen updates from RadiantModule::postModuleInitialisation(), since this last phase of startup is so quick that splash screen updates aren't really noticeable anyway. My guess is that the problem is something to do with the fact that the method call is invoked via a scheduled custom event EV_RadiantStartup, although you would think that event handlers updating the GUI would be a pretty common scenario. In the future, do you think there would be any problem with moving the initialisation code from main() into RadiantApp::OnInit() and the shutdown code into RadiantApp::OnExit()? The wxWidgets documentation gives the impression this is what they are expecting you to do, rather than writing a main function yourself.

Link to comment
Share on other sites

OK, I won't worry about these warnings for the time being then. I saw this page: http://wiki.wxwidget...events_globally which mentions overriding wxApp::FilterEvent to handle keyboard shortcuts. Perhaps in the long term this might be a solution to the problem you encountered, by intercepting any keyboard events that were mapped by DarkRadiant's event manager and blocking them from reaching wxWidgets itself?

This might be a possibility, yes. I'm not too happy with the old EventManager anyway, I think I recall that this was my second or third class I've ever written in C++...

 

It looks like I can fix the segfault/deadlock in the splash screen by simply removing all splash screen updates from RadiantModule::postModuleInitialisation(), since this last phase of startup is so quick that splash screen updates aren't really noticeable anyway. My guess is that the problem is something to do with the fact that the method call is invoked via a scheduled custom event EV_RadiantStartup, although you would think that event handlers updating the GUI would be a pretty common scenario. In the future, do you think there would be any problem with moving the initialisation code from main() into RadiantApp::OnInit() and the shutdown code into RadiantApp::OnExit()? The wxWidgets documentation gives the impression this is what they are expecting you to do, rather than writing a main function yourself.

Might be possible, yes. I have to check whether all things in main() can actually be moved, but this might be a worthwile change, and much cleaner design too.

 

Those splash screen events you mentioned (the ones in the final phase) will not be missed, I guess, that phase moves past really quick.

 

Feel free to push any changes to the repo. I estimated that a 2.0.1 stabilisation release would be necessary rather soon after the first 2.0.0 one.

Link to comment
Share on other sites

Might be possible, yes. I have to check whether all things in main() can actually be moved, but this might be a worthwile change, and much cleaner design too.

 

I'll have a bash at this locally, since my working assumption at the moment is that the segfault issues are caused by our non-standard wx initialisation routine and/or the fact we are trying to invoke wx methods too early or too late in the construction/deconstruction process. The minor sticking point is that the RadiantApp currently needs to be constructed with a ApplicationContext reference owned by the ModuleRegistry, but I think that making the ApplicationContext owned by RadiantApp and then passed as a reference to ModuleRegistry shouldn't be too hard.

 

Feel free to push any changes to the repo. I estimated that a 2.0.1 stabilisation release would be necessary rather soon after the first 2.0.0 one.

 

I'm not sure if I have push access into your repo, but if I have any changes worth integrating I will just send a pull request (this is the Git way after all).

Link to comment
Share on other sites

I'm not sure if I have push access into your repo, but if I have any changes worth integrating I will just send a pull request (this is the Git way after all).

I ensured that you have full control to the repository. Pull requests are just as fine.

Link to comment
Share on other sites

I ensured that you have full control to the repository. Pull requests are just as fine.

 

Cool, thanks. I'll probably go for a pull request in this case because these changes will need testing on Windows in case I've broken something.

 

I successfully migrated ApplicationContextImpl ownership to RadiantApp and removed the main function, however I still get the segfault on shutdown:

 

#0  0x00007ffff5856b05 in wxEvtHandler::DoUnbind(int, int, int, wxEventFunctor const&, wxObject*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#1  0x00007fffcafe8fd3 in wxEvtHandler::Unbind<wxEventTypeTag<wxKeyEvent>, EventManager, wxKeyEvent, EventManager> (this=0x887e0d0, eventType=..., method=
(void (EventManager::*)(EventManager * const, wxKeyEvent &)) 0x7fffcafe4742 <EventManager::onKeyReleaseWx(wxKeyEvent&)>, handler=0xe3e980, winid=-1, lastId=-1, userData=0x0) at /usr/include/wx-3.0/wx/event.h:3601
#2  0x00007fffcafe36f3 in EventManager::disconnect (this=0xe3e980, widget=...) at EventManager.cpp:351
#3  0x0000000000567683 in ui::TextureBrowser::destroyWindow (this=0x886e290) at ui/texturebrowser/TextureBrowser.cpp:1035
#4  0x000000000064932a in ui::MainFrame::shutdown (this=0xc75420) at ui/mainframe/MainFrame.cpp:401
#5  0x00000000006485e5 in ui::MainFrame::destroy (this=0xc75420) at ui/mainframe/MainFrame.cpp:253
#6  0x000000000047caf7 in RadiantApp::OnExit (this=0xc99a90) at main.cpp:116
#7  0x00007ffff577105c in wxEntry(int&, wchar_t**) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#8  0x000000000047aab5 in main (argc=1, argv=0x7fffffffde38) at main.cpp:161

 

(note that I switched EventManager to use Bind/Unbind rather than Connect/Disconnect because the docs said these were "safer", although obviously it doesn't fix the problem here)

 

The crash seems to happen when calling EventManager::disconnect with the TextureBrowser's GLWidget pointer. I think this is because OnExit happens too late in the shutdown process — according to the wx docs:

 

OnExit is called after destroying all application windows and controls, but before wxWidgets cleanup.

 

Hopefully I should be able to fix this by ensuring the TextureBrowser is shutdown earlier on, such as in response to the Close event emitted by the main window.

Link to comment
Share on other sites

I found the issue, it's a duplicate call to TextureBrowser::destroyWindow(), the GL widget is destroyed during the first roundtrip, the second call will crash the application. I'll have the fix in a minute.

Link to comment
Share on other sites

I've committed a fix for the crash. The singleton design of the TextureBrowser doesn't work too well with the switchable mainframe layouts design, so this is yet another refactoring opportunity.

Link to comment
Share on other sites

I've committed a fix for the crash. The singleton design of the TextureBrowser doesn't work too well with the switchable mainframe layouts design, so this is yet another refactoring opportunity.

 

Thanks, that fixes that particular crash, but now there is another one:

 

#0  0x00007ffff579dfab in wxMBConv::ToWChar(wchar_t*, unsigned long, char const*, unsigned long) const () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#1  0x00007ffff579fb20 in wxMBConv::cMB2WC(char const*, unsigned long, unsigned long*) const () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#2  0x00007ffff57acf2f in wxString::ConvertStr(char const*, unsigned long, wxMBConv const&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#3  0x0000000000508580 in wxString::ImplStr (str=0x920a118 "Script", n=153417168, conv=...) at /usr/include/wx-3.0/wx/string.h:480
#4  0x0000000000508709 in wxString::assign (this=0x7fffffffcf50, sz=0x920a118 "Script", n=153417168) at /usr/include/wx-3.0/wx/string.h:2637
#5  0x00000000005085e3 in wxString::wxString (this=0x7fffffffcf50, str=...) at /usr/include/wx-3.0/wx/string.h:1328
#6  0x00007fffcc6c7077 in ui::GroupDialog::updatePageTitle (this=0x87eb3a0, pageNumber=3) at GroupDialog.cpp:302
#7  0x00007fffcc6c70e2 in ui::GroupDialog::onPageSwitch (this=0x87eb3a0, ev=...) at GroupDialog.cpp:308
#8  0x00007ffff56e311e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#9  0x00007ffff5856282 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#10 0x00007ffff58565e6 in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#11 0x00007ffff585666e in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#12 0x00007ffff5856703 in wxEvtHandler::ProcessEventLocally(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#13 0x00007ffff5856765 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#14 0x00007ffff5eab44a in wxNotebookBase::SendPageChangedEvent(int, int) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#15 0x00007ffff251c3b8 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff252dfd1 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ffff2535a29 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007ffff2535ce2 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x00007ffff2b5bf9c in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#20 0x00007ffff251f487 in g_cclosure_marshal_VOID__OBJECTv () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007ffff251c5e7 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#22 0x00007ffff2535088 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#23 0x00007ffff2535ce2 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007ffff5de2c5d in wxNotebook::DoRemovePage(unsigned long) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#25 0x00007ffff5e0e13d in wxBookCtrlBase::DeletePage(unsigned long) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#26 0x00007ffff5de10eb in wxNotebook::DeleteAllPages() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#27 0x00007ffff5de11d9 in wxNotebook::~wxNotebook() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#28 0x00007ffff5de1339 in wxNotebook::~wxNotebook() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#29 0x00007ffff5ee4c03 in wxWindowBase::Destroy() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#30 0x00007ffff5ee4c35 in wxWindowBase::DestroyChildren() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#31 0x00007ffff5d89c45 in wxWindow::~wxWindow() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#32 0x00007ffff5d81072 in wxTopLevelWindowGTK::~wxTopLevelWindowGTK() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#33 0x00007ffff5e5bb1c in wxFrameBase::~wxFrameBase() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#34 0x000000000051c821 in wxutil::TransientWindow::~TransientWindow (this=0x87eb3a0, __in_chrg=<optimised out>) at ../libs/wxutil/window/TransientWindow.h:48
#35 0x00007fffcc6caccb in ui::GroupDialog::~GroupDialog (this=0x87eb3a0, __in_chrg=<optimised out>) at GroupDialog.h:31
#36 0x00007fffcc6cad06 in ui::GroupDialog::~GroupDialog (this=0x87eb3a0, __in_chrg=<optimised out>) at GroupDialog.h:31
#37 0x00007fffcc6cad47 in boost::checked_delete<ui::GroupDialog> (x=0x87eb3a0) at /usr/include/boost/checked_delete.hpp:34
#38 0x00007fffcc6cbba4 in boost::detail::sp_counted_impl_p<ui::GroupDialog>::dispose (this=0x87f36b0) at /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:78
#39 0x000000000047b7f2 in boost::detail::sp_counted_base::release (this=0x87f36b0) at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:146
#40 0x000000000047b86b in boost::detail::shared_count::~shared_count (this=0x7fffffffdb38, __in_chrg=<optimised out>) at /usr/include/boost/smart_ptr/detail/shared_count.hpp:371
#41 0x00007fffcc6c921e in boost::shared_ptr<ui::GroupDialog>::~shared_ptr (this=0x7fffffffdb30, __in_chrg=<optimised out>) at /usr/include/boost/smart_ptr/shared_ptr.hpp:328
#42 0x00007fffcc6c9a4d in boost::shared_ptr<ui::GroupDialog>::reset (this=0x7fffcc9109c0 <ui::GroupDialog::InstancePtr()::_instancePtr>) at /usr/include/boost/smart_ptr/shared_ptr.hpp:619
#43 0x00007fffcc6c6a17 in ui::GroupDialog::onRadiantShutdown (this=0x87eb3a0) at GroupDialog.cpp:241
#44 0x00007fffcc6cb576 in sigc::bound_mem_functor0<void, ui::GroupDialog>::operator() (this=0x87f33b8) at /usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1787
#45 0x00007fffcc6cb28a in sigc::adaptor_functor<sigc::bound_mem_functor0<void, ui::GroupDialog> >::operator() (this=0x87f33b0) at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:251
#46 0x00007fffcc6caeb7 in sigc::internal::slot_call0<sigc::bound_mem_functor0<void, ui::GroupDialog>, void>::call_it (rep=0x87f3380) at /usr/include/sigc++-2.0/sigc++/functors/slot.h:103
#47 0x00000000004852bf in sigc::internal::signal_emit0<void, sigc::nil>::emit (impl=0xfd5590) at /usr/include/sigc++-2.0/sigc++/signal.h:776
#48 0x0000000000486b60 in sigc::signal0<void, sigc::nil>::emit (this=0xc5d8f0) at /usr/include/sigc++-2.0/sigc++/signal.h:2673
#49 0x000000000048178d in radiant::RadiantModule::broadcastShutdownEvent (this=0xc5d8d0) at RadiantModule.cpp:159
#50 0x0000000000649378 in ui::MainFrame::shutdown (this=0xc75420) at ui/mainframe/MainFrame.cpp:404
#51 0x0000000000648613 in ui::MainFrame::destroy (this=0xc75420) at ui/mainframe/MainFrame.cpp:253
#52 0x000000000047caf7 in RadiantApp::OnExit (this=0xc99a90) at main.cpp:116
#53 0x00007ffff577105c in wxEntry(int&, wchar_t**) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#54 0x000000000047aab5 in main (argc=1, argv=0x7fffffffde38) at main.cpp:161

 

It looks like the too-late shutdown code invoked from OnExit is biting at a different point now. Currently I am investigating RadiantModule::exitCmd, MainFrame::destroy and TopLevelFrame::onClose, in an attempt to come up with a sequence of calls that will result in the required GUI cleanup code being invoked in direct response to the top-level window close event rather than the wxApp shutdown itself.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...