[Fixed] [g3.4pre-419-gbcadd2bf0-m] Crash after taking a screenshot

Bugs that have been investigated and resolved somehow.

Moderator: Developers

[g3.4pre-419-gbcadd2bf0-m] Crash after taking a screenshot

Postby Marisa Kirisame » Thu May 17, 2018 9:32 am

Anytime I take a screenshot gzdoom crashes with the message "munmap_chunk(): invalid pointer", I've tracked it down to line 644 of m_misc.cpp.

Guess you forgot a check for null before calling delete on the screenshot buffer.
User avatar
Marisa Kirisame
heh
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa

Re: [g3.4pre-419-gbcadd2bf0-m] Crash after taking a screensh

Postby doomed_stranger » Thu May 17, 2018 10:14 am

1. it is absolutely safe to call `delete` on null pointer — by the c++ specs.
2. it is inside `if (buffer != NULL)` check anyway, isn't it?

it looks like there is a buffer overrun somewhere in another code, and glibc's memory allocator structs are corrupted.
doomed_stranger
 
Joined: 01 Oct 2016

Re: [g3.4pre-419-gbcadd2bf0-m] Crash after taking a screensh

Postby _mental_ » Thu May 17, 2018 10:24 am

It's just an incorrect address passed to delete. Graf was a bit too aggressive with code removal in this commit.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: [g3.4pre-419-gbcadd2bf0-m] Crash after taking a screensh

Postby Cacodemon345 » Fri May 18, 2018 10:51 am

It should be fixed.
Cacodemon345
 
Joined: 22 Dec 2017
Discord: Cacodemon345#9151

Re: [g3.4pre-419-gbcadd2bf0-m] Crash after taking a screensh

Postby _mental_ » Sat May 19, 2018 4:07 am

No, it's not. Fixed in ace5ee3.
_mental_
 
 
 
Joined: 07 Aug 2011


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests