saved game bug :(
Moderator: InsideQC Admins
5 posts
• Page 1 of 1
saved game bug :(
So somewhere when adding protocol 666 i cant save games. Funny i added 666 1 1/2 year ago no one ever found it.
Access violation.
Any idea where i should look? I've started from the save command up to the line above where it crashes and there are no code changes in those specific functions.
- Code: Select all
case ev_string:
sprintf (line, "%s", pr_strings + val->string);
break;
Access violation.
Any idea where i should look? I've started from the save command up to the line above where it crashes and there are no code changes in those specific functions.
- r00k
- Posts: 1110
- Joined: Sat Nov 13, 2004 10:39 pm
Re: saved game bug :(
hmm i wonder if using _snprintf instead would help 
Productivity is a state of mind.
-

revelator - Posts: 2567
- Joined: Thu Jan 24, 2008 12:04 pm
- Location: inside tha debugger
Re: saved game bug :(
which key/field/global is it saving?
strings are often dodgy. especially in 64bit builds. negative values are not unheard of. which is vile.
remember that the engine typically uses val->string = "somestring"-pr_strings; to set the string. the string value can point to ANY bit of memory (within a 32bit memory space), which can have been freed or whatever since it was allocated.
or the mod you're running somehow messed up some argument or something and stored a float in a string field, which is a common way to crash an engine...
making an engine 64-bit safe is fun, and typically fixes all these other issues in the process, if done properly.
sprintf won't crash on that line due to an overflow, the crash would be on one of the following lines instead. snprintf would be a good idea though. or strlcpy.
strings are often dodgy. especially in 64bit builds. negative values are not unheard of. which is vile.
remember that the engine typically uses val->string = "somestring"-pr_strings; to set the string. the string value can point to ANY bit of memory (within a 32bit memory space), which can have been freed or whatever since it was allocated.
or the mod you're running somehow messed up some argument or something and stored a float in a string field, which is a common way to crash an engine...
making an engine 64-bit safe is fun, and typically fixes all these other issues in the process, if done properly.
sprintf won't crash on that line due to an overflow, the crash would be on one of the following lines instead. snprintf would be a good idea though. or strlcpy.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Re: saved game bug :(
Well, so far I have tracked the bug back to Nov. 2012, so I'm sure it's not the protocol 666 implementation as I didnt have it in that version... 
- r00k
- Posts: 1110
- Joined: Sat Nov 13, 2004 10:39 pm
Re: saved game bug :(
Okay so, i found the bug....
seems to be the sv_cullentities code.....
not sure why.... unless the edict is on the list, but when culled the values are 0... :/
or the mod you're running somehow messed up some argument or something and stored a float in a string field, which is a common way to crash an engine...
seems to be the sv_cullentities code.....
- r00k
- Posts: 1110
- Joined: Sat Nov 13, 2004 10:39 pm
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest