malloc-related freeze on certain game starts
Describe the bug
Sometimes when I create a new character with a preset, the game freezes. It is rare and there is no data loss because there has not been anything that has been created.
Steps to reproduce
- Create a character using the provided preset.
- Get a metric ton of errors (they only occur if the freeze is going to happen).
- Random freeze. Hard to reproduce.
I usually run cataclysm-tiles in my terminal, so I can inspect the stdout if necessary. I noticed this in the stdout:
malloc(): mismatching next->prev_size (unsorted)
Template I used (txt extension because github is, as usual, picky about extensions even if the file is plaintext) debug.template
I noticed this freeze when working on my PR (#54411), but I doubt that my changes to the regional map settings are related because the error is about vehicles and submaps and I never touched any of that.
The save only contains two files (no actually generated map) because it is my test world for map generation and I basically "savescum" because the game only ever writes to the world when you save and not saving on purpose means I do not have to create or reset the world over and over again. I know this is technically unsupported but I even inspected that 50 mbyte strace I did to make sure it can not be the issue because the world directory is never opened for writing.
I highly suspect it depends on the starting area. Since my debug character is starting in a foodplace restaurant it will be in a city which has vehicles.
Expected behavior
No freeze.
Screenshots
No response
Versions and configuration
- OS: Linux
- OS Version: LSB Version: 1.4; Distributor ID: Arch; Description: Arch Linux; Release: rolling; Codename: n/a;
- Game Version: 0.F [64-bit]
- Graphics Version: Tiles
- Game Language: System language []
- Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], No Fungal Growth [no_fungal_growth], Bionic Professions [package_bionic_professions] ]
Additional context
No response
#32461 came up in a couple of my searches & may be related. There was another pair of issues related to long-distance teleporting & driving around in cities that I was unable to locate but previously linked w/ a comment in 1; there's some sort of mapgen issue that results in these crashes that's proven to be really elusive.
By the way, I think NeoDays is a more complete tileset w/ the same flavor as RetroDays. Any reason you prefer the latter??
Looks like a completely different issue to me. Different functions, different actions. Seems to crash at different point, too according to the trace.
I prefer RetroDays because I dislike change. It works for me and I tried NeoDays once and did not like some of the new stuff and just reverted back. My tastes are peculiar. I would play in the terminal if a tileset would not provide some fundamental advantages such as being able to see more than one thing per tile and being easier to parse with the eyes due to the insane density of information cdda presents. Simpler roguelikes such as nethack work well with ascii-only graphics because they do not have complex forests full of different foliage to render.