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

    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...