Results 1 to 10 of 10

Thread: Med2TW doesn't produce a log in Linux (Ubuntu)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Socrates1984's Avatar Decanus
    Citizen

    Join Date
    Jun 2014
    Location
    Athens, Greece
    Posts
    555

    Default Med2TW doesn't produce a log in Linux (Ubuntu)

    Hi everyone!

    There is a variety of good things with Linux (Ubuntu) that I've been using for three or four months now, two of which are the following.

    1. The Linux-native version of the game seems much more stable. I haven't had not even one single CTD. Ever. Thank Feral Interactive for that probably or the OS, I don't know.
    2. Maybe because of that, in a grand feat of misjudgment, Feral Interactive preferred to not include the production of a log in medieval2.preference.cfg. Ergo I always have new problems to write about... EDIT: Or maybe it's me to blame, I don't know for sure.


    The problem: When a CTD occurs, there is no system.log.txt or it is empty.

    For the record:

    • Steam version of the game. Everything else works great.
    • Linux OS, Ubuntu 16.04 LTS. Everything else works great.
    • Vanilla + Kingdoms. Wait for it: Everything works great.
    • Mods work great too.
    • Feral Interactive is the company that created the game for Linux (and Mac).


    Let's get to it then:

    Here is what my unedited and backed-up medieval2.preference.cfg file looks like:
    Spoiler for Medieval2.preferences.cfg

    [audio]
    enable = 1
    master_vol = 100
    music_vol = 60
    provider = Miles Fast 2D Positional Audio
    sfx_vol = 100
    speech_enable = 1
    speech_vol = 100
    sub_faction_accents = 1

    [camera]
    default_in_battle = rts
    move = 50
    restrict = 1
    rotate = 50

    [controls]
    campaign_scroll_max_zoom = 30
    campaign_scroll_min_zoom = 30
    keyset = 0

    [game]
    advanced_stats_always = 0
    advisor_verbosity = 0
    ai_factions = skip
    allusers = 0
    auto_save = 1
    blind_advisor = 0
    campaign_map_game_speed = 99
    campaign_map_speed_up = 0
    campaign_num_time_play = 97
    chat_msg_duration = 10000
    disable_arrow_markers = 0
    disable_events = 0
    english = 0
    event_cutscenes = 1
    fatigue = 1
    first_time_play = 0
    gamespy_save_passwrd = 1
    label_characters = 0
    label_settlements = 1
    micromanage_all_settlements = 1
    morale = 1
    mute_advisor = 0
    no_campaign_battle_time_limit = 0
    pref_factions_played = 565519
    tutorial_battle_played = 0
    tutorial_path = norman_prologue/battle_of_hastings
    unit_size = huge
    unlimited_men_on_battlefield = 0
    use_quickchat = 0

    [hotseat]
    autoresolve_battles = 1
    disable_console = 1
    disable_papal_elections = 1
    passwords = 1
    save_prefs = 1
    update_ai_camera = 0
    validate_diplomacy = 1

    [network]
    use_ip =
    use_port = 27750

    [ui]
    SA_cards = show
    buttons = show
    full_battle_HUD = 1
    radar = show
    show_tooltips = 1
    unit_cards = show

    [video]
    anisotropic_level = 4
    anti_alias_mode = off
    antialiasing = 0
    assassination_movies = 1
    autodetect = 0
    battle_resolution = 1280 1024
    bloom = 1
    building_detail = high
    campaign_resolution = 1280 1024
    depth_shadows = 2
    depth_shadows_resolution = 2
    effect_quality = high
    event_movies = 1
    gamma = 125
    grass_distance = 75
    ground_buffers_per_node = 4
    ground_cover_buffers_per_node = 4
    infiltration_movies = 0
    model_buffers_per_node = 4
    no_background_fmv = 0
    reflection = 1
    sabotage_movies = 1
    shader = 2
    show_banners = 1
    show_package_litter = 1
    skip_mip_levels = 0
    splashes = 1
    sprite_buffers_per_node = 4
    stencil_shadows = 1
    subtitles = 0
    terrain_quality = custom
    texture_filtering = 2
    unit_detail = high
    vegetation = 1
    vegetation_quality = high
    vsync = 0
    water_buffers_per_node = 4
    widescreen = 0


    As you can clearly see in there, there is no:
    Code:
    [log]
    to = logs/system.log.txt level = * trace
    As was expected, I added it myself right at the bottom. It looks like this now:
    Code:
    [log]
    to = logs/system.log.txt level = * trace 
    
    [misc]
    show_hud_date    = true
    
    [io]
    file_first = true
    This should have solved the problem, but no, it hasn't. What's the reason for this?

    First possible reason: I am playing mods only.
    So, it is possible that the mod.cfg doesn't include such a line. It's not the case in all the mods I play. Take TATW for example:
    Code:
    [log] 
    to = logs/system.log.txt 
    ;level = * trace 
    level = * error
    Besides, I have learned that the Steam version of the game references not the mod.cfg, but the base game's .cfg, i.e. medieval2.preference.cfg. The result should be the production of a log.

    Second possible reason: I can't find the log file
    No, because it should be in the logs folder. Besides, I have used the powerful search function in all my hard disc and nothing was found. Oh, wait! There was something found, a system.log.txt, or something like that, but it was empty. Completely empty that is, not even a single letter. Even the size of it is 0 bytes.
    In one of my mods (Thera) I changed the folder path for testing purposes. This resulted in the production of a thera.system.log.txt, but alas it was empty too.

    Third possible reason: They are not CTDs
    My still-present-but-waning Windows reflexes have me used to a pop-up window when the game crashes: Medieval II Total War has encountered an unspecified error and will now exit. Something like that, I haven't seen it in ages. The thing is exactly that: I haven't seen it in ages, because when the game crashes and I'm back in my desktop again, there is no pop-up window. So, the result is the same, but the appearance is different, and that's why I assume it is a CTD.

    Fourth possible reason: The file placement
    This is a tricky one. IIRC the medieval2.preference.cfg was located somewhere inside the Medieval II Total War folder. This is not the case in Linux. The folder structure in this peculiar Feral Interactive+Linux+Steam installation is as follows:

    Base game folder

    Code:
    .local/share/Steam/steamapps/common/Medieval II Total War/share/data/
    Medieval2.preference.cfg folder
    Code:
    .local/share/feral-interactive/Medieval II Total War/VFS/Local/preferences/medieval2.preference.cfg
    Logs folder
    Code:
    .local/share/fereal-interactive/Medieval II Total War/VFS/Local/logs
    It is possible that the game doesn't send the crash data to the correct folder path.

    Fifth possible reason: Case sensitivity
    The least probable cause, mentioned only for the sake of completeness and to avoid related discussions. Linux is case sensitive, which means that this.txt is completely different than This.txt. This could result in the assocciated game engine function not finding the correct file to write its report about the crash.
    It has mostly been ruled out, because the case sensitivity issue is related only to files and folders names, not their contents.

    A note on *.dmp files: Not the case probably
    They are supposed to log everything that was happening when the PC crashed. There is a ton of *.dmp files in the following conspicuous directory:
    Code:
    .local/share/feral-interactive/Medieval II Total War/crashes
    An example of such a file:
    Code:
    00d312b2-8b83-4848-04111b73-729178ac.dmp
    After every CTD one of them is produced. I have spent a lot of time and energy trying to understand what these files are, how to open them, how to read them, how to debug them. Only to find out that I can open them with a text editor and wait for some minutes... Anyway these files are logging what was happening during the crash in the PC, not in the game.

    Another useful note: No CTDs when playing vanilla or Kingdoms (I said that already, didn't I?)
    Yep, there are no CTDs whatsoever. But only when playing the Vanilla game or the Kingdoms expansions. There is this irritating custom settlement bug in mods that is almost guaranteed to cause a CTD. So, when asking for help from the IWTE gurus, I am asked to provide a log and I can't.
    There are also my various modding attempts that by necessity come to stop with my first mistake, since I can't find out where I made the mistake and I have to abandon the project.

    Finally, my devious plan: Cause a CTD myself
    My super cool idea was to manually cause a CTD when playing the Vanilla game and see what happens. This will circumvent the Vanilla vs Mods problem stated above (First reason). Apparently the usual method of navigating the various menus (form Custom Battle to Campaign selection used to crash the game) didn't work, probably because Feral fixed it (?).

    So, does anyone know how to cause a CTD? Edit wrongly the serialization number in BMDB would work?

    This is my first babystep to find a solution. With any feedback I will update this post to include the info and the progress.
    Last edited by Socrates1984; January 24, 2017 at 04:39 AM.

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,680
    Blog Entries
    35

    Default Re: Med2TW doesn't produce a log in Linux (Ubuntu)

    It would appear the path in your log entry in the default CFG file gets prefixed with VFS/Local/ - which might explain why the mod switch in the mod's CFG file doesn't work

    Run the game with the log entry and check the date stamp of the empty system.log.txt files - if it close to the current system time then you have your log. Seeing that even a regular log has some entry I am guessing that Feral for some reason disabled the writing of the log entries to the file.










  3. #3
    ♔atthias♔'s Avatar dutch speaking
    Citizen

    Join Date
    Mar 2013
    Location
    France
    Posts
    4,059

    Default Re: Med2TW doesn't produce a log in Linux (Ubuntu)

    Code:
    [log]to = logs/system.log.txt level = * trace 
    
    [misc]
    show_hud_date    = true
    
    [io] 
    file_first = true
    AFAIK the code you write should be a the uttermost TOP of the file not at the bottom
    Rise of Mordor 3D Modelers Wanted
    Total War - Rise of Mordor
    Are you a 3D Environment and Character artist, or a Character Animator?

    If yes, then the Rise of Mordor team linked above is looking for you!
    Massive Overhaul Submod Units!
    D you want some units back in MOS 1.7? Install this mod http://www.twcenter.net/forums/showt...n-1-1-RELEASED
    It adds back units who were deleted from the campaign in MOS 1.7, namely the Winged Swordsmen, the Citadel Guard Archers and the Gondor Dismounted Bodyguard.

    Under the proud patronage of
    Frunk of the house of Siblesz

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,680
    Blog Entries
    35

    Default Re: Med2TW doesn't produce a log in Linux (Ubuntu)

    Quote Originally Posted by atthias View Post
    Code:
    [log]to = logs/system.log.txt level = * trace 
    
    [misc]
    show_hud_date    = true
    
    [io] 
    file_first = true
    AFAIK the code you write should be a the uttermost TOP of the file not at the bottom
    Unless that's a LINUX requirement it doesn't really matter: what matters is the header (eg [misc]) and what's underneath it - the sequence is inconsequential (don't you just love the word play?), all my mods have it usually in the second slot after [features].
    Last edited by Gigantus; January 24, 2017 at 03:29 AM.










  5. #5
    Socrates1984's Avatar Decanus
    Citizen

    Join Date
    Jun 2014
    Location
    Athens, Greece
    Posts
    555

    Default Re: Med2TW doesn't produce a log in Linux (Ubuntu)

    Thank you for your replies!

    Quote Originally Posted by Gigantus View Post
    It would appear the path in your log entry in the default CFG file gets prefixed with VFS/Local/ - which might explain why the mod switch in the mod's CFG file doesn't work

    Run the game with the log entry and check the date stamp of the empty system.log.txt files - if it close to the current system time then you have your log. Seeing that even a regular log has some entry I am guessing that Feral for some reason disabled the writing of the log entries to the file.
    Quote Originally Posted by atthias View Post
    AFAIK the code you write should be a the uttermost TOP of the file not at the bottom
    @Gigantus, the game didn't fill in the system.log.txt even back then when I had no mods installed. A *.dmp file is produced on the other hand, with the right time stamp. And the system.log.txt had indeed a correct time stamp, but it is still empty:
    Spoiler Alert, click show to read: 

    @atthias, I tested that and there is no difference.

    @both, do you know of a certain way to produce a CTD in the vanilla game?

  6. #6
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,680
    Blog Entries
    35

    Default Re: Med2TW doesn't produce a log in Linux (Ubuntu)

    In the unpacked game simply edit (increase) the hight lighted number in the modeldb file (unit_model directory):

    22 serialization::archive 3 0 0 0 0 886 0 0










  7. #7
    Socrates1984's Avatar Decanus
    Citizen

    Join Date
    Jun 2014
    Location
    Athens, Greece
    Posts
    555

    Default Re: Med2TW doesn't produce a log in Linux (Ubuntu)

    Quote Originally Posted by Gigantus View Post
    In the unpacked game simply edit (increase) the hight lighted number in the modeldb file (unit_model directory):

    22 serialization::archive 3 0 0 0 0 886 0 0
    Thanks, Gigantus!

    Did that and this time a window actually popped up for the very first time.
    Spoiler Alert, click show to read: 

    Sadly though, the log is still empty (the time stamp being right).

    I have contacted Feral Interactive support for this issue and I am waiting for their response.

  8. #8
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,680
    Blog Entries
    35

    Default Re: Med2TW doesn't produce a log in Linux (Ubuntu)

    The error code is interesting - the rest is from the usual data\text file.


    Edit: googling this gives me the impression that code 361 is as generic as CA's error message, this is what I get: “Can't load or unload this object'"
    Which is obvious but doesn't help a bit.
    Last edited by Gigantus; January 24, 2017 at 04:56 AM.










  9. #9
    Socrates1984's Avatar Decanus
    Citizen

    Join Date
    Jun 2014
    Location
    Athens, Greece
    Posts
    555

    Default Re: Med2TW doesn't produce a log in Linux (Ubuntu)

    A quick update.

    Feral Interactive Support have responded to my message:
    Just to let you know that this has been logged in the database and will be improved in the next update. You are correct in that it is not present, so we will look to reinstate it.
    So it's not just mine or anyone's fault. I gather when time comes, it will be solved by Feral themselves.

  10. #10
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,680
    Blog Entries
    35

    Default Re: Med2TW doesn't produce a log in Linux (Ubuntu)

    Let's hope for the best, without a log it's extremely difficult to mod.










Posting Permissions

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