View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001827 | FSSCP | multiplayer | public | 2008-11-21 02:09 | 2009-08-25 01:08 |
Reporter | FUBAR-BDHR | Assigned To | taylor | ||
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Product Version | 3.6.9 | ||||
Fixed in Version | 3.6.11 | ||||
Summary | 0001827: Strange multiplayer glitch results in awarding of medals and rank. | ||||
Description | One of the strangest things I've seen in quite awhile. During TBP testing today I was in observer mode when all of a sudden a window flashed on the screen. Didn't catch what it said. When the mission ended I found myself being awarded the Epsilon Pegsi Liberation x2 , rank of Ensign, and Ace. Looking at the logs it seems as if I logged out and back into FS2netD during the game. This was not on a standalone I was actually hosting. | ||||
Additional Information | Running TBP in 3.6.10 from 11/09. Was playing in campaign mode. | ||||
Tags | No tags attached. | ||||
2008-11-21 02:09
|
|
2008-11-22 07:04
|
|
|
Had another similar occurrence in FS2 today. This time the game was still in the joining phase when everyone got a re-login to fs2netd. Logs from my hosting and one client in the new file. Can't say this is the exact same problem for sure but it looks similar. |
2009-02-14 02:41
|
|
|
Pretty much confirmed that this is caused by a reconnect to fs2netd during a mission. Attached a multi.log from a recent mission. I wasn't running debug at the time unfortunately. |
|
If that was the reason then it might be a server-side issue. There were different timeouts for client/session, and the session timeout was constant (it would always expire after a particular amount of time). In the v2.5 code for the server I rewrote the client and session code to merge the two and then have a single timeout that acted only on idle time. In other words, all of these random logouts with the client having to connect again should be a thing of the past once the new code is in place. If this problem is really due to that bug then it should resolve itself once the new server code goes live. |
|
Thats good to know. I don' think this is the only problem that relogin causes. I think it also causes the next missions stats to not be valid (even if it' a valid mission) for the host when it occurs in the lobby. So hopefully the upddate will cure at least 2 problems. |
|
I know you already have an idea what is causing this one but I just noticed a new part of the problem. The reset happened while in game and when I went back to the lobby I was logged it with a 0 at the end of my name like I had 2 connections. Basically just a FYI in case it changes the the train of thought on the fix. |
|
This apparently just happened on a standalone for the first time. Amazingly it didn't just crash as usual. Attaching debugger call stack and variables just in case it helps track down the cause. I'm also uploading the multi and fs2_open logs. This was from 3.6.11. I believe the revision was 5524. 5520 at the oldest. |
2009-08-21 22:43
|
medals_standalone.txt (6,342 bytes)
fs2_open_3_6_11d.exe!debug_int3(char * file=0x00dd2b84, int line=897) Line 760 C++ fs2_open_3_6_11d.exe!WinAssert(char * text=0x00dfb24c, char * filename=0x00df9743, int linenum=9573) Line 897 + 0x13 bytes C++ > fs2_open_3_6_11d.exe!sexp_grant_medal(int n=335) Line 9573 + 0x26 bytes C++ fs2_open_3_6_11d.exe!eval_sexp(int cur_node=334, int referenced_node=-1) Line 16495 + 0x9 bytes C++ fs2_open_3_6_11d.exe!eval_when(int n=333, int use_arguments=0) Line 6785 + 0xb bytes C++ fs2_open_3_6_11d.exe!eval_sexp(int cur_node=320, int referenced_node=-1) Line 16021 + 0x16 bytes C++ fs2_open_3_6_11d.exe!mission_process_event(int event=13) Line 913 + 0xb bytes C++ fs2_open_3_6_11d.exe!mission_eval_goals() Line 1062 + 0x9 bytes C++ fs2_open_3_6_11d.exe!game_simulation_frame() Line 4277 C++ fs2_open_3_6_11d.exe!game_frame(int paused=0) Line 4693 C++ fs2_open_3_6_11d.exe!game_do_frame() Line 5121 + 0x7 bytes C++ fs2_open_3_6_11d.exe!game_do_state(int state=2) Line 6892 C++ fs2_open_3_6_11d.exe!gameseq_process_events() Line 405 + 0x14 bytes C++ fs2_open_3_6_11d.exe!game_main(char * cmdline=0x00151f0b) Line 7453 + 0x5 bytes C++ fs2_open_3_6_11d.exe!WinMain(HINSTANCE__ * hInst=0x00400000, HINSTANCE__ * hPrev=0x00000000, char * szCmdLine=0x00151f0b, int nCmdShow=1) Line 7527 + 0x9 bytes C++ fs2_open_3_6_11d.exe!__tmainCRTStartup() Line 263 + 0x2c bytes C fs2_open_3_6_11d.exe!WinMainCRTStartup() Line 182 C kernel32.dll!7c817067() [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] Locals: n 335 int - medal_name 0xcccccccc <Bad Ptr> char * CXX0030: Error: expression cannot be evaluated i -858993460 int Autos: - Player 0x0131e628 struct player * Players {callsign=0x0131e628 "server" short_callsign=0x0131e645 "Standalone" short_callsign_width=0 ...} player * + callsign 0x0131e628 "server" char [29] + short_callsign 0x0131e645 "Standalone" char [29] short_callsign_width 0 int + image_filename 0x0131e668 "" char [32] + squad_filename 0x0131e688 "" char [32] + squad_name 0x0131e6a8 "" char [33] num_campaigns 0 int + current_campaign 0x0131e6d0 "" char [32] + campaigns 0x00000000 {filename=0x00000000 <Bad Ptr> num_missions_completed=??? missions_completed=0x00000024 <Bad Ptr> } campaign_info * readyroom_listing_mode 0 int main_hall 0 unsigned char flags 80 int save_flags 0 int + keyed_targets 0x0131e704 {next=0x0131e704 prev=0x0131e704 how_added=0 ...} htarget_list [8] current_hotkey_set -1 int + lead_target_pos {xyz={...} a1d=0x0131e788 } vec3d lead_target_cheat 0 int lead_indicator_active 0 int lock_indicator_x 0 int lock_indicator_y 0 int lock_indicator_start_x -1 int lock_indicator_start_y -1 int lock_indicator_visible 0 int lock_time_to_target 0.00000000 float lock_dist_to_target 0.00000000 float last_ship_flown_si_index 0 int objnum 16 int + bi {status=0x0131e7c0 } button_info + ci {pitch=0.00000000 vertical=0.00000000 heading=0.00000000 ...} control_info + stats {flags=0 score=0 rank=0 ...} scoring_struct friendly_hits 0 int friendly_damage 0.00000000 float friendly_last_hit_time 0 long last_warning_message_time 0 long control_mode 0 int saved_viewer_mode 0 int check_warn_timestamp 1 int distance_warning_count 0 int distance_warning_time 0 int allow_warn_timestamp 1 int warn_count 0 int damage_this_burst 0.00000000 float repair_sound_loop -1 int cargo_scan_loop -1 int praise_count 0 int allow_praise_timestamp 1 int praise_delay_timestamp 0 int ask_help_count 1 int allow_ask_help_timestamp 3941728 int scream_count 0 int allow_scream_timestamp 3896728 int low_ammo_complaint_count 0 int allow_ammo_timestamp 1 int subsys_in_view 0 int request_repair_timestamp 3962586 int cargo_inspect_time 0 int target_is_dying -1 int current_target_sx -1 int current_target_sy -1 int target_in_lock_cone -1 int + locking_subsys 0x00000000 {next=??? prev=??? system_info=??? ...} ship_subsys * locking_subsys_parent -1 int locking_on_center 0 int killer_objtype -1 int killer_species 0 int killer_weapon_index -1 int + killer_parent_name 0x0131efa4 "" char [32] check_for_all_alone_msg 0 int update_dumbfire_time 1 int update_lock_time 1 int threat_flags 0 int auto_advance 0 int + m_local_options {flags=0 obj_update_level=0 } multi_local_options + m_server_options {squad_set=0 endgame_set=0 flags=0 ...} multi_server_options insignia_texture -1 int tips 0 int shield_penalty_stamp 0 int failures_this_session 0 int show_skip_popup 1 '' unsigned char num_variables 0 int + player_variables 0x0131f018 {type=0 text=0x0131f01c "" variable_name=0x0131f03c "" } sexp_variable [100] + death_message 0x01320aa8 "" char [256] + lua_ci {pitch=0.00000000 vertical=0.00000000 heading=0.00000000 ...} control_info - Player->stats {flags=0 score=0 rank=0 ...} scoring_struct flags 0 int score 0 int rank 0 int - medals 0x0131e810 int [18] [0] 0 int [1] 0 int [2] 0 int [3] 0 int [4] 0 int [5] 0 int [6] 0 int [7] 0 int [8] 0 int [9] 0 int [10] 0 int [11] 0 int [12] 0 int [13] 0 int [14] 0 int [15] 0 int [16] 0 int [17] 0 int + kills 0x0131e858 int [130] assists 0 int kill_count 0 int kill_count_ok 0 int p_shots_fired 0 unsigned int s_shots_fired 0 unsigned int p_shots_hit 0 unsigned int s_shots_hit 0 unsigned int p_bonehead_hits 0 unsigned int s_bonehead_hits 0 unsigned int bonehead_kills 0 int missions_flown 0 unsigned int flight_time 0 unsigned int last_flown 0 long last_backup 0 long m_medal_earned 0 int m_badge_earned 0 int m_promotion_earned 0 int m_score 500 int + m_kills 0x0131eaa8 int [130] + m_okKills 0x0131ecb0 int [130] m_kill_count 0 int m_kill_count_ok 0 int m_assists 0 int mp_shots_fired 0 unsigned int ms_shots_fired 0 unsigned int mp_shots_hit 0 unsigned int ms_shots_hit 0 unsigned int mp_bonehead_hits 0 unsigned int ms_bonehead_hits 0 unsigned int m_bonehead_kills 0 int m_player_deaths 0 int + m_dogfight_kills 0x0131eee4 int [12] Player->stats.m_medal_earned 0 int |
2009-08-21 22:47
|
|
|
If that variable output is correct then I'm thinking that this is an initialization issue with the scoring struct. If it's not initialized properly then you would definitely get this error. I'll try and get to this in the next couple of weeks (I need you to test a new build for me anyway), unless someone else gets the chance to track it down first. |
|
Just realized that I might know exactly what causes this, and after a quick check I think that I'm correct. And it did turn out to be a bug which is triggered by the whole FS2NetD re-login thing. The problem is that init_scoring_struct() doesn't properly init the struct for use. It does zero everything out like it should, but several of the values are required to be -1 instead of 0. scoring_level_init(), which is called at the start of any level for all users and resets the mission specific values, was hiding this oversight. When FS2NetD logs in it asks the server to get the stats for the user, calls init_scoring_struct() to reset it to default, then fills in the values stored on the server. Since it isn't initialized properly for in-mission use, you end up hitting the Assert() since it thinks that you were awarded a medal/rank by mistake. This does also point out another annoying bug as well: if you get logged out of FS2NetD in the middle of a mission then your stats for that mission up to that point get reset. Both issues are simple to fix so I'll try and get it taken care of tomorrow. |
|
Both issues should now be fixed in SVN. I haven't really had a chance to properly test it though. If it isn't fixed then reopen and I'll take another look. |
|
Fixered. |
Date Modified | Username | Field | Change |
---|---|---|---|
2008-11-21 02:09 | FUBAR-BDHR | New Issue | |
2008-11-21 02:09 | FUBAR-BDHR | File Added: medal.rar | |
2008-11-22 07:04 | FUBAR-BDHR | File Added: relogin.rar | |
2008-11-22 07:07 | FUBAR-BDHR | Note Added: 0010251 | |
2009-02-14 02:41 | FUBAR-BDHR | File Added: multi.log | |
2009-02-14 02:42 | FUBAR-BDHR | Note Added: 0010674 | |
2009-02-14 03:53 | taylor | Note Added: 0010675 | |
2009-02-14 06:22 | FUBAR-BDHR | Note Added: 0010676 | |
2009-02-22 04:08 | FUBAR-BDHR | Note Added: 0010685 | |
2009-08-21 22:43 | FUBAR-BDHR | Note Added: 0011144 | |
2009-08-21 22:43 | FUBAR-BDHR | File Added: medals_standalone.txt | |
2009-08-21 22:46 | FUBAR-BDHR | Note Edited: 0011144 | |
2009-08-21 22:47 | FUBAR-BDHR | File Added: multi_medals.rar | |
2009-08-21 22:48 | FUBAR-BDHR | Note Edited: 0011144 | |
2009-08-22 05:14 | taylor | Note Added: 0011146 | |
2009-08-22 19:06 | taylor | Note Added: 0011148 | |
2009-08-22 19:06 | taylor | Status | new => assigned |
2009-08-22 19:06 | taylor | Assigned To | => taylor |
2009-08-25 01:08 | taylor | Note Added: 0011155 | |
2009-08-25 01:08 | taylor | Status | assigned => resolved |
2009-08-25 01:08 | taylor | Fixed in Version | => 3.6.11 |
2009-08-25 01:08 | taylor | Resolution | open => fixed |
2009-08-25 01:08 | taylor | Note Added: 0011156 |