CleverRaven / Cataclysm-DDA

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

Drawing damaged or reinforced knifes from survivor utility belt causes crash #13453

Closed chaosvolt closed 9 years ago

chaosvolt commented 9 years ago

Did some science of this after Thwap gave some more helpful info in the thread they posted about this ( http://smf.cataclysmdda.com/index.php?topic=11124.0 ).

Drawing a knife from the survivor utility belt will cause a crash if the knife is damage OR reinforced. Basically any condition besides the norm. Sheath, boots, and normal survivor belt all act normal.

Screenshots for the screenshot god, PNGs for the PNG throne:

the crashening

the revenge of the crashing

Griffinhart commented 9 years ago

Unable to reproduce on Cygwin x86 ncurses build version 0.C-5853-g1cad147.

Methodology:

  1. Reset testing world.
  2. New character.
  3. Debug menu spawned survivor utility belt, steak knife, soldering iron, scrap metal.
  4. Wore || survivor utility belt.
  5. activated || soldering iron and made the || steak knife extra sturdy.
  6. Sheathed the ++ steak knife in the || survivor utility belt.
  7. Drew the ++ steak knife from the || survivor utlity belt.
  8. Worked just fine.
chaosvolt commented 9 years ago

Not sure if that means it's fixed or if it's a specific build issue.

Griffinhart commented 9 years ago

I'm inclined to think the latter. On Sep 1, 2015 08:05, "Chaosvolt" notifications@github.com wrote:

Not sure if that means it's fixed or if it's a specific build issue.

— Reply to this email directly or view it on GitHub https://github.com/CleverRaven/Cataclysm-DDA/issues/13453#issuecomment-136753999 .

chaosvolt commented 9 years ago

I would assume so. I'm assuming Cygwin is a compiler? As both the OP in the thread and I used pre-compiled experimentals from the main site.

Griffinhart commented 9 years ago

Cygwin is a Unix-like environment for Windows (strictly speaking, it's a DLL and an API layer) that includes many compilers. You can kind of think of it like a Unix emulator, but that's entirely incorrect (and Red Hat themselves explicitly note that Cygwin is not an emulator).

I compiled with Cygwin gcc (I want to say 4.9.3, but it might be 4.9.2; I'm not at the machine to check).

e:

$ g++ --version
g++ (GCC) 4.9.3
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

On Sep 1, 2015 12:19 PM, "Chaosvolt" notifications@github.com wrote:

I would assume so. I'm assuming Cygwin is a compiler? As both the OP in the thread and I used pre-compiled experimentals from the main site.

— Reply to this email directly or view it on GitHub https://github.com/CleverRaven/Cataclysm-DDA/issues/13453#issuecomment-136832483 .

Coolthulhu commented 9 years ago

Couldn't reproduce.

The only explanation I have for this goes like this:

chaosvolt commented 9 years ago

Hmm. Very odd. Um...dafuq?

To quote Thwap in the thread:

Confirmed: Turning off item health bars in the interface settings prevents the crash.

chaosvolt commented 9 years ago

As for why different versions do this...no idea. I might go download the latest Windows console experimental to see if it works.

EDIT: attempting to test whether the interface option affects this led to hilarity ensuring. Load errors because the last version I had close at hand was one I'd been using to test my changes to Tank mod, loaded an older save I had for testing this issue... XD

EDIT 2: In any case, doubly confirmed. No idea yet of the cause or what makes it build-specific, but disabling item health display in Windows, tiles mode, build 3626 (a3a5eb2) prevented a crash.

chaosvolt commented 9 years ago

Well. Tested the ASCII version, latest experimental build 3646 (1cad147).

more borks

chaosvolt commented 9 years ago

To quote Thwap again:

So I messed with the jsons a bit more and tested it a couple different ways, just to rule anything else out, and here's pretty much the final word on this bug in concise form:

IF an item is wearable AND the item has a reinforced/damaged knife sheathed in it AND the item has more than one use_action, thus requiring the menu AND item health bars are enabled AND you're using the pre-compiled experimental from the website

Then the game crashes as soon as the item is activated, without displaying the menu. If any one of these conditions aren't met then there's no crash, and no other conditions seem to apply. Maybe someone can paste this to the Git entry for the bug.

kevingranade commented 9 years ago

Pre-compiled likely just means 'built with RELEASE=1'

chaosvolt commented 9 years ago

Hmm. Anyone got more info on what builds do and do not exhibit this issue?