SOLVED: Bugslaying: Errors That Crash The Game But Do Not Show In Compile?

Users who are viewing this thread

N0ught

Sergeant Knight at Arms
Specifically that's the issue I am having right now - the game crashes during combat, and especially at arena, even though everything compiles fine. There can only be a certain number of things that could cause this. But I am wondering if anyone has had a similar experience, and what the solution was.

Please regale us all with your bugslaying stories! :mrgreen:

(Seriously I gotta figure this out.)
 
N0ught said:
even though everything compiles fine.

compilation only does a few very simple checks on syntax, and a couple sanity checks on logic. That is all. It doesnt tell you that you code is good, that it will work, or that is free of bugs.

to test the code you need to run the game. Use logging messages to help identify at issues you cant figure out with error messages or by reading your own code.

remember to enable EDIT MODE so the logging goes into rgl_log.txt
 
Starting new log file.
Module_name =  Calradia
Setting Map Min X =  -105.000000
Setting Map Max X =  105.000000
Setting Map Min Y =  -105.000000
Setting Map Max Y =  105.000000
Num Hints =  15
Setting Time Multiplier =  0.250000
Setting Seeing Range Multiplier =  6.500000
Setting Track Spotting Multiplier =  0.800000
Setting Blood Multiplier =  100.000000
Setting player_wounded_treshold =  5.000000
Setting hero_wounded_treshold =  15.000000
Setting Skill Prisoner Management Bonus =  5
Setting Skill Leadership Bonus =  3
Setting Base Companion Limit =  20
Setting player_xp_multiplier =  2.000000
Setting hero_xp_multiplier =  2.000000
Setting regulars_xp_multiplier =  3.000000
Setting damage_interrupt_attack_treshold =  3.000000
Setting armor_soak_factor_against_cut =  0.650000
Setting armor_soak_factor_against_pierce =  0.350000
Setting armor_soak_factor_against_blunt =  0.300000
Setting armor_reduction_factor_against_cut =  1.000000
Setting armor_reduction_factor_against_pierce =  0.650000
Setting armor_reduction_factor_against_blunt =  0.650000
Setting horse_charge_damage_multiplier =  1.000000
Setting couched_lance_damage_multiplier =  0.750000
Setting missile_damage_speed_power =  2.000000
Setting melee_damage_speed_power =  2.000000
Scan Module Textures =  1
Scan Module Sounds =  1
Loading Resource  test
Loading Resource  textures_face_gen
Loading Resource  shaders
Loading Module Resource  my_textures
Loading Resource  textures
Loading Module Resource  my_materials
Loading Resource  materials
Loading Resource  materials_face_gen
Loading Resource  uimeshes
Loading Resource  meshes_face_gen
Loading Resource  helpers
Loading Resource  map_tree_meshes
Loading Resource  map_icon_meshes
Loading Resource  particle_meshes
Loading Resource  skeletons
Loading Resource  tree_meshes
Loading Resource  xtree_meshes
Loading Resource  grass_meshes
Loading Resource  plant_meshes
Loading Resource  body_meshes
Loading Resource  object_meshes
Loading Resource  object_bodies
Loading Resource  goods_meshes
Loading Resource  item_meshes1
Loading Resource  horse_a
Loading Resource  food
Loading Resource  beards
Loading Resource  armors_b
Loading Resource  armors_c
Loading Resource  helmets
Loading Resource  helmets_b
Loading Resource  village_houses
Loading Resource  village_houses_a
Loading Resource  village_houses_b
Loading Resource  hair
Loading Resource  deneme
Loading Resource  interiors_a
Loading Resource  interiors_b
Loading Resource  interiors_c
Loading Resource  arena
Loading Resource  map_icons_b
Loading Resource  castle_a
Loading Resource  dungeon
Loading Resource  stone_houses
Loading Resource  snowy_houses
Loading Resource  snowy_castle
Loading Resource  helmets_d
Loading Resource  castle_b
Loading Resource  square_keep
Loading Resource  anim_b
Loading Resource  shields
Loading Resource  shields_b
Loading Resource  weapon_meshes_c
Loading Resource  xtree_meshes_b
Loading Resource  map_icons_c
Loading Resource  pictures
Loading Resource  scene_encounter_spot
Loading Resource  interior_thirsty_lion
Loading Resource  scene_small_tavern
Loading Resource  weapon_meshes1
Loading Resource  weapon_meshes_b
Loading Resource  houses1
Loading Resource  wall_meshes1
Loading Resource  town_houses
Loading Resource  doors
Loading Resource  churches
Loading Resource  town_houses_b
Loading Resource  castle_c
Loading Resource  castle_d
Loading Resource  castle_e
Loading Resource  castle_f
Loading Resource  castle_g
Loading Resource  castle_h
Loading Resource  fake_houses
Loading Resource  town_houses_c
Loading Resource  banners
Loading Resource  map_flags
Loading Resource  map_flags_b
Loading Resource  map_flags_c
Loading Resource  costumes_a
Loading Resource  particles_2
Loading Resource  prisons
Loading Resource  prisons_b
Loading Resource  interiors_d
Loading Resource  costumes_b
Loading Resource  costumes_c
Loading Resource  arena_costumes
Loading Resource  boots_a
Loading Resource  terrain_borders
Loading Resource  terrain_borders_b
Loading Resource  skyboxes
Loading Resource  object_b
Loading Resource  tree_e_meshes
Loading Resource  destroy
Loading Resource  xtree_meshes_c
Loading Resource  grass_meshes_b
Loading Resource  interiors_steppe
Loading Resource  grooming_horse
Loading Resource  town_houses_d
Loading Resource  horses_b
Loading Resource  ani_horse_mounted
Loading Resource  deneme2
Loading Resource  horse_skeleton
Loading Resource  steppe_fake_houses
Loading Resource  weapon_meshes_d
Loading Resource  tableau_shields
Loading Resource  heraldic_armors
Loading Resource  spear
Loading Resource  weapons_e
Loading Resource  custom_banner
Loading Resource  ani_man_walk
Loading Resource  ani_twohanded
Loading Resource  ani_onehanded
Loading Resource  ani_death
Loading Resource  ani_stand_guardsman
Loading Resource  ani_human_mounted
Loading Resource  ani_lady_stand
Loading Resource  ani_poses
Loading Resource  ani_stand_shopkeeper
Loading Resource  ani_man_cheer
Loading Resource  ani_stand_onhorse
Loading Resource  ani_throw_stone
Loading Resource  ani_strikes
Loading Resource  ani_equip_arms
Loading Resource  ani_run_p
Loading Resource  ani_run_forward_left_right
Loading Resource  uni_strikes3
Loading Resource  ani_walk_sideways
Loading Resource  ani_run_sideways
Loading Resource  uni_jump
Loading Resource  uni_stances
Loading Resource  uni_equip
Loading Resource  uni_strike
Loading Resource  uni_throws
Loading Resource  uni_fistswing
Loading Resource  uni_lord_stand
Loading Resource  uni_defence
Loading Resource  uni_sideways
Loading Module Resource  solidandshade
Loading Module Resource  necrogauntlets
Loading Module Resource  ghoulhands
Loading Module Resource  hornedgloves
Loading Module Resource  mypictures
Loading Module Resource  ghoulhands2
Loading Module Resource  ghoulhands3
Loading Module Resource  necrogauntlets2
Loading Module Resource  necrogauntlets3
Loading Module Resource  ghoulhands4
Loading Module Resource  necrogauntlets4
Loading Module Resource  demonhands
Loading Module Resource  golemhands
Loading Module Resource  blackgauntlets
Loading Module Resource  shadowhands
Loading Module Resource  necrogauntlets5
Loading Module Resource  necrogauntlets6
Loading Module Resource  necrogauntlets7
Loading Module Resource  banners_b
Loading Module Resource  map_flags_d
Loading Module Resource  ghasthands
Loading Module Resource  myfaces
Loading Module Resource  medusa
Loading Module Resource  medusahands
Loading Module Resource  reddeathhands
Loading Module Resource  patchworkhands
Loading Module Resource  ghasthands2
Loading Module Resource  ghasthands3
Loading Module Resource  ghasthands4
Loading Module Resource  partyhands
Loading Module Resource  destroyerhands
Loading Module Resource  siegegolemhands
Loading Module Resource  vampiregauntlets
Loading Module Resource  wolfgloves
Loading Module Resource  whitewolfgloves
Loading Module Resource  catgloves
Loading Module Resource  woodengloves
Loading Module Resource  burnedwoodengloves
Loading Module Resource  putridwoodengloves
Loading Module Resource  preservedwoodengloves
Loading Module Resource  greatartificergloves
Loading Module Resource  diamondgloves
Loading Module Resource  falconrygloves
Loading Module Resource  typhongauntlets
Loading Module Resource  abbygloves
Loading Module Resource  mrjgloves
Loading Module Resource  sludgegolemhands
Loading Module Resource  golemhandsiron
Loading Module Resource  golemhandsgold
Loading Module Resource  bdgloves
Loading Module Resource  skeletonhands
Loading Module Resource  galateahands
Loading Module Resource  piratehands
Loading Module Resource  user_interface_b
Loading Module Resource  nymphhands
Loading Music...
WARNING: UNABLE TO MAP GAME PRESENTATION CODE:  prsnt_game_start
WARNING: UNABLE TO MAP GAME PRESENTATION CODE:  prsnt_game_escape
WARNING: UNABLE TO MAP GAME SCRIPT CODE:  game_check_party_sees_party
WARNING: UNABLE TO MAP GAME SCRIPT CODE:  game_get_party_speed_multiplier
Loading Module...
Loading item kinds...
Loading dialogs...
Loading mission templates...
Loading party templates...
Loading Textures...
Finished Loading Textures...
Finished All...
load_map_data complete.
Init_map complete.
init_meta_mission complete.
map mesh built.
get_ideal_sun_color.
get_ideal_fog_color.
parties added.
launch complete.
Switching to menu window...
load_map_data complete.
Init_map complete.
init_meta_mission complete.
map mesh built.
get_ideal_sun_color.
get_ideal_fog_color.
parties added.
launch complete.
Switching to menu window...
You gained 5 renown.
Saving Game... Creating new savegame file... Saving header... Saving game state... Closing new save game file... Backing up old file name... Removing old backup file. Renaming old savegame to backup file. Renaming new savegame file. Savegame succeded... begin_setup end_setup begin_setup end_setup

