Page 1 of 2

NULL crash with r_newrenderer set to 1 before loading map

Posted: Sun Nov 13, 2016 15:37
by Edward-san
Just run this:

Code: Select all

qzdoom -iwad doom2 -warp 01 -nosound +r_newrenderer 1
or run normally, then in console 'r_newrenderer 1', then open map01.
Spoiler: Backtrace
it crashes because 'basecolormap' is NULL.

Re: NULL crash with r_newrenderer set to 1 before loading map

Posted: Sun Nov 13, 2016 16:55
by dpJudas
This is probably because the Linux version doesn't have 2D hardware acceleration. The way I'm drawing the weapon right now assumes that is available.

I can enable the experimental GLSWFrameBuffer for Linux if you'd like, just like I've done for the Mac build.

Re: NULL crash with r_newrenderer set to 1 before loading map

Posted: Sun Nov 13, 2016 20:03
by Edward-san
Ah, now that explains why I saw no weapon sprite at all when I enabled ingame, I thought it was work-in-progress. :P

I guess I'll try it out by myself and let you know.

Re: NULL crash with r_newrenderer set to 1 before loading map

Posted: Sun Nov 13, 2016 20:50
by Edward-san
I'm getting problems, though it's because of how it's structured the SDLVideo|SDLFB code. If there's nobody else helping, I'll take a closer look tomorrow.

Re: NULL crash with r_newrenderer set to 1 before loading map

Posted: Sun Nov 13, 2016 21:11
by Rachael
I'll try it out, myself. I've always wanted to try the GL sw-framebuffer on Linux.

Re: NULL crash with r_newrenderer set to 1 before loading map

Posted: Sun Nov 13, 2016 22:38
by dpJudas
You're both welcome to try fix it of course. Note that ideally any fixes would be done as a PR against my gl_swframebuffer branch as that will allow it to be eventually PR'ed against gzdoom as well.

Re: NULL crash with r_newrenderer set to 1 before loading map

Posted: Sun Nov 13, 2016 22:49
by Rachael
Is that commit safe to pull stand-alone or does it depend on other commits to get it working? (Even better: Is it already in QZDoom? *bats eyelashes*)

EDIT: Nevermind, it's already there. ^_^ I just have to update the render-spawning code.

Code: Select all

rachael@rvbku16:~/qzdoom/src/posix/sdl$ git merge f81d0d3964b429c96fea5bba427a828ec1479f18
Already up-to-date.

Re: NULL crash with r_newrenderer set to 1 before loading map

Posted: Sun Nov 13, 2016 23:17
by dpJudas
The main difference between the branch and QZDoom is that the branch does not have the 'bgra' stuff that QZDoom's video classes have and ZDoom does not.

Re: NULL crash with r_newrenderer set to 1 before loading map

Posted: Tue Nov 22, 2016 21:27
by Edward-san
Sorry, I didn't work on it yet, though could it be possible to see the 'gl_swframebuffer' branch updated to qzdoom master?

Re: NULL crash with r_newrenderer set to 1 before loading map

Posted: Tue Nov 22, 2016 23:08
by dpJudas
What is missing in the gl_swframebuffer branch?

Re: NULL crash with r_newrenderer set to 1 before loading map

Posted: Tue Nov 22, 2016 23:24
by Edward-san
Argh! I didn't understand the point of gl_swframebuffer (for gzdoom, not qzdoom), so nevermind. I'm not sure I'll be able to take a look at it in these days, sorry again.

Re: NULL crash with r_newrenderer set to 1 before loading map

Posted: Tue Nov 22, 2016 23:36
by dpJudas
No worries, I'm sufficiently bored that I launched my Linux Mint now. Here goes nothing.. :)

Re: NULL crash with r_newrenderer set to 1 before loading map

Posted: Tue Nov 22, 2016 23:39
by Rachael
Yeah - about that - I attempted to enable the GL SWFramebuffer code on Linux - no luck - the hardware code is too dissimilar and I couldn't figure out how the setups were working, not to mention I had a million other things going on at the time that I did look at it.

Well - here's to hoping you get further than I did. :P

Re: NULL crash with r_newrenderer set to 1 before loading map

Posted: Wed Nov 23, 2016 0:02
by dpJudas
First I had to paste 8 random lines from the Internet fixing the Ubuntu LLVM 3.8 package. A good start. :D

Got QZDoom building now. On to hooking up the code.

Re: NULL crash with r_newrenderer set to 1 before loading map

Posted: Wed Nov 23, 2016 0:39
by dpJudas
Image

All too easy! As a bonus, the frame rate went from 48 FPS to 60 (vsync capped). Unfortunately I can't say what the real frame rate is because apparently vsync is always on in Linux it seems (in GZDoom too?).

Edit: sorry if I sounded too smartass - I did have the advantage of knowing exactly what needed to be done and how.