Jump to content

TLA_DEBUG_STACK_LEAK


Recommended Posts

So, sometimes the game freeze and the last lines of the KSP.log are:

[WRN 16:25:46.084] Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
[WRN 16:25:46.084] To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations

Any idea of what is this and how to avoid it?

Link to comment
Share on other sites

Ok, in my Ksp 1.8.1 copy (less moded) i got the same issue, then I removed the MiniAVC.dll and MiniAVC.xml  to test if that was the solution, the game had no frezee at all, and no TLA_DEBUG_STACK_LEAK appeared in the log, i just ask,

Is this the solution? If not, What i need to do?

Link to comment
Share on other sites

  • 2 weeks later...

Ok, im frustrated, removing MiniAVC was a TEMPORARY solution, now, it kicks in the editor, same issue 5 times a row, then, im making a report.

KSP Version:  1.8.1.2694

What Happens: TLA_DEBUG_STACK_LEAK  Crashes the game

Mods / Add-Ons: AllTweak ModularLaunchPads AnimatedDecouplers Ariane6 ASETAgency/Avionics/Props B5 B9PartSwitch BahamutoDAnimationModules CA-Mk3Block2 ClickTroughBlocker CommunityCategoryKit/ResoursePack/Techtree Benjee10SharedAssets SOCK ToolbarController CormorantAeronology CraftManager CustomPreLaunchCheks EasyVesselSwitch Firespitter FMRS  FullAutoStrut htRobotics InternalRCS JanitorsCloset RasterPropMonitor KER KerbalFoundries2 KerbalKonstructs KerbalReusabilityExpansion HyperEdit KerbalXmod KIS KSPWheel KXAPI SpaceXLaunchersPack MJ MJForAll NASACountDown NearFutureSolar/Props/Spacecraft/LV  S.A.V.E  OmegaSpaceXLandingpads PlumeParty QuizAeroTechContinued reDIRECT ReStock RetractableLiftingSurface SpaceLaunchSystem SpaceTuxIndustries StationPartsRedux TundraExploration/SpaceCenter TweakScale VesselMover MM

Steps to Replicate:  Start KSP and do nothing for 2 seconds, it will freeze forever, another way is to going straight into the VAB and lod any craft, if you are lucky enough the game should freeze forever.

Result: Game Crash

Fixes/Workarounds: Temporary solution: Delete any MiniAVC.dll / .xml and MiniAVC.log

Other Notes/Pictures/Log Files: Notes: Can happen in the start, KSC view and in the editors. Pictures: None. Logs: KSP.log

Edited by Commodore_32
Missed mod
Link to comment
Share on other sites

Hmm, I googled the TLA_DEBUG_STACK_LEAK and I found some issue from the current Unity engine, so, it is no longer a problem from KSP, though removing MiniAVCs helped a little bit, still it is not the huge solution, i guess when a new Unity version fixes the problem, it should be implemented later on 1.9 or even 1.8 if it is not very close.

Link to comment
Share on other sites

8 hours ago, Commodoregamer118 said:

Hmm, I googled the TLA_DEBUG_STACK_LEAK and I found some issue from the current Unity engine, so, it is no longer a problem from KSP, though removing MiniAVCs helped a little bit, still it is not the huge solution, i guess when a new Unity version fixes the problem, it should be implemented later on 1.9 or even 1.8 if it is not very close.

Yep. But until there, you need a workaround to at least have something to play until the fix is not applied.

One thing that may help is to delete a memory intensive Add'On to see what happens. If nothing changes, put them back and delete something else. Rinse, repeat. And yeah, it sucks - I know it.

I have some KSP 1.8.x installments at hand for doing tests, and besides had shoving a huge amount of Add'Ons (some of them not "updated" yet), I never got this one. But I'm using a Mac, this could be something specific to Windows….

Link to comment
Share on other sites

2 hours ago, Commodoregamer118 said:

Well I may try removing KerbalKonstrucs Tundra space center, (just the ones that i dont really need)

You recommend removing much mods at the same time or separetly?

Ideally, one by one. But, boy, this is boring... :)

one way to speed up things is kinda do a binary tree approach:

remove half the add-ons (but not the dependencies from then the other half).

see what happens.

put them back, remove the other half.

See what happens.

Take that half that gave you the behaviour under research. Split it in half, go to step 1.

This is pretty good to speed up looking for a single trigger for the problem, but it's not bullet proof. Now and then you end up having to do the hard way on a second attempt.

On some weird bugs as this one, flipping a coin can be the wisest choice sometimes... :P

 

 

Edited by Lisias
Kraken damned Autocompletes
Link to comment
Share on other sites

  • 4 months later...

Im not sure if this problem will be fixed or so, I stopped playing KSP for like 3 months due to not playing well, tell me if i am wrong, you launch KSP with a lot of excitement to do a rocket or launch a mission to duna, and in the editor you are halfway of finishing you ship, and when you put a payload, your KSP freezes to never respond, and you did not saved your ship, hours wasted, to see in log some 5 errors that say:

[WRN 16:23:17.449] To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations
[WRN 16:23:17.488] Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak

No information about to correct the game, uninstall a mod, or do anything.

I mean seriously this is a big problem, now instead of doing something until KSP launches, now i need to stay looking for it to show the menu screen and in less than TWO seconds do something, or else it will crash, in the KSC view i need to set an editor and start making something quick, because the time before it freezes is COUNTED and you DONT KNOW how much time you have, can be from 1 hour to 10 MINUTES, so you cant really do absolutley NOTHING in-game,

All of my 3 installations have the same problem, an 1.8.1 with mods, another 1.8.1 with less mods and an 1.9.1 heavily moded, all of them with the LASTEST UPDATES on mods, and if you ask, the stock copies do the same.

