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

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

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

Post by Marisa the Magician »

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
ketmar
Posts: 160
Joined: Sat Oct 01, 2016 6:26 am
Contact:

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

Post by ketmar »

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.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

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

Post by _mental_ »

It's just an incorrect address passed to delete. Graf was a bit too aggressive with code removal in this commit.
Cacodemon345
Posts: 419
Joined: Fri Dec 22, 2017 1:53 am
Graphics Processor: ATI/AMD (Modern GZDoom)
Contact:

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

Post by Cacodemon345 »

It should be fixed.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

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

Post by _mental_ »

No, it's not. Fixed in ace5ee3.
Post Reply

Return to “Closed Bugs [GZDoom]”