... That is the log file. It doesn't even log the crash. I saved, and went to the arena, and it crashed as soon as battle engaged.

I might have to look into some compiling utilities.
 
kalarhan said:
These are not really helpful against ctds.

N0ught said:
Solved, mostly. It wasnt a module system error, it was two 3d models i had added.
So what was it exactly about them that caused ctds?
On Q&A forums when you ask a question but find the answer yourself it's generally considered common courtesy to describe your solution so that others may learn from it too.  :wink:
 
Leonion said:
These are not really helpful against ctds.

on the contrary, if the CTD is caused by bad code like a wrong loop breaking memory, or a engine bugged operation, among other things, you can track down the parts that work until you find the one that explodes it  :razz:

logging messages are not only for logical errors, even tho that is their basic use.
 
kalarhan said:
on the contrary, if the CTD is caused by bad code like a wrong loop breaking memory, or a engine bugged operation, among other things, you can track down the parts that work until you find the one that explodes it  :razz:

logging messages are not only for logical errors, even tho that is their basic use.
Well, in Warband one can't usually narrow down the cause of ctds to a particular script. They usually happen randomly (and don't happen again when you restart the game) on the global map or in a battle or in similar situations when dozens of different scripts are running (+ graphical processing, which in my experience was responsible for most cases of ctds, except that weird one with "cursed range" of items 2504-2522).
Personally, I never encountered ctds during something as simple as a particular presentation or a particular conversation.

And if I did encounter a case like that, where I would know which script (or 1 out of 2 or 3) is responsible, simply reading them would probably be enough to notice an error so big that it caused ctds. So there is no use for debug messages.
And if a ctds is happening randomly on a global map, I would need like thousands of debugging messages in dozens of scripts/triggers to find the cause. So, again, it's useless. I would first of all have to narrow down the cause to a couple of scripts by disabling triggers one by one. And - when I only have a couple of suspects left - I have the situation #1.

And if someone has a particular script which is certain to cause ctds but can't find the cause by simply studying it, I'm not sure this person will be able to fix the code even if he's shown a particular operation that is to blame.
Because ctds are not caused by something small and hard to find like missing "try_end" or a wrong local variable used in an operation or most of other things that passed the compiler's check, it has to be something big and messed up (even inappropriate operations with a wrong number of variables or used in inappropriate ways are usually just reported by the engine and do not cause ctds). Like a mammoth in the room.
 
Leonion said:
And if I did encounter a case like that, where I would know which script (or 1 out of 2 or 3) is responsible, simply reading them would probably be enough to notice an error so big that it caused ctds. So there is no use for debug messages.

at least use debugging for logic errors, that should be simple enough, if you don't have engine issues. It is indeed a unusual case that requires deeper tech know-how to handle, so it is fine if you ignore stuff like engine bugs or more advanced coding problems that break the engine.

Cheers
 
Yes, for regular checks (like "why on earth does this trigger not work?" => "oh, it doesn't pass the slot value check" => "why does this slot have a value different from the one I expect it to have?"=> etc.) debugging is very helpful, but for ctds... if only...
 
Well, this is for my mod for M&B 1.011, but most of that all still applies. CTD's are a big problem indeed, if you don't know exactly what you did since the crash started happening.

The model i posted in this thread:
https://forums.taleworlds.com/index.php/topic,375579.0.html

This model. and one other seem to be the culprits, as when i add them the crash happens, and when I remove them they do not. Now what I am trying to figure out is: Why? This helmet, while hefty, poly-wise has even less polys than others that work fine in the mod.

When I was playing around in in the BRF it said something about the model having tangential directions, and that only Warband models support that. Thing is, Blastermaster is from my first mod, and after putting it in Solid & Shade, I can even go look at him wearing the models in Barter Town in my mod... but combat crashes unless I remove both of the models. The model is in the other thread for download, if anyone feels like giving it a look.

All help is much appreciated, again. :mrgreen:

I will still be plugging away at the troubleshooting...
 
Back
Top Bottom