[2.1.14] Crash under debugger, reproducible

This subforum contains all the issues which we already resolved.
User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 226
Joined: Tue Feb 06, 2024 5:18 am
Contact:

[2.1.14] Crash under debugger, reproducible

Post by hgschmie »

Mods loaded: base, EditorExtensions, EvenPickierDollies, fiber-optics

Chasing a bug in a mod, here is what I did:

- put a breakpoint in an event handler that runs out of on_tick
- single stepped the handler. It jumped to the right place in control.lua, which in turn calls another function in a different source file (scripts/other.lua)
- stepped into this, source file did not change. Debugger showed the right line number but still in control.lua, not in scripts/other.lua
- weird. Put a breakpoint into scripts/other.lua at the right place, pressed continue.

Game crashed all the way down to MacOS error reporting.

100% reproducible. Retried with trace = true (dap-trace.log attached)
Attachments
dap-trace.log
(408.21 KiB) Downloaded 22 times
factorio-current.log
(9.07 KiB) Downloaded 24 times
crash2.txt
(167.77 KiB) Downloaded 23 times
crash1.txt
(167.99 KiB) Downloaded 25 times
User avatar
EvilPLa
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Sat Nov 14, 2020 7:26 am
Contact:

Re: [2.1.14] Game crash while under debugger (reproducible)

Post by EvilPLa »

Yesterday I a had similar thing happening while debugging within on_tick, but didn't pay attention how and why.

My Linux told me: vscodium window does not respond. And I did press "close" after three times "continue waiting".
It happend 3 to 4 times before I had found my bug.

After reading this post I tried to reproduce the problem, but had no luck with that.

Factorio 2.1.14, fmtk 2.1.9, vscodium 1.126
AI is the oligarch's God, anti-humanism their religion.
My mods
justarandomgeek
Filter Inserter
Filter Inserter
Posts: 326
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [2.1.14] Crash under debugger, reproducible

Post by justarandomgeek »

hmm, looks like i fell into a loop trying to describe some value (possibly an error object?). will have to dig a little to say more than that though...
justarandomgeek
Filter Inserter
Filter Inserter
Posts: 326
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [2.1.14] Crash under debugger, reproducible

Post by justarandomgeek »

oh wow this is extremely stupid:
  1. While trying to describe a value
  2. I try to call its __tostring for it to describe itself
  3. and when that fails, i then try to describe the value again for the error message
  4. which repeats the attemped __tostring 🤦
should be a fairly straightforward fix though! (and you can avoid it in the meantime by fixing the __tostring that throws)
justarandomgeek
Filter Inserter
Filter Inserter
Posts: 326
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [2.1.14] Crash under debugger, reproducible

Post by justarandomgeek »

fixed for 2.1.17
User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 226
Joined: Tue Feb 06, 2024 5:18 am
Contact:

Re: [2.1.14] Crash under debugger, reproducible

Post by hgschmie »

Did this fix make it into 2.1.17? There was no mentioning of it in the release notes.
justarandomgeek
Filter Inserter
Filter Inserter
Posts: 326
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [2.1.14] Crash under debugger, reproducible

Post by justarandomgeek »

yes
Post Reply

Return to “Resolved Problems and Bugs”