[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - cl_visedicts: are duplicate entries OK/expected?

cl_visedicts: are duplicate entries OK/expected?

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

Moderator: InsideQC Admins

cl_visedicts: are duplicate entries OK/expected?

Postby Johnny Law » Wed Jul 09, 2014 1:52 am

As a learning experience (and out of curiosity) I've been looking into some of the known issues of the reQuiem engine. Some I can track down just from general C debugging, but in other cases I need to pick up more understanding of the Quake data structures and how they're used.

In one case, I see a linked list that is getting corrupted because it is processing cl_visedicts without taking into account that there could be multiple elements of that array that point to the same object. What I don't yet know is whether:

a) it is bad/unexpected for cl_visedicts to have duplicate entries

or

b) duplicates are OK and the linked-list manipulation code should take that possibility into account.


Can someone give me a push in the right direction?

(If you want to climb further back along my debugging logic, it's this issue: https://github.com/SpiritQuaddicted/reQuiem/issues/9 )
User avatar
Johnny Law
 
Posts: 22
Joined: Mon Apr 28, 2014 8:34 pm
Location: San Carlos, CA

Re: cl_visedicts: are duplicate entries OK/expected?

Postby Spike » Wed Jul 09, 2014 3:49 am

however you look at it, dupes are pointless and inefficient. the only way that it might actually do anything is if .alpha isn't 1, but there's better ways to handle that.
if you have multiple scenes being drawn (ie: recursing through water leafs) then you should probably remove any entities already on the list just so you don't draw them twice or whatever.

I can't think of any specific places where dupes would actually be crashy, but then its been a long time since I seriously looked at NQ code. QW generates the data in-place, instead of using pointers to some other random bits of memory, its cleaner that way.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: cl_visedicts: are duplicate entries OK/expected?

Postby Johnny Law » Wed Jul 09, 2014 5:52 am

The crashing part is the linked list (skychain), which is something new in reQuiem.

reQuiem's handling of cl_visedicts (which allows/causes duplicate entries) doesn't seem to be notably different from other NQ engines, although of course I could be missing something.
User avatar
Johnny Law
 
Posts: 22
Joined: Mon Apr 28, 2014 8:34 pm
Location: San Carlos, CA

Re: cl_visedicts: are duplicate entries OK/expected?

Postby Baker » Wed Jul 09, 2014 7:57 am

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: cl_visedicts: are duplicate entries OK/expected?

Postby Baker » Wed Jul 09, 2014 9:01 am

Ran Requiem (I compiled it and ran debug version). game czg07 + map czg07 + kill = crash.

So I started up FitzQuake085.exe as a dedicated server as such:
c:\quake\fitzquake085.exe -game czg07 +map czg07 -dedicated 1 -window

In FitzQuake085.exe, I typed "status" which showed me my ip address of "192.168.1.4"

I started Requiem and change the gamedir to czg07. I typed "connect 192.168.1.4" to connect to FitzQuake running in a different window.

I type "kill" and Requiem crashed. But the music kept playing. I set a breakpoint in Visual Studio in the beginning of _Host_Frame. Nothing happened [it didn't hit the breakpoint] (which means the _Host_Frame which runs 200 frames per second +/- was no longer happening). So despite still having music playing and a non-responsive client and Visual Studio did not catch an error or hit a breakpoint. FMOD plays the music and was still running.

Now ...

I did this.

c:\quake\fitzquake085.exe -game czg07 +coop 1 +map czg07 -dedicated 1 -window

When I changed the gamedir in Requiem and connected, I could kill myself as many times as I wanted!!!!! No crashes or anything.

Why would coop 1 make a difference? Maybe Requiem does something special when you die? Does it auto-record demos? Do they save on death? Does it zip them up?

Or maybe something in Requiem only executes when a single player game is running locally?

Do you have a particular reason you suspect visedicts is the problem?
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: cl_visedicts: are duplicate entries OK/expected?

Postby Spirit » Wed Jul 09, 2014 9:19 am

Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Spirit
 
Posts: 1037
Joined: Sat Nov 20, 2004 9:00 pm

Re: cl_visedicts: are duplicate entries OK/expected?

Postby Spike » Wed Jul 09, 2014 10:57 am

.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: cl_visedicts: are duplicate entries OK/expected?

Postby Johnny Law » Wed Jul 09, 2014 3:05 pm

Last edited by Johnny Law on Wed Jul 09, 2014 3:12 pm, edited 2 times in total.
User avatar
Johnny Law
 
Posts: 22
Joined: Mon Apr 28, 2014 8:34 pm
Location: San Carlos, CA

Re: cl_visedicts: are duplicate entries OK/expected?

Postby Johnny Law » Wed Jul 09, 2014 3:10 pm

User avatar
Johnny Law
 
Posts: 22
Joined: Mon Apr 28, 2014 8:34 pm
Location: San Carlos, CA

Re: cl_visedicts: are duplicate entries OK/expected?

Postby ericw » Fri Jul 11, 2014 8:09 am

just came across this comment from mh which sounds related:
viewtopic.php?f=3&t=5131&p=48507#p48507
ericw
 
Posts: 92
Joined: Sat Jan 18, 2014 2:11 am

Re: cl_visedicts: are duplicate entries OK/expected?

Postby Johnny Law » Fri Jul 11, 2014 5:43 pm

Welp! That's confirmation, thanks.

Guess the most prudent fix for reQuiem would be to change the skychain management so that it doesn't implode when there are duplicate cl_visedicts elements.
User avatar
Johnny Law
 
Posts: 22
Joined: Mon Apr 28, 2014 8:34 pm
Location: San Carlos, CA

Re: cl_visedicts: are duplicate entries OK/expected?

Postby Baker » Sat Jul 12, 2014 5:25 am

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: cl_visedicts: are duplicate entries OK/expected?

Postby Baker » Sat Jul 12, 2014 5:41 am

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: cl_visedicts: are duplicate entries OK/expected?

Postby Johnny Law » Sat Jul 12, 2014 2:33 pm

User avatar
Johnny Law
 
Posts: 22
Joined: Mon Apr 28, 2014 8:34 pm
Location: San Carlos, CA

Re: cl_visedicts: are duplicate entries OK/expected?

Postby Baker » Sat Jul 12, 2014 3:08 pm

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

Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests