MrSanchez 243 Posted March 15, 2015 (edited) Hi, When using my group's modpack and while in MP you die and respawn a lot (DM mission perhaps) - Eventually the game starts 'lagging/freezing' incrementally every time you respawn until teh moment where it freezes entirely and you are forced to task manager your way out of the game. After around 6-7 respawns the freezing starts getting noticeable, after 10-15 respawns the game starts to freeze entirely. Without the modpack this is not noticeable. This issue has been around for a year and our mod collection has had some huge changes. We're running over 45 mods so it's hard to diagnose what mod is causing problems. However, the RPT reports the following while respawning 21:35:18 Duplicate weapon Throw detected for C_man_1 21:35:18 Duplicate weapon Put detected for C_man_1 21:35:18 "7549.26 --- TcB respawn function startet" 21:35:18 "7549.26 --- TcB respawn function processed" 21:35:18 Error in expression <[] spawn > 21:35:18 Error position: <> 21:35:18 Error Invalid number in expression 21:35:18 Error in expression <while {true} do > 21:35:18 Error position: <> 21:35:18 Error Invalid number in expression 21:35:18 Error in expression <}; > 21:35:18 Error position: <}; > 21:35:18 Error Missing { 21:35:18 Error in expression <}; > 21:35:18 Error position: <}; > 21:35:18 Error Missing { 21:35:18 Suspending not allowed in this context 21:35:18 Error in expression <sleep 30; > 21:35:18 Error position: <sleep 30; > 21:35:18 Error Generic error in expression 21:35:18 No owner The whole RPT file actually gets spammed with this - In fact every time you respawn the error repeats itselfs again - Meaning that if you respawn once, you get this block of error code once, you respawn twice, you get the block twice, all the way until your game jams up. The RPT does not report WHAT mod or file or whatever is causing this. So my goal is to find what mod is causing the issue, but we have a lot of mods - Not sure if sharing the list of names of the mods would help out. The most remarkable error in this block of code is the Suspending not allowed in this context, so I did some googling and I found a 2009 post from Shuko "Suspending not allowed in this context"That means you are trying to sleep/wait in the main game thread, which is not allowed as it would halt the whole game. You have to create a new thread for it (using spawn or execvm). http://forums.bistudio.com/showthread.php?90900-Set-a-variable-when-chopper-height-is-lt-3-m So I wonder, what is the main game thread? How does one 'attempt' to sleep/wait in the thread? Is it init.sqf, editor-code block, addon-config code? The answer to those questions may lead to me finding what mod may have code in it that causes this error. Kind regards, Sanchez Edited March 15, 2015 by PhonicStudios Share this post Link to post Share on other sites
jshock 513 Posted March 15, 2015 Your going to have to go one-by-one, I would start with the ones that you know have a chnace of dealing with respawn or something similar. I would share the list too to see if anyone else has had the same problem and already diagnosed it. Share this post Link to post Share on other sites
miketim 20 Posted March 15, 2015 Its probably something like AGM . Which I know has a respawn module Share this post Link to post Share on other sites
jshock 513 Posted March 16, 2015 (edited) A bit tired so sorry if this is short but seeing how no one has answered the other part of the question. The main thread that he alludes to is the main game loop (the thing that makes the game, well a game), and in certain situations when coding in sqf there is the chance that you can suspend the main thread with a sleep/waitUntil/some other loop, which isn't allowed because for obvious reasons if whatever code in that specific suspension fails for whatever reason it would completely crash the game. So spawning or execVMing that code essentially makes another, seperated thread that runs either in parallel or will be executed once the main thread reaches a part of the main code that executes spawned code (this is the more likely of the two possibilities, as I'm unsure). Sorry, as I said a bit tired and can't think of a specific example of where such a thing is possible, but hopefully one of my other knowledgable colleauges can shed some light :). But I do know this means it can literally be any of the mods on your list. Edited March 16, 2015 by JShock Share this post Link to post Share on other sites
MrSanchez 243 Posted March 16, 2015 Great. Because when I did my first diagnostic I tested only mods that I thought of would use scripts and left out any that I thought of wouldn't. So I excluded map mods, content-only mods etc. We do use AGM but if I remember properly this problem occured before we started using AGM, though not sure. I'll start with the oldest mods in our collection, I'll post any progression that I make here. Kind regards, Sanchez Share this post Link to post Share on other sites
MrSanchez 243 Posted April 11, 2015 (edited) Well, looks like I finally found the criminal. Drifter's No Fatigue mod. It runs a script (called init.sqf) from the config.cpp, the content of the script is [] spawn { while {true} do { player enableFatigue false; sleep 30; }; }; _EHrespawnNF = player addEventHandler ["respawn", {_this exec "\DRI_nofatigue\init.sqf"}] I am not entirely sure what the big problem is here. I do see the stacking loops however, since that while{true} loops never stops, even upon death of player. Because of that reason I am going to change while{true} into while {alive player} and check the results. I'll edit the post once I have the results. edit2: Fixed the code privately, works fantastic now Kind regards, Sanchez Edited June 6, 2015 by PhonicStudios Share this post Link to post Share on other sites