1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Unpredictable Crash on Turn End

Discussion in 'Bugs and Crashes' started by Thanox, May 18, 2018.

  1. Thanox

    Thanox Chieftain

    Joined:
    May 18, 2018
    Messages:
    12
    Gender:
    Male
    Hello all, I know this one is probably vague but I can't seem to find any obvious pointers as to why this crash is happening and the logs that I can understand haven't helped me. Also sure that this kind of crash has been brought up a lot, but there's so much to look through here on the forum and elsewhere that I don't really know where to start.

    My problem is a lot like this thread:
    https://forums.civfanatics.com/thre...s-svn-after-the-20th-of-february-2018.629241/

    When I reload a save, sometimes it crashes, sometimes it doesn't. If I get lucky, I can get maybe 3-5 turns in after dodging a crash before it happens again. I started this game about a month ago on the latest SVN at the time (I can't remember which one specifically, if it matters), and have since updated it a couple times, right now up to 10075 with no luck.

    It's a pretty good save otherwise so it would be unfortunate to have to give it up - it's a sort of a "world war starter" game so it's pretty chaotic even in just the Classical era, the map is very large and there's maybe ~20 civs currently in play. I'm sure that doesn't help the crashing, although I know my PC should be able to handle it unless it's an engine limitation.
     
  2. Thanox

    Thanox Chieftain

    Joined:
    May 18, 2018
    Messages:
    12
    Gender:
    Male
    Just made it about 10 turns with no issues, although it got cut short by a memory allocation error - not really an issue because I had chrome open in the background and that's a recipe for disaster. Odd that it waits until after I make this post to stop crashing even after it's been doing it for a week now, but overall I'm happy the save isn't lost. I'll keep changing things around to see if anything triggers it again.
     
  3. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    22,881
    Gender:
    Male
    Location:
    Las Vegas
  4. Noriad2

    Noriad2 Chieftain

    Joined:
    Oct 23, 2014
    Messages:
    1,102
    Gender:
    Male
    Make sure you have the options quick combat - attack and quick combat - defense on. Some combinations of units fighting are known to cause crashes to desktop.
     
  5. Thanox

    Thanox Chieftain

    Joined:
    May 18, 2018
    Messages:
    12
    Gender:
    Male
    Last I checked it was the latest SVN, I think that was yesterday. I had made multiple copies of c2c each on a different revision and there wasn't a difference in crash frequency between earliest and latest.
    I'll double check the quick combat options next time I get a chance. I think they're on but I'm not certain.

    I toggled "minimize AI turn time" on and got a crash within 2 turns, I usually play with it on but I tried turning it off a couple days ago (before going 10 turns smoothly). I don't know if it's a coincidence or not but I was certain that I was still crashing with it off.
     
  6. raxo2222

    raxo2222 Chieftain

    Joined:
    Jun 10, 2011
    Messages:
    2,552
    Location:
    Poland
    Make sure folder name is Caveman2Cosmos
     
  7. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    22,881
    Gender:
    Male
    Location:
    Las Vegas
    I'm trying to find something similar that SO is experiencing and it's a very tough problem to pin down. I'm going to need to update with a few minor adjustments I've made later tonight. AFTER that, update, and if it keeps happening (which it should since I'm not solving it in any way with this) I'll need a minidump. Also, an idea of how many rounds it usually takes to get the crash to take place might help.
     
  8. Thanox

    Thanox Chieftain

    Joined:
    May 18, 2018
    Messages:
    12
    Gender:
    Male
    Alright, just got another crash with the minimized AI turns set to off, so that's not it - I made it about 10-15 turns at the absolute longest before it crashed, that was a couple sessions ago after I made this thread. This time I made it 4, maybe 5 turns before it crashed which is dead on the average for how long it usually takes. I have the log option set to error in the System tab of BUG options, and I saw something that looked like an error flash in the game log immediately before it crashed, but I don't know where the logs get saved at the moment - I'm looking for it right now. Let me know if you need anything specific, I'm trying to be verbose so you can spot something that lines up with what you've experienced.
     
  9. Thanox

    Thanox Chieftain

    Joined:
    May 18, 2018
    Messages:
    12
    Gender:
    Male
    Made it 2 turns this time. Maybe I got something here, I don't know - this error pops up shortly after ending a turn, on the same turn end as the crash (pic attached). Whenever I see it, a crash is always close behind, but it's not the error that I mentioned in the last post - that one was only visible for a brief moment and I had never seen it before. Didn't see it this time either. As for the logs, I found them and I didn't know there were so many. I don't have a clue what I'm looking at or which ones matter, so I just zipped the folder in case they aren't useless.

    20180519122234_1.jpg
     

    Attached Files:

  10. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    22,881
    Gender:
    Male
    Location:
    Las Vegas
  11. raxo2222

    raxo2222 Chieftain

    Joined:
    Jun 10, 2011
    Messages:
    2,552
    Location:
    Poland
    Do you use Toffer's pedia?
     
  12. Thanox

    Thanox Chieftain

    Joined:
    May 18, 2018
    Messages:
    12
    Gender:
    Male
  13. Thanox

    Thanox Chieftain

    Joined:
    May 18, 2018
    Messages:
    12
    Gender:
    Male
    Woops, forgot to include the file. Had to add to the .txt so it would upload.
     

    Attached Files:

  14. raxo2222

    raxo2222 Chieftain

    Joined:
    Jun 10, 2011
    Messages:
    2,552
    Location:
    Poland
  15. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    22,881
    Gender:
    Male
    Location:
    Las Vegas
    Thanks! I'll look into it this weekend as time (and pets) allow for.
     
  16. Thanox

    Thanox Chieftain

    Joined:
    May 18, 2018
    Messages:
    12
    Gender:
    Male
    You're right, that didn't occur to me. I guess I'm so used to it that I forgot I even had it. I'll give it a shot.
     
  17. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    22,339
    Gender:
    Male
    Location:
    Canberra, Australia
    The logs say it is crashing in Python when trying to handle thew onTechAcquiired event. In particular some bit of Revolutions which is trying to add something. Since Toffers mod is being used I can't get any more detail as he merged a lot of mods together.
     
  18. Thanox

    Thanox Chieftain

    Joined:
    May 18, 2018
    Messages:
    12
    Gender:
    Male
    Unfortunately, updating Toffer's mod didn't seem to change anything.

    I suppose it's out of my reach to do something to dodge each crash other than the constant saving and reloading I've been doing thus far if that's the case. The most I can do myself is look out for patterns or faceroll my keyboard until it works.
    I can try getting logs without Toffer's mod if you think it would help.
     
  19. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    4,360
    Location:
    Norway
    I fixed an oversight in the onTechAquired python code in my modmod based on your save. I'll upload the new version any moment now.

    When revolutions happen a new civ is created, it gets a certain amount of techs awarded one after the other before it gets units or cities.
    When python tries to give a free gatherer to the new civ due to it inventing the Gathering tech the code does not find a valid plot to place the gatherer in (no starting plot, capital, or pre-existing units is defined or exist for that civ, all things the python code checks when deciding what plot to place the new gatherer in), so it ended up asking the dll to create the gatherer in coordinates [-1, -1].
    The dll never answers this request, so python thinks "WTF" and throws an error about an unspecified C++ error. The onTechAquired function will terminate prematurely but later python code will be completely unaffected by this incident.
    This in itself did not trigger the crash, but later on, when the new civ declares war on the civ it revolted from, the game will crash due to what the dll did when it was asked to create a gatherer outside the map.
     
    Last edited: May 20, 2018
  20. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    22,881
    Gender:
    Male
    Location:
    Las Vegas
    You are my absolute hero dude! I mean that! You just saved me many hours of work hunting down a bug I probably wouldn't have been able to find. THIS is why your modmod needs to be canon.
     
    Toffer90 likes this.

Share This Page

Ebates: Get Paid to Shop