I am tired of this, and if this happens to somebody else they will be tired too, but, im not sure if this thing happended to somebody else, in that case, you can post here and say your experience with this error, and if not, i guess it will be my fault as some errors that happended to me nobody else had experienced that, and so everyone sees me like a crazy person just doing that for attention, and not helping since its just one in millions and nothing happens if we dont help.

If someone knows about this, experienced it, or know how to fix this, it would be appreciated for you to talk here or on private.

-Commodoregamer118

 

Link to comment
Share on other sites

On 6/4/2020 at 6:42 PM, Commodoregamer118 said:

Player.log, please, this one is mostly useless for this sort of thing.

And I asked for another just to have some fresh info.

One thing I did notice, was that you seem to be using a very old mod, Fantom Works, and there are a lot of issues with the parts such as:

ERR 16:03:35.590] PartCompiler: Cannot find Part of type 'Strut'

ERR 16:03:35.598] PartCompiler: Cannot clone model from 'Fantom Works/Kirage 2000' directory as model does not exist

[ERR 16:03:40.456] PartCompiler: Cannot replace texture as cannot find texture 'biPlane' to replace

[LOG 16:06:03.587] Cannot find InternalProp 'B9_AbortButton2'

You are alsu using SXT, and either you are using an old version or you haven't followed the instructions in the README:

[ERR 16:05:46.158] PartCompiler: Cannot replace texture 'fueltTanks_cm' as cannot find texture 'Squad/Parts/FuelTank/Size3Tanks/fueltTanks_cm' to replace with

 

And I see you are using BDArmory, which is where the errors (NullRefs) appear to be from, the errors start happening right after a part is deleted.  Have you inquired in the BDArmory thread?

Link to comment
Share on other sites

Either without BDArmory, SXT and FantomWorks it keeps happening, from the instrucutions for SXT i have never seen problems with it, and its installed from CKAN, I am unable to get the Player.log due to the install is a copy, not my main install, so the Player.log is from my 1.9.1 install, and the log that you saw was from the less moded 1.8.1 so it wont make sense, i dont know if the copies overwrite the 1.9.1´s  logs, if so i will carefully check if they are from the same match, if not, the is there a way to say  to the KSP installation the store it to an specific place? if also not, how do i get that log?

Waiting for quick answer

-Commodoregamer118

Edited by Commodoregamer118
Link to comment
Share on other sites

Ah ha! I got the log!

https://1drv.ms/u/s!AtUgGSbBKMe8iFAyrUj5NdLROz5S?e=gXMDFz

I also checked the log, at the end of it there are also TLA_DEBUGs

Im starting to think that my PC is the problem, the logs say that the current allocation is 7 frames old, so i dont know if my PC is fast enough to keep the frames in sync.

-Commodoregamer118

Link to comment
Share on other sites

Hmm, I have been doing some research, in my 1.9.1 install the TLAs appear less times than with both 1.8.1 installs, and i have noticed that @Lisias was correct!

The less mods you have, the less posibility of the error to come, and also the combination of mods also matters and a lot, for example the list of mods that is estable in 1.9.1 is this:

https://imgur.com/FzeGJoL.png

 Plus SXT and TweakScale, MM.

Everything is great till i add a mod, **IT DOESNT MEAN THAT THE MOD IS TO BLAME**  and the mod is NeistAir, I know its a WIP but i dont think it is causing the problem, due to the 1.8.1 installs have not installed NeistAir still have the problem,

Conclusion, the amount of mods and some specific ones changes the possibilities of the TLAs to show up, but we need a work around.

( if the developer of neistair is reading this, try to fix it, your mod is wonderfull, there are alredy logs )

Edited by Commodore_32
Link to comment
Share on other sites

1 hour ago, Commodoregamer118 said:

I deleted NeistAir, and installed AARS,l Aircraft Carrier Accesories and Carrier Vessel eXpansion.

Result: TLAs everywhere

Result after removing them: ALso TLAs

Status: Stability broken. No KSP soon.

The interesting thing about it is that on MacOS I do not get any of these problems, and some os my test beds are so terribly overloaded that they takes 20 minutes or more to load. We may be facing some problems from Unity 2019, pretty probable on the Garbage Collector.

[WRN 16:25:46.084] Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
[WRN 16:25:46.084] To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations

These lines suggests me that we are not facing a problem with some Add'On, but some bug on the CPP code of KSP itself. The fact that on MacOS I just don't get any of these problems (besides sometimes using more and less the same add'ons you do) appears to corroborate my thesis - something bad on the C# code would blow up in both systems.

 

(I presume this thread is a follow up from this one, right?)

Link to comment
Share on other sites

5 minutes ago, Lisias said:

presume this thread is a follow up from this one, right?

The logs say that it is a related problem with the allocations, and also the main menu crash is also the same, and the things different is that KSP is not consuming that much resources and that sound mod I never heard of it, I agree in that it could be a glitch from Unity and some CPP code error,

Since you are using Mac i dont think you can recreate this one.

9 minutes ago, Lisias said:

they takes 20 minutes or more to load.

Me too, you as a developer that have to load KSP like 10 times in a day to test a mod that if something is not correct it blow up the entire game, it is such a pain to wait for the game, if me that launching KSP for 3 times im already exhausted installing and uninstalling mods to see if i can play KSP.

15 minutes ago, Lisias said:

pretty probable on the Garbage Collector.

Since they updated it i started with the problems, and i read on the update window in 1.8.0 main menu that when you crash a ship it would be quick, sadly that thing just bringed the error and did not enhace the destruction in any way, so 1.8.0 is just 1.7.3 just kinda faster, new parts, and a deadly and very annoying error.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...