Results 1 to 2 of 2

Thread: How to know which file is causing an error

  1. #1

    Default How to know which file is causing an error

    Aim of this tutorial : Find out which file(s) is responsible for an error.
    Modding area : Debugging.
    Program needed : Process Monitor (free, for windows)


    Introduction :
    This tutorial will help you determine which file is causing an error. It is especially useful for things like mapping, where several files are edited at the same time, or if you made a whole bunch of changes to text files.
    It will not tell you where the error is located in the file, or what this error is.
    Process Monitor records every system call and file access, this tutorial simply show you how to know which file was last accessed.
    I haven't encountered an occasion where the last file accessed (see below for more information) wasn't the problematic file, but it does not mean this method is infallible.


    Setting-up the program :
    After downloading Process monitor, simply launch it.
    We have to create filters to get the relevant information, so click on the filter menu, then filter.
    *The first filter is to get only results from RTW (as well as BI and Alexander) :
    Chose "Process Name", then "contains", then type "RomeTW" (without the quotes), then "include".
    *The second and third filter is to get the results for txt and tga files only :
    Chose "Path", then "contains", then type ".txt" (without the quotes), then "include".
    Chose "Path", then "contains", then type ".tga" (without the quotes), then "include".
    *If you are working on files with different types, or if you think the issue might come from somewhere else, either untick those two filters, or add new one(s).


    Here is how it should look like after you have set-up the filters.


    Using the program :
    All you need to do is run your mod, create the error, and check the end of (long) list.

    Be aware though that RTW access three files before exiting.
    From last to first : 10 times preferences.txt, 3 times player.txt and twice export_descr_advice.txt
    I don't really now what would happen if the error was in one of those files. (especially export_descr_advice.txt).
    Also, if you are kicked back to the menu, some textures files might be loaded afterward.
    Basically, you'll need to be a little careful about what is what.


    A few examples :
    Spoiler Alert, click show to read: 

    A descr_strat KTM.
    Notice how the menu textures are loaded after the bug.


    Spoiler Alert, click show to read: 

    A map_region.tga bug.
    As you can see, it tries to use corrected region.tga after that.
    The results must thus not be taken as is.
    Under the patronage of apple.
    Patron of ybbon66.

  2. #2
    Lü Bu's Avatar "Mightyest Man Alive"
    Join Date
    May 2008
    Location
    Split,Croatia
    Posts
    5,332

    Default Re: How to know which file is causing an error

    I add filter, open the game, game have ctd and nothing was written in Process Monitor program...
    Proud patron of Wlesmana
    Assyria Total War
    Check update thread for new HQ models
    My Workshop™


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •