2 Obscure WinQuake fixes

Discuss programming topics for the various GPL'd game engine sources.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: 2 Obscure WinQuake fixes

Post by Baker »

Do these kind of things crash the id386 asm too?

I ask because some of calculations in C work slightly dfferently if id386 is defined.

Like does the sprite draw Z issue crash the asm code too?
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
mankrip
Posts: 924
Joined: Fri Jul 04, 2008 3:02 am

Re: 2 Obscure WinQuake fixes

Post by mankrip »

Baker wrote:Do these kind of things crash the id386 asm too?
Yes. I always test my code with the x86 ASM enabled.

But I also test the pure C code when finding such bugs, and Makaqu's model crash bug is in there too.
Baker wrote:Like does the sprite draw Z issue crash the asm code too?
Yes. However, I didn't test this one to see if it happens in pure C.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: 2 Obscure WinQuake fixes

Post by leileilol »

It also happens in pure C. I believe it has to do with drawing one whole pixel covering the screen, and trying to draw the next but it couldn't find a space for it and has an access violation right there. An alternative way to fix this would be better sprite clipping code that's more aware of screen boundaries
i should not be here
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: 2 Obscure WinQuake fixes

Post by qbism »

Is there a specific scenario that can duplicate this crash?
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: 2 Obscure WinQuake fixes

Post by Baker »

qbism wrote:Is there a specific scenario that can duplicate this crash?
For me, it is very hard to create the scenario. I have had it exactly once during debugging ever, despite trying to cause the conditions to occur again.

There might be a consistent way to cause it, but I am unaware of it.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
mankrip
Posts: 924
Joined: Fri Jul 04, 2008 3:02 am

Re: 2 Obscure WinQuake fixes

Post by mankrip »

qbism wrote:Is there a specific scenario that can duplicate this crash?
In the previous page:
leileilol wrote:I discovered the crash happening in Quake 1.01 (yes this crash goes way back, errormessage spewing something about surfacecache) after trying a mod that spammed bubbles exactly at the view, where swimming backwards would trigger a crash. I kept reproducing this crash, kept debugging and managed to fix it around 2012 as well (without any knowledge of szo's fix).

Also, much like Hexen II, the mod was also programmed by Mike Gummelt. XD so props to him for coding stuff that triggers obscure engine crashes easily in '96!
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: 2 Obscure WinQuake fixes

Post by qbism »

Got it. Easiest to duplicate with a stationary sprite. Move back and forth through it slowly. Normally engine will stop rendering the sprite when pixel height is almost full screen but eventually will crash.
Post Reply