1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  4. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Game crash when unit gains xp

Discussion in 'World Editor Help Zone' started by Liam, Apr 4, 2018.

  1. Liam

    Liam

    Joined:
    Mar 6, 2018
    Messages:
    30
    Resources:
    0
    Resources:
    0
    Hey guys, im having an issue in my custom map where any time my unit gains XP the game simply closes.
    This happens when a hero is near a dying unit, when it selects an xp tome. If i set the level of the hero before playing the map, the map will close instantly before getting into the game.

    Note that killing enemy units with regular units is no issue, its only hero units that crash.

    I currently have no custom triggers or anything, but i have a ton of custom units, abilities and custom models loaded.

    This will happen even if i have only 1 hero unit in the game (preloaded) and kill just 1 creep.

    another issue is the game crashing when selecting particular buildings. altars for example crash the game.

    If anyone has any idea on what would cause these crashes id love to hear from you!
     
  2. Dat-C3

    Dat-C3

    Joined:
    Mar 15, 2012
    Messages:
    2,479
    Resources:
    10
    Models:
    1
    Maps:
    5
    Spells:
    3
    Tutorials:
    1
    Resources:
    10
    A good start would be uploading the map
     
  3. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,943
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Have you modified the game play constants at all?

    As Dat-C3 suggests, providing the map for manual debugging is a good idea.
     
  4. Liam

    Liam

    Joined:
    Mar 6, 2018
    Messages:
    30
    Resources:
    0
    Resources:
    0
    Its not really much of a map, its just a messy collection of ideas at the moment, just working out the factions and planning on level design down the track so its almost exclusively unit/spell data with imported custom models etc.

    i was hoping that it would be a common issue that the community would be well aware of but i couldnt find anything online about my specific issue so i thought id ask the community myself.

    What are the constants? are they the constants accessible in the campaign editor or elsewhere? because i havent meddled with the campaign constants (didnt know they existed but im pretty excited to mess with them once this bug is ironed out!), but i have lightly tinkered with the player properties/tech properties etc. but im not sure how that would affect leveling and i reset all of that back to default.
     
  5. Liam

    Liam

    Joined:
    Mar 6, 2018
    Messages:
    30
    Resources:
    0
    Resources:
    0
    Oh also i dont have a proper internet connection, just going through mobile tethering and have reached 75% usage in 2 days :S so im being stingy with my data sorry!
     
  6. Dat-C3

    Dat-C3

    Joined:
    Mar 15, 2012
    Messages:
    2,479
    Resources:
    10
    Models:
    1
    Maps:
    5
    Spells:
    3
    Tutorials:
    1
    Resources:
    10
    It's possible some of the models/textures are crashing, go though all your imports in the editor to check with object editor's unit tab with icon and model to check both.
     
  7. Liam

    Liam

    Joined:
    Mar 6, 2018
    Messages:
    30
    Resources:
    0
    Resources:
    0
    I highly doubt its the imports. Just deleted all of the imports, cleared the map, added 1 hero and 1 creep and saved it as a separate file, loaded it, got the hero to kill the creep and the game crashed instantly just the same as before.

    The map works fine when i kill enemies without heroes nearby, it just seems that something is bugged with the way xp works, and i dont remember messing with anything related to that. the game wont load when any hero on the map is anything other than just level 1 with 0 xp, for example if i set a hero to level 2 in the map editor the map crashes on load. It definitely seems tied to XP, i just tested a hero picking up an xp tome and it crashes as soon as he gets to it
     
  8. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,943
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Since the map has no imports, is it possible to post it? It should only be a couple of kilobytes. If it is a large playable field you can reduce that to save even more file space.
     
  9. Wark

    Wark

    Joined:
    Oct 12, 2016
    Messages:
    746
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Do you have units with an inventory picking up experience tomes?
    'Cause if they are not a hero-type object, that's an insta-crash.
     
  10. Liam

    Liam

    Joined:
    Mar 6, 2018
    Messages:
    30
    Resources:
    0
    Resources:
    0
    Ok, so update for anyone concerned, i did the legwork myself and started culling everything from my map to isolate the problem, once everything was gone it started to work fine, so i reloaded the base map and started culling abilities, units & imports separately, long story short is that i isolated the issue to a single unit which was a turret that was sold by another unit. i have no idea why that would interfere with heroes earning XP, and i overwrote the previous version of the map with the unit still in it so i cant isolate it further unfortunately. Strange bug though where a unit in the unit list that wasnt even on the map would cause the game to crash when a hero gained XP
     
  11. Wark

    Wark

    Joined:
    Oct 12, 2016
    Messages:
    746
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Process of elimination. That's the best self-debugging method I know. Good work.
     
  12. Liam

    Liam

    Joined:
    Mar 6, 2018
    Messages:
    30
    Resources:
    0
    Resources:
    0
    took forever though -_-
    Still not sure how a single unit that wasnt even on the map was causing the game to crash whenever a hero was 1 xp above level 1 :/