Forum

2 Obscure WinQuake fixes

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Re: 2 Obscure WinQuake fixes

Postby Baker » Wed Sep 17, 2014 1:31 am

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 ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: 2 Obscure WinQuake fixes

Postby mankrip » Fri Sep 19, 2014 11:39 pm

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
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Re: 2 Obscure WinQuake fixes

Postby leileilol » Sat Sep 20, 2014 1:24 am

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
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: 2 Obscure WinQuake fixes

Postby qbism » Tue Sep 23, 2014 12:43 am

Is there a specific scenario that can duplicate this crash?
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: 2 Obscure WinQuake fixes

Postby Baker » Wed Sep 24, 2014 8:05 am

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 ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: 2 Obscure WinQuake fixes

Postby mankrip » Fri Sep 26, 2014 1:34 am

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
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Re: 2 Obscure WinQuake fixes

Postby qbism » Fri Sep 26, 2014 3:37 am

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.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Previous

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest