[Fixed] [3.4.1] Cameratexture blacked out under some circumstances

Bugs that have been investigated and resolved somehow.

Moderator: Developers

[3.4.1] Cameratexture blacked out under some circumstances

Postby Matt » Thu Jun 14, 2018 11:47 pm

To replicate:

1. download the attached and DUMP 2

2. gzdoom -file <the attached mod> DUMP-2v2.pk3 -nomusic -noautoload

3. New game, mash enter until at map01

4. Go to Map08 using idclev08, map map08, or changemap map08

Expected: the cameratexture appears as on map01.
Actual: only one corner of the cameratexture appears, the rest blacked out.

Screenshots:
Spoiler:


Once it appears it never goes away, even if you start a new game, until you quit GZDoom.

This works fine in 3.3.2 and is bugged in 3.4.0.

If I break the ANIMDEFS reference in DUMP2, the HUD cameratexture works fine.

When the bug appears and I try to switch renderers, it persists.
Attachments
testctstatbar.zip
(1.28 KiB) Downloaded 17 times
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [3.4.1] Cameratexture blacked out under some circumstanc

Postby Matt » Sat Jun 16, 2018 1:30 am

The last pre-3.4 commit that I can confirm does not suffer this bug is 2ae8d39 from April 24.

The two that immediately follow it, 0dcc6ec and 8d62ebd, weren't tested because the first won't compile (something about a previously declared int) and the second would crash every time I tried to start a map, so I can't tell if either of them might be where this started, but c37ff22 is affected by this bug.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [3.4.1] Cameratexture blacked out under some circumstanc

Postby _mental_ » Fri Jun 22, 2018 8:29 am

It's started with c37ff22 exactly. The problem is with more than one camera textures of different widths/heights.
Simplified test case is in attachment. Works with arbitrary Doom map, just enter any level twice.
Spoiler: Code and screenshot
Attachments
camtex2.zip
(638 Bytes) Downloaded 9 times
_mental_
 
 
 
Joined: 07 Aug 2011

Re: [3.4.1] Cameratexture blacked out under some circumstanc

Postby Matt » Thu Jun 28, 2018 1:02 pm

Has anyone checked if this happens with cameratextures placed on a map as well?

(And does anyone know off the top of their head of any maps that employ multiple different-sized camera textures?)
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [3.4.1] Cameratexture blacked out under some circumstanc

Postby Enjay » Thu Jun 28, 2018 2:10 pm

Matt wrote:Has anyone checked if this happens with cameratextures placed on a map as well?


It does, but it seems inconsistent. I saw the problem with a map a few days ago when I first read this report. I checked the map and one of the camera textures was half black. I've checked the map since and it wasn't showing the problem. I just checked again and still no problem, then I had an idea. The first time I saw the problem, I had come from the previous map (which has a number of camera textures), so I did that again and this time I got the problem on one camera texture:

it should look like...
Image

but looked like...
Image
(later, I repeated the test and this time it was a different camera texture that got messed up.)


Then I warped back to the first map and all the camera textures (which had previously been fine) were now messed up:
Image


Then warping back to the second map, things had got worse:
Image

The above are just test maps that I use for a variety of purposes; nothin' fancy.


Matt wrote:(And does anyone know off the top of their head of any maps that employ multiple different-sized camera textures?)

There is a chance something I have released does this because I quite often use a bunch of different sized camera textures, but I can't be certain of an example off the top of my head.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [3.4.1] Cameratexture blacked out under some circumstanc

Postby Matt » Thu Jul 12, 2018 1:05 am

Well, at least we know it's the cameratextures and not something about how things are drawn on the HUD.

I would guess it's got something to do with a check for the bounding area of the cameratexture that was being done in FGLTexture but omitted in FHardwareTexture. I have no idea which of those it could possibly be though.

(I noticed that the old Bind calls both "Clean" and "CreateHwTexture" under the "texture has become invalid" block, but the new BindOrCreate function only has "Clean" in there. Is this at all related to the bug?)
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [3.4.1] Cameratexture blacked out under some circumstanc

Postby _mental_ » Sun Jul 15, 2018 2:16 am

HUD camera texture is broken in software renderer too but in a different way. It's not updated at all and remains black if GZDoom was started with software renderer.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: [3.4.1] Cameratexture blacked out under some circumstanc

Postby Graf Zahl » Sun Jul 15, 2018 2:41 am

@Enjay: What map is that? Posting images of such a great testing example without a link to the map itself is really not nice. :(

That said, _Mental_'s demo map looks correctly for me with all builds I tested, starting from the commit this supposedly stated on, to 3.4.1 and today's WIP. And since I cannot reproduce the problem I need some help.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [3.4.1] Cameratexture blacked out under some circumstanc

Postby phantombeta » Sun Jul 15, 2018 2:58 am

@Graf
Have you tried starting a new game after doing it once already or changing maps then checking again? It doesn't show immediately, you have to change maps at least once.
Here's a video demonstrating it:
User avatar
phantombeta
In the meadow of sinful thoughts, every flower's a perfect one
 
Joined: 02 May 2013
Location: The United Soviet Socialist Dictatorship of Hueland (BRASIL CARAI)
Discord: phantombeta#2461

Re: [3.4.1] Cameratexture blacked out under some circumstanc

Postby Graf Zahl » Sun Jul 15, 2018 3:23 am

Fixed, I think. What puzzles me here is that the error only manifested itself now. I could trace it back to the actual implementation of framebuffer-based camera textures. Apparently some part of the older setup just happened to make it work with some buffer that was larger than the texture so it never glitched.

So it apparently was pure happenstance that nobody ever noticed it before.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [3.4.1] Cameratexture blacked out under some circumstanc

Postby Enjay » Sun Jul 15, 2018 4:32 am

Graf Zahl wrote:@Enjay: What map is that? Posting images of such a great testing example without a link to the map itself is really not nice. :(

It's actually not a great generalised testing map because it needs a particular set of custom resources to be loaded (mostly Return from Oblivion stuff + extras). Aside from the small number of camera textures, it's mostly for testing switches and animations in the mod.

Good to see the bug squished though. :)
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [3.4.1] Cameratexture blacked out under some circumstanc

Postby Matt » Tue Jul 17, 2018 2:03 am

Still not fixed as of 1ef9938. :(

EDIT: Tried 7817e6a directly to see if maybe a subsequent commit might've re-broken it. No such luck, still getting the corner on reload (and what I'm getting looks exactly like phantombeta's video except that blacked out area never turns to sky for me).
Last edited by Matt on Tue Jul 17, 2018 2:17 am, edited 1 time in total.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [3.4.1] Cameratexture blacked out under some circumstanc

Postby _mental_ » Tue Jul 17, 2018 2:15 am

For hardware renderer it was fixed in modern branch with commit 2c86c4e.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: [3.4.1] Cameratexture blacked out under some circumstanc

Postby Matt » Tue Jul 17, 2018 2:21 am

_mental_ wrote:For hardware renderer it was fixed in modern branch with commit 2c86c4e.
Confirmed fixed. Thanks!!!
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests