CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.33k stars 4.14k forks source link

Infinite loop when the game is trying to destroy a vehicle 0.C-3098 #12274

Closed graysage1 closed 9 years ago

graysage1 commented 9 years ago

I'm getting this message very often now in a very short amount of time:

DEBUG: destroy_vehicle can't find it! name=Hippie Van, submap:0,1,13215936
  Press spacebar...

then

DEBUG: Tried to access invalid map position at grid (0,1,13215936)
  Press spacebar...

And so on, repeating the above two messages forever. Vehicle names and locations change. I have a save file, if anyone is interested, where it's relatively easy to duplicate by walking north-east from the save point.

If this message keeps repeating, I doubt I can continue playing like this. When this infinite loop happens, I have no choice but to close the window and reload.

Coolthulhu commented 9 years ago

Looks like the z coord is unset on some vehicles. Save could be helpful, though I may be able to fix it just by double-checking all places where veh submap coords are set.

graysage1 commented 9 years ago

Well, the save file is not 100% reliable in duping this, so I don't know just how helpful it would really be. It's a tiny file (7z-ipped it's 155kb). If you want it, please give me a good idea for where to put it. Ideally I'd be able to attach files here on github, but it doesn't seem that way.

Coolthulhu commented 9 years ago

The bug happens due to mapgen not setting variables, so save may not be necessary.

Any free file upload website is fine, I think.

graysage1 commented 9 years ago

I figured out a good option:

https://mega.co.nz/#F!zo1GwKCK!blFR-ijG5e3S0fZWY05w0Q

There are two save files there, the one for this bug is "...walk-ne" one, and the other one is a crash bug after loading it and hitting '@' (at least on my PC here).

They're compressed slightly differently too. For this bug I just compressed the landmass, and for the other bug I included my config directory too.

graysage1 commented 9 years ago

When walking NE it's better to walk more east than north I think. Otherwise I can, if desired, fool around with the save more to see if I can get it to trigger more reliably and then upload a better save file.

Coolthulhu commented 9 years ago

I think I got it fixed.

As for the other save: it crashes here too. Didn't find what causes it yet, though.

EDIT: It must be the "playing instrument" effect. There may be some typo there. It doesn't crash when you view '@' without this effect. Will check if I can fix it.

graysage1 commented 9 years ago

@Coolthulhu You rock. That is all.

graysage1 commented 9 years ago

@Coolthulhu The other save file (the one that crashes after pressing '@') is something I've accumulated after playing on (relatively) many versions of the game starting even somewhat before 0.C-3035. I kept moving my save file (and config) over to the newer builds. That bit of info may be impertinent, but I figured I'd mention it just in case it's relevant.

graysage1 commented 9 years ago

It must be the "playing instrument" effect. There may be some typo there. It doesn't crash when you view '@' without this effect. Will check if I can fix it.

@Coolthulhu Wooooooooot! However, I used my trusty harmonica so many times in that world, why now? Maybe I kept getting lucky and never hit '@' when playing harmonica? I doubt it, because I've been leaving my harmonica on at all times for huge parts of the game. It only gives me noise level 5, and that character is beefy enough to take whatever is coming anyway, so I didn't care about the noise level.

graysage1 commented 9 years ago

On the subject of harmonica, this digresses a bit, I didn't know if it were a bug or not, but I'll mention it here: if I play the mp3 first to get my music morale boost to +50, I can then keep playing harmonica to sustain it. It may or may not be intended. By itself harmonica only allows +17 I believe. If it's a bug, I can open a new issue if you like.

Coolthulhu commented 9 years ago

Yeah, that's a bug too. It also happens with the mp3 player alone - once in a while it gives you "dramatic classical music", which gives you a bigger bonus if you're intelligent. If you don't turn off the music, you can keep the bonus you got for classical music by listening to beats.

But yes, it is the harmonica. You can check by deactivating it, waiting few turns (at least 3), checking '@', reactivating harmonica, waiting a turn and then retrying '@'.

graysage1 commented 9 years ago

@Coolthulhu It appears you're right. I did what you said and what you said would happen, happened. Cool. :) Now I don't know which character to play, lol.

graysage1 commented 9 years ago

@Coolthulhu Really though, I might be going crazy here, maybe I am misremembering, but I have a memory as though I could have used '@' just fine in the past, even with harmonica playing. Oh well. Maybe it's possible to find the bug with just that save file anyway.

Coolthulhu commented 9 years ago

May be some invalid memory reading thing. I have totally no idea on why would the description for this one effect crash the game.

graysage1 commented 9 years ago

@Coolthulhu

I have totally no idea on why would the description for this one effect crash the game.

That's what I am saying: I think it might be more complex than just this one effect. It may be a combination of factors that's allowing the harmonica to trigger whatever it is triggering.

Coolthulhu commented 9 years ago

OK, I got it. It is the recent fix for the effect comedown messages. It doesn't play nicely with effects with more intensities than names.

graysage1 commented 9 years ago

@Coolthulhu Awesome. It completely went over my head, but I am sure you're right. :) I trust you.