NULL crash with r_newrenderer set to 1 before loading map

Moderators: Rachael, dpJudas

Edward-san
Developer
Developer
Posts: 197
Joined: Sun Nov 29, 2009 16:36

NULL crash with r_newrenderer set to 1 before loading map

Post 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.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

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

Post 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.
Edward-san
Developer
Developer
Posts: 197
Joined: Sun Nov 29, 2009 16:36

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

Post 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.
Edward-san
Developer
Developer
Posts: 197
Joined: Sun Nov 29, 2009 16:36

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

Post 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.
User avatar
Rachael
Developer
Developer
Posts: 3639
Joined: Sat May 13, 2006 10:30

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

Post by Rachael »

I'll try it out, myself. I've always wanted to try the GL sw-framebuffer on Linux.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

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

Post 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.
User avatar
Rachael
Developer
Developer
Posts: 3639
Joined: Sat May 13, 2006 10:30

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

Post 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.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

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

Post 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.
Edward-san
Developer
Developer
Posts: 197
Joined: Sun Nov 29, 2009 16:36

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

Post 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?
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

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

Post by dpJudas »

What is missing in the gl_swframebuffer branch?
Edward-san
Developer
Developer
Posts: 197
Joined: Sun Nov 29, 2009 16:36

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

Post 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.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

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

Post by dpJudas »

No worries, I'm sufficiently bored that I launched my Linux Mint now. Here goes nothing.. :)
User avatar
Rachael
Developer
Developer
Posts: 3639
Joined: Sat May 13, 2006 10:30

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

Post 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
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

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

Post 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.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

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

Post 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.
Locked

Return to “Bugs (Archive)”