Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Too many coins causing spontaneous depot combustion<Spoilers>  (Read 2231 times)

ichaleynbin

  • Escaped Lunatic
    • View Profile
Too many coins causing spontaneous depot combustion<Spoilers>
« on: November 14, 2020, 05:26:29 pm »

I figured out a way to reasonably convert stacks of 500 coins, into stacks of 1 coin, without too many keystrokes. I recorded a "trade 10 of 6 items" Macro which I executed 99 times to split my stacks of coins into 10, and traded them to a human merchant, 50 times, in order to break all of my stacks of 500 (or less for some) candy coins into stacks of 10, which the merchant had possession of.

I then used Autohotkey to record an in-game macro of 229 "trade one" keystrokes, which I executed 99 times on a q-search for coins. It took 10-11 minutes for this c-u 99 c-p to execute once, and I had to run it 9 times before the merchant had only stacks of one coin remaining and I could just shift-enter after q-searching coins. 229*99 is slightly more than the number of stacks in order to ensure all stacks are touched.

Spoiler (click to show/hide)

This resulted in... well.... just a few single candy coins ready to be melted. It cost me 50 masterwork steel battleaxes in total to buy back all my coins, 5 axes 10 times.

Spoiler (click to show/hide)

Unfortunately, it seems that so many coins in one spot, has caused my depot to spontaneously combust immediately upon unpausing.

Spoiler (click to show/hide)

I don't believe that there were any oddly temped items which I bought from the merchant, and I did savescum to see if it happened the second time, which it did. I didn't take a third stab at it because on my machine, the entire process takes about 3-4 hours, it's well over 90 minutes total of just macro execution to buy back 1 of each stack of coins, 10-11 minutes execution 9 times. You also have to macro trade 10 from each stack to the merchant first, 50 times. It's possible one of the items I bought was the culprit, but given that I only bought bars, weapons, codexes and scroll copies, food, and gems, it seems unlikely. The fires also seem to be originating from several locations on the depot itself.

I've posted a bug report, and also uploaded a savefrom the month where the human caravan I used comes. I have had around 20k individual coins ready to be melted on the trade depot at times, though I've melted many of them already, but over 226k, it seems that dwarf fortress is reading the state of my RAM and reporting it in game. Execution of the large macro, the 229*99 one, results in a major FPS loss during macro execution once around 10,000 coins have been marked for trade. Sometimes more, sometimes it doesn't freeze up completely, but once ~10k has been reached, FPS at the trade window begins a quick drop, until it reaches zero sometime before 15k. Once 0 fps is reached, seconds per frame starts to become a more accurate way to measure, and the final tick may take 20 seconds or more. The macro continues executing and the game continues recording keystrokes though, and several thousand coins can be marked for trade during that last 20s frame.

Has anyone else ever seen >220k coins cause spontaneous depot combustion, and is that the bug I'm seeing, or is there something else going on? The easier test to see if it's the trade goods the merchant has is probably just to buy the entire merchant's stock and if the depot doesn't catch fire, it was the coins.

EDIT: Spontaneous depot construction would be funnier than combustion but not the bug I'm looking at right now
« Last Edit: November 14, 2020, 05:31:34 pm by ichaleynbin »
Logged

Broms

  • Bay Watcher
    • View Profile
Re: Too many coins causing spontaneous depot combustion<Spoilers>
« Reply #1 on: November 16, 2020, 10:32:23 am »

In Kerbal Space Program this is sometimes referred to as "Unplanned rapid disassembly", lol.
Logged

Strangething

  • Bay Watcher
  • Slizardman
    • View Profile
    • My Blog
Re: Too many coins causing spontaneous depot combustion<Spoilers>
« Reply #2 on: November 16, 2020, 01:34:47 pm »

When I read the subject I assumed the overhead of all those coins made your CPU overheat.

This is far more entertaining. This might be the funniest DF bug since tavern cats dying of instant alcohol poisoning.
Logged

Immortal-D

  • Bay Watcher
  • [Not_A_Tree]
    • View Profile
Re: Too many coins causing spontaneous depot combustion<Spoilers>
« Reply #3 on: November 16, 2020, 05:37:16 pm »

