Jump to content

Understanding Log Files


Recommended Posts

After fighting with CKAN (which is buggy as heck on a mac) and 1.7.3 settled in, I am trying to get playing on of my favorite games.  For some reason though it won't start up.  Some mod is having some problem...I don't know who or why.  In the past I have uploaded my logs and got answers back fairly quickly which solved the issue....either incompatible mods or duplicate mods or something.  I know I can do that again...and again....and again, like other players do, but I want to learn how to identify issues.  Is there a tool that helps you understand what is going wrong or what do  you look for?  30MB log files are a lot to go through.

Link to comment
Share on other sites

39 minutes ago, traisjames said:

Is there a tool that helps you understand what is going wrong

Not really a tool but a preset for the notepad++ analyses tool. It's written for the KSP.log, not quite sure if it works for the Player.log as well:

It's a really long post but if you want to use it, you have to read all of it ;)

 

47 minutes ago, traisjames said:

what do  you look for?  30MB log files are a lot to go through.

A log file of this size usually indicates a log spam, especially if the game crashes fairly quick (a huge amount of mods and playing for a few hours can create a log of the same size), so the first thing I would do is scrolling through the whole log, to find the spam. It should be easy to find since thousands of lines of the same content will stick out, even at a high scroll speed.

But in general, I'll follow a few other steps:

  • if it is not my own log: check version of unity in the very first line of the log. if it is NOT "2017.1.3p1" but the owner of the log says he/she is using KSP 1.4+, it's the wrong log. Also, check the basic hardware specs here. Also also, check the operating system by looking for something like this:
    Quote

    [KSP Version]: 1.7.3.2594 (WindowsPlayer x64) (x64) en-us ==============================

 

  • Check the installed mods: Close to the beginning of the log, you'll find a list of installed mods (look for "Mod DLLs found:" and "Folders and files in GameData:"). If the mod creator keeps the AssemblyInfo.cs of the mod up-to-date, you'll also find a version number in this list. On top of the list, the log will also show the environment info, which includes startup parameters which might be important if someone enforces dx11 and a visual issues occures.
  • search for "error", "warning" and "exception", especially the last one is usually the culprit of a game crash. Let me show you an example of a typical NullRef (taken from here):
    [EXC 19:11:36.353] NullReferenceException: Object reference not set to an instance of an object
        BonVoyage.KopernicusWrapper.GetCurrentStarName ()
        BonVoyage.Tools.GetMainStar (.Vessel v)
        BonVoyage.BVController.SystemCheck ()
        BonVoyage.RoverController.SystemCheck ()
        BonVoyage.ControlWindowModel.SetController (BonVoyage.BVController controller)
        BonVoyage.BonVoyage.ShowControlWindow ()
        BonVoyage.BonVoyage.ToggleControlWindow ()
        BonVoyage.BonVoyageModule.BVControlPanel ()
        BaseEvent.Invoke ()
        UIPartActionButton.OnClick ()
        UnityEngine.Events.InvokableCall.Invoke ()
        UnityEngine.Events.UnityEvent.Invoke ()
        UnityEngine.UI.Button.Press ()
        UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData)
        UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData)
        UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor)
        UnityEngine.EventSystems.EventSystem:Update()

    This is clearly an issue of "bon voyage" and each line will show you the "steps" of the game which lead to this issue, starting at the bottom! In this case, the "update" method (which runs on every frame of the game) called something, which called something else and so on until "BonVoyage.KopernicusWrapper.GetCurrentStarName ()" finally throws the exception. This entry shows you exactly where in the code the issue appears by telling you "Namespace.Class.Method" and the namespace is usually the name of the mod itself, in this case "bon voyage". Mod creator and people who know some coding in C#, may actually take a look the source code.
    In this example, we also get another hint by the class name "KopernicusWrapper", so Kopernicus is somehow involved as well ("Wrapper" are usually classes which uses reflection to inspect and invoke fields, methods, etc of other assemblies without depending on it.)

  • If you found an exception and you got a hint to the mod which threw it, double check the mod version, false install paths (like "KSP/GameData/GameData) and missing dependencies. Also check the first and last page of the mod release thread for similar/known issues and probably fixes.

  • You may want to enable these settings in the debug menu of KSP:

    Spoiler

    I4UNSGe.png

    So errors and exceptions are displayed ingame, which helps to figure out the exact moment an issue occures. If your game crashes before you can access the debug menu, you can also edit the "settings.cfg" in your KSP directory. Search for "LOG_INSTANT_FLUSH", "LOG_ERRORS_TO_SCREEN", "LOG_EXCEPTIONS_TO_SCREEN" and set them to "True".

  • If you got a hint to a mod in the exception messages, you may want to setup an test install of KSP which runs just the mod in question (+dependencies). If you can replicate the same issue in this test install, it's an issue of this particular mod but if the issue disappears, it's an incompatibility to another mod. There is no easy way to figure out an incompatibility issue, you have to add more and more mods until the issue reappears until you found the one which doesn't play well with the other mod.

I guess that's all for now. If you post your log file, I can try to go through it and show you some more examples which are actually related to you, so you might be able to understand a few things better.
Also, I don't claim to be right on everything I've wrote down, pretty much all of it is self-taught by hanging out in the support forum over a long period^^

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...