Tremulous Forum

Mods => Modding Center => Topic started by: Drakotsu on December 19, 2008, 03:42:10 am

Title: QVM Error: Turrets
Post by: Drakotsu on December 19, 2008, 03:42:10 am
Hello,
Ive just compiled a QVM I made, after applying the wireddd-override patch BY HAND.
Now,
When I started my server to test it, I first tested on aliens.
When the turrets started shooting, the server would freeze, and the server console would give me a cvar updating error, something like that.

Heres the error after turrets start shooting:

Code: [Select]
ERROR: Cvar_Update: handle out of range
********************
----- Server Shutdown (Server crashed: Cvar_Update: handle out of range) -----
Sending heartbeat to master.tremulous.net
Sending heartbeat to master.tremulous.net
==== ShutdownGame ====
ShutdownGame:
------------------------------------------------------------
---------------------------
Hunk_Clear: reset the hunk ok

Help? =\..
Without the wireddd-override addition this does not occur..
Ive compiled another version without the patch, and it works perfectly.

Thanks
Title: Re: QVM Error: Turrets
Post by: Amanieu on December 19, 2008, 08:34:16 am
That's a bug with mystats, it's fixed in the latest version of Lak's qvm
Title: Re: QVM Error: Turrets
Post by: benmachine on December 19, 2008, 06:17:00 pm
That's a bug with mystats, it's fixed in the latest version of Lak's qvm

It's a null dereference bug. It's not necessarily mystats.

The override patch is a terrible idea poorly coded. Don't use it.
Title: Re: QVM Error: Turrets
Post by: Amanieu on December 19, 2008, 06:23:30 pm
It's a null dereference bug. It's not necessarily mystats.
The null deref is in the mystats code.
Title: Re: QVM Error: Turrets
Post by: Drakotsu on December 19, 2008, 11:15:53 pm
Thats for replying guys :).
All the best, good luck!
Title: Re: QVM Error: Turrets
Post by: benmachine on December 20, 2008, 04:55:26 pm
It's a null dereference bug. It's not necessarily mystats.
The null deref is in the mystats code.

Dude applies patch, dude gets null dereferences. Excuse me for assuming, but I'm guessing null dereferences came from patch. I briefly looked at the patch itself and not only does its very description say "full of bugs", but large portions of the code are copy-pasted and I'm not confident about the rest.

What evidence have you to think otherwise?
Title: Re: QVM Error: Turrets
Post by: Amanieu on December 20, 2008, 05:42:38 pm
There used to be a null deref bug in the mystats code (now fixed in lak's qvm). On qvms, accessing NULL would cause you to access the start of the qvm memory, which where all the vmCvar_t are in g_main.c. Normally this is harmless, but if you change the size of the gclient_t structure (increase it by 4 bytes), you will modify the "handle" field of vmCvar_t, which will be seen as an invalid handle when the cvars are updated.
Title: Re: QVM Error: Turrets
Post by: Syntac on December 20, 2008, 11:40:29 pm
I'm siding with Ben on this. We don't even know Drakotsu is using Lakitu's QVM. Seems to me that if applying a patch causes an error to spring up, the error is caused by the patch, no?
Title: Re: QVM Error: Turrets
Post by: Archangel on December 21, 2008, 12:20:03 am
because he said FIXED in lak's qvm.
Title: Re: QVM Error: Turrets
Post by: Syntac on December 21, 2008, 04:35:24 am
Drakotsu: Are you, or are you not, using Lakitu's QVM? If so, which version and what other patches?
Title: Re: QVM Error: Turrets
Post by: Drakotsu on December 22, 2008, 11:43:05 pm
The problem is solved btw guys..

And no im not using Lakitus QVM and no im not getting any mystats error.
Title: Re: QVM Error: Turrets
Post by: Syntac on December 23, 2008, 12:27:13 am
...and how did you solve it? Tell us please, so we don't get people asking us the same question.
Title: Re: QVM Error: Turrets
Post by: Drakotsu on December 27, 2008, 01:42:28 am
Ohh I just didnt use the override patch :D Undid everything having to do with that patch.
Helps that I backup all my /game/ files before I patch :3
Title: Re: QVM Error: Turrets
Post by: Archangel on December 27, 2008, 02:58:43 am
no it doesn't... there's a -r flag to patch for a reason.
Title: Re: QVM Error: Turrets
Post by: Drakotsu on December 27, 2008, 04:45:00 am
No what doesnt? Or were you replying to some other reply on this thread?
Title: Re: QVM Error: Turrets
Post by: lavacano201014 on December 27, 2008, 06:56:52 am
no it doesn't... there's a -r flag to patch for a reason.

He said he did it by hand, which I assume means copy pasting in what needs to be put in the code.

Also, it's been a while, Inaki.
Title: Re: QVM Error: Turrets
Post by: Undeference on December 28, 2008, 01:52:18 am
no it doesn't... there's a -r flag to patch for a reason.
-r is completely different from -R (what you meant), but patch is useless when the patch can't apply/revert cleanly.