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.
[g3.4pre-419-gbcadd2bf0-m] Crash after taking a screenshot
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.
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.
- 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:
Re: [g3.4pre-419-gbcadd2bf0-m] Crash after taking a screensh
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.
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.
Re: [g3.4pre-419-gbcadd2bf0-m] Crash after taking a screensh
It's just an incorrect address passed to delete. Graf was a bit too aggressive with code removal in this commit.
-
- 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
It should be fixed.
Re: [g3.4pre-419-gbcadd2bf0-m] Crash after taking a screensh
No, it's not. Fixed in ace5ee3.