Jump to content
The Dark Mod Forums

segfault when applying a new material on a brush


Recommended Posts

here is the bug report: https://bugs.thedarkmod.com/view.php?id=5387

on Ubuntu 20.10 on last pull from branch 2.9.0 from github.

now when creating the brush with a selected material it doesn't segfault any more, it's only when you apply a material the next time it segfaults:

when applying a new material on a brush either from an existing brush with already a working material, or when the brush has the default material, the thing is that when you apply the new material it segfaults. that is either in the media tab, when selecting another material for a given selected brush, or, with a selected brush, and clicking on another material image in the textures tab.

 

I've provided the two GDB traces, for the two cases, within the bug report, I hope it's useful.

Edited by 7318

Biel Bestué de Luna - Github

Link to comment
Share on other sites

  • 7318 changed the title to segfault when applying a new material on a brush

This is due to a change that has been introduced in wx 3.0.5. The wxDataViewCtrl internals are trying to query the tree model even after a call to wxDataViewModel::Cleared(), where no node is supposed to be present. I'll check whether this is a problem with DarkRadiant's code or whether this is a regression in wx, in which case I have to open an issue report at their tracker.

Link to comment
Share on other sites

Textures can now be selected in the texture browser and changed on brushes and patches without causing a segfault.

However, now I can see that the texture browser does not refresh it's view unless I re-size the frame around it. Scrolling the texture window only shows the scrollbar moving and the texture list stays put until I re-size the frame. I also cannot preview textures in the Media browser. I can select them, but the texture preview does not show until the frame around the media browser is re-sized.

  • Like 1

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

2 hours ago, PranQster said:

However, now I can see that the texture browser does not refresh it's view unless I re-size the frame around it. Scrolling the texture window only shows the scrollbar moving and the texture list stays put until I re-size the frame. I also cannot preview textures in the Media browser. I can select them, but the texture preview does not show until the frame around the media browser is re-sized.

Is this behaviour new, since when does that happen?

Link to comment
Share on other sites

I have tried two builds of 2.9.0. The current build and the previous build. Both showed the same behavior, but the previous build had the issue with the segfault.

I could have sworn that I had previously built 2.8.0 using wxgtk 3.1.x and all worked well, while I also had these issues with 2.8.0 when built with wxgtk 3.0.x ... at least I believe that was the case. My latest attempt to build 2.8.0 with wxgtk 3.1.x failed.

DR 2.9.0 has so far failed to build with wxgtk 3.1.4

Edited by PranQster
  • Like 1

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

I haven't tried building against wxGTK 3.1 at all, but I built DR against wx3.0.4 and wx3.0.5. This is what I used, it might work with 3.1.x as well:

wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.4/wxWidgets-3.1.4.tar.bz2
tar xf wxWidgets-3.1.4.tar.bz2
cd wxWidgets-3.1.4
./configure --with-opengl --prefix=/home/greebo/wx_install && make -j4 && make install

Then, in DarkRadiant's git root:

./configure --enable-darkmod-plugins --prefix=/home/greebo/dr --with-wx-config=/home/greebo/wx_install/bin/wx-config
make -j4 && make install

Link to comment
Share on other sites

I had no better luck with 3.1.4 from github than with 3.1.4 installed by Mageia.

I then tried 3.0.5 from github after having uninstalled all wxgtk devel packages provided by Mageia. This resulted in DR not finding 'libwx_gtk2u_gl-3.0.so.0'. This was weird because the 'libwx_gtk2u' libraries in my system are from version 2.8, not 3.0, so even if they are installed they are named wrong in this case.

Re-installing the Mageia devel packages for wxgtk 3.0 allowed DR to build and run again, but the problem with the textures refreshing still persists.

  • Like 1

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

When running a DR binary that is linked against binaries not installed in the regular search paths (/usr/lib/), I found I need to launch it like this:

LD_LIBRARY_PATH=~/wx_install/lib ~/dr/bin/darkradiant

This did it for me, and I also had to do that when running DR in my Ubuntu machine against the custom wxGTK 3.1.4 build today. Which should work on latest master btw, I just fixed the compilation errors.

Link to comment
Share on other sites

With the new master and 3.1.4, I can browse the textures in both the media list and in the texture browser as well. However, DR segfaults when loading any existing map. I can however create a new map and assign textures to brushes without issue.

When built against wxgtk 3.0.5.1, maps can be loaded and the texture browser scrolls properly and textures can be re-assigned to brushes. However, the 'media' list still does not show selected textures until re-sizing the frame around it. Otherwise DR seems fine at first glance. Will look further after lunch.

System: Mageia Linux Cauldron, aka Mageia 8

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

      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
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...