This wins my vote for 'best bug of the year'.  I can't even begin to speculate as to the cause though.

Thisfox

  • Bay Watcher
  • Vixen.
    • View Profile
Re: Too many coins causing spontaneous depot combustion<Spoilers>
« Reply #4 on: November 16, 2020, 09:19:34 pm »

I can't even begin to speculate as to the cause though.

...Is it possible that the sheer number of items in the Depot is the problem? How many items is it possible to have in a Depot at once (without bins, bags, or barrels keeping things sensible)?

Alternatively, these are all moving objects, and are being made to move at a rather fast pace. Perhaps it's friction heat.
Logged
Mules gotta spleen. Dwarfs gotta eat.
Thisfox likes aquifers, olivine, Forgotten Beasts for their imagination, & dorfs for their stupidity. She prefers to consume gin & tonic. She absolutely detests Facebook.
"Urist McMason died out of pure spite to make you wonder why he was suddenly dead"
Oh god... Plump Helmet Man Mimes!

ichaleynbin

  • Escaped Lunatic
    • View Profile
Re: Too many coins causing spontaneous depot combustion<Spoilers>
« Reply #5 on: November 17, 2020, 02:16:31 am »

...Is it possible that the sheer number of items in the Depot is the problem? How many items is it possible to have in a Depot at once (without bins, bags, or barrels keeping things sensible)?

There's a limit? I mean other than the practical matters of memory addressing and such, I had never seen one in practice. And I am really bad about taking items off my depot, those leather bins will stay there until they're empty in all likelihood. Even shops get cluttered but dwarves still work, rock blocks are gonna stay put for a VERY long time. This is not my most junk-filled fortress, so as far as items in game goes, it shouldn't be a problem and hasn't been since the initial fire.

It seems the practical limit for one trade is around 10-15k items, on my machine, but that's purely performance based. I got more but only because it was a macro and I was watching a show on my other screen so I could keep the DF window open. As far as items on the depot, 200k is a lot even for me I'd think. It did make me wonder if it is just literally "Too many items in one area" so I of course marked all of them for dump and used autodump to put them on one square, during the fire no less. Dwarves haven't reported any burns while melting the pile of coins, which is a far cry from the first time when one of their upper bodies was completely melted.

My alternative idea is that it has to do with everything being traded in one session. I just can't make much sense of that. Then again bugs never really make sense, but this one's out there even so. Something about having to spawn that many items, it getting past a certain point and likely because of ram issues temperature ends up too high, because.... reasons? Come to think of it, how many would you hot coins need to get the fires started, and then they're going? If it's only 3 coins of 200k, it could just be a randomly flipped bit lol
Logged

MC

  • Bay Watcher
    • View Profile
Re: Too many coins causing spontaneous depot combustion<Spoilers>
« Reply #6 on: November 17, 2020, 10:37:37 am »

(CLT) is nowhere near the number of items you had lol. you would have reached max clutter level in a workshop with under 300 of your coin stacks. I can't say for sure, but the game seems to have a lot of trouble handling the "weight" of many small stacks of small objects. Pick up say, 1000 gems in adventure mode (do not actually do this it takes hours and hurts your hands) and things start getting really confused. your container will suddenly start weighing more than it should be able to hold or than it should actually weight at all, but you will still be able to put things in. Im not at all surprised that suddenly spawning so many items caused something weird to happen for you. That number is so high I'm surprised the game was even running.

As for why it decided to burst into flames, i don't know for sure but I can make a guess. Merchants drop items they cannot hold after receiving them in trade, which I'm pretty sure applies to your broker too. I guess that dropping works the same as dumping something in a pit and has some form of physics? Coins are pretty infamous for behaving badly with physics so I guess the staggering volume of insignificant interactions made something in the code do a stupid? Either way you outdid the edge cases I've seen for "many small objects acting weird" by an order of magnitude so it could be anything.

Great story btw.
Logged
This is a terrible mod. All crashmanship is of the highest quality. This object is adorned with hanging rings of notification spam. This object menaces with spikes of llama wool. On the item is an image of a large oval dwarf flesh cabochan in elf bone. The artwork relates to the attack of an unknown creature on an unknown creature in a time before time. It was inevitable.

Immortal-D

  • Bay Watcher
  • [Not_A_Tree]
    • View Profile
Re: Too many coins causing spontaneous depot combustion<Spoilers>
« Reply #7 on: November 17, 2020, 05:51:51 pm »

I recall a case where too many cats in 1 place also initiated combustion by friction, vis a vi constant 'head bumping'.

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: Too many coins causing spontaneous depot combustion<Spoilers>
« Reply #8 on: November 17, 2020, 10:46:35 pm »

I recall a case where too many cats in 1 place also initiated combustion by friction, vis a vi constant 'head bumping'.

Yeah, coins also have “heads” so maybe it’s the same thing.



Wait...


You can melt coins.

Coins have “heads”.

Cats also have “heads”.

Therefore it must be possible to melt cats!
Logged
Really hoping somebody puts this in their signature.

Thisfox

  • Bay Watcher
  • Vixen.
    • View Profile
Re: Too many coins causing spontaneous depot combustion<Spoilers>
« Reply #9 on: November 18, 2020, 01:53:55 am »

Therefore it must be possible to melt cats!

....So, A_Curious_Cat, if you could just step into this room down that long corridor, and pull this lever, we can test this theory...
Logged
Mules gotta spleen. Dwarfs gotta eat.
Thisfox likes aquifers, olivine, Forgotten Beasts for their imagination, & dorfs for their stupidity. She prefers to consume gin & tonic. She absolutely detests Facebook.
"Urist McMason died out of pure spite to make you wonder why he was suddenly dead"
Oh god... Plump Helmet Man Mimes!

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: Too many coins causing spontaneous depot combustion<Spoilers>
« Reply #10 on: November 18, 2020, 03:38:52 am »

An example of a cat melting can be found here.
Logged
Really hoping somebody puts this in their signature.

MC

  • Bay Watcher
    • View Profile
Re: Too many coins causing spontaneous depot combustion<Spoilers>
« Reply #11 on: November 18, 2020, 08:50:13 am »

My last evil rain embark allows me to confirm that cans can, in fact, melt.
Logged
This is a terrible mod. All crashmanship is of the highest quality. This object is adorned with hanging rings of notification spam. This object menaces with spikes of llama wool. On the item is an image of a large oval dwarf flesh cabochan in elf bone. The artwork relates to the attack of an unknown creature on an unknown creature in a time before time. It was inevitable.

muldrake

  • Bay Watcher
    • View Profile
Re: Too many coins causing spontaneous depot combustion<Spoilers>
« Reply #12 on: November 18, 2020, 09:44:18 am »

I can't even begin to speculate as to the cause though.

...Is it possible that the sheer number of items in the Depot is the problem? How many items is it possible to have in a Depot at once (without bins, bags, or barrels keeping things sensible)?

Alternatively, these are all moving objects, and are being made to move at a rather fast pace. Perhaps it's friction heat.

I'm not sure of a max, but I know if I've done things like repeatedly buy out entire caravans full of goods and not at some point moved them to stockpiles, eventually things start acting really weird.  The main thing I noticed that doesn't involve the depot (or the wagons sometimes) spontaneously exploding is it taking really, really long times for new caravans to unload.
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: Too many coins causing spontaneous depot combustion<Spoilers>
« Reply #13 on: November 18, 2020, 12:40:57 pm »

My last evil rain embark allows me to confirm that cans can, in fact, melt.

Cans?  Is this a mod?  Or did I miss something in the menus for the metalsmith’s forge?
Logged
Really hoping somebody puts this in their signature.

SammyLiimex

  • Bay Watcher
    • View Profile
Re: Too many coins causing spontaneous depot combustion<Spoilers>
« Reply #14 on: November 19, 2020, 11:24:10 am »

My last evil rain embark allows me to confirm that cans can, in fact, melt.

Cans?  Is this a mod?  Or did I miss something in the menus for the metalsmith’s forge?

He probably means cats
Logged
Pages: [1] 2