[kovarex] [2.0] Crash inputting variable "RuntimeError.cpp:24: Unknown variable 'p0_i4' at position 0 near 'p0_i4*10'.

Bugs that are actually features.
NegevsTheBear
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Nov 27, 2024 6:40 pm
Contact:

[kovarex] [2.0] Crash inputting variable "RuntimeError.cpp:24: Unknown variable 'p0_i4' at position 0 near 'p0_i4*10'.

Post by NegevsTheBear »

My game experienced very heavy lag spikes upon doing a few things.

Most notable:
Typing in numerical variables for the parameterized blueprints
Setting the power consumption and production of the Cheat Code 'Energy Interface' item in a editor playground.

Log included, I see internal crashes related to the items I performed starting around line 1500:

Code: Select all

3837.638 Error RuntimeError.cpp:24: Unknown variable 'p0_i3' at position 0 near 'p0_i3*10'.
Factorio crashed. Generating symbolized stacktrace, please wait ...
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\libraries\StackWalker\StackWalker.cpp(924): StackWalker::ShowCallstack
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\Util\Logger.cpp(337): Logger::writeStacktrace
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\Util\Logger.cpp(379): Logger::logStacktrace
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\libraries\CommonUtil\Exceptions.cpp(9): InputException::InputException
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\Util\MathExpressions\Evaluator.cpp(89): MathExpressions::Evaluator::run
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\Util\MathExpressions\Evaluator.cpp(212): MathExpressions::Evaluator::run
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\Util\MathExpressions\Evaluator.cpp(204): MathExpressions::Evaluator::run
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\Blueprint\BlueprintParametersNumberItem.cpp(95): BlueprintParametersNumberItem::evaluate
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\Blueprint\BlueprintParameters.cpp(180): BlueprintParameters::evaluateValues
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\Graphics\DrawBlueprintToBeBuiltLogic.cpp(145): DrawBlueprintToBeBuiltLogic::drawEntities
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\Graphics\BuildingRenderer.cpp(253): BuildingRenderer::drawBlueprintToBeBuilt
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\Graphics\BuildingRenderer.cpp(199): BuildingRenderer::prepareBuildingInGame
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\Graphics\BuildingRenderer.cpp(102): BuildingRenderer::prepare
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\Graphics\GameRenderer.cpp(102): GameRenderer::prepare
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\GameView.cpp(1499): GameView::prepareRender
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\Game.cpp(330): Game::prepareRender
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\MainLoop.cpp(1140): MainLoop::prepare
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\MainLoop.cpp(708): MainLoop::mainLoopStep
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\MainLoop.cpp(412): MainLoop::run
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\Main.cpp(1357): fmain
C:\Users\build\AppData\Local\Temp\factorio-build-GeLUZq\src\Main.cpp(1379): wmain
D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(288): __scrt_common_main_seh
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF911BC257D)
00007FF911BC257D (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF91244AF08)
00007FF91244AF08 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
Attachments
factorio-previous.log
Log, items of interest near end.
(161.58 KiB) Downloaded 66 times
Loewchen
Global Moderator
Global Moderator
Posts: 10448
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [2.0.21] Crash inputting variable "RuntimeError.cpp:24: Unknown variable 'p0_i4' at position 0 near 'p0_i4*10'."

Post by Loewchen »

Post a save and steps you can produce the crash with please, see 3638.
NegevsTheBear
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Nov 27, 2024 6:40 pm
Contact:

Re: [2.0.21] Crash inputting variable "RuntimeError.cpp:24: Unknown variable 'p0_i4' at position 0 near 'p0_i4*10'."

Post by NegevsTheBear »

Still occurring on current Experimental [2.0.27].

Standard troubleshooting steps like validating game files via steam have had no effect.

Save with example blueprint in inventory included.

Bug occurs on a fresh save, pulling blueprint from global blueprint library, and attempting to place.
Attachments
Bug_Example.zip
(1.89 MiB) Downloaded 47 times
Factorio_Bug_Negevs_12_19_2024.mp4
(23.26 MiB) Downloaded 54 times
dR.Garuby
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Feb 05, 2025 5:06 pm
Contact:

Re: [kovarex] [2.0] Crash inputting variable "RuntimeError.cpp:24: Unknown variable 'p0_i4' at position 0 near 'p0_i4*10

Post by dR.Garuby »

I'm having a similar issue and I hope I can give some more details.

I'm using version [2.0.32] (build 81349 expansion win64) with Space Age installed (but is has always occurred even when I didn't have Space Age installed yet and in previous versions, since 2.0).

There are a couple of different but related scenarios:

Scenario 1:
Normally, in numerical input fields (not the text ones for naming things but like in Logistic Requests the input fields for min and max amounts, or in the circuit conditions in the "Set a constant" field) if I type any non-numerical character (most commonly I erroneously type "E" instead of "Enter" expecting it to confirm the input), the game freezes for some seconds (around 5 second if only one character is typed) becoming unresponding, sometimes (especially if I try to force it by continuously typing letters or clicking randomly while the game is already non responding) the Windows popup shows up saying "Factorio is not responding" with the Close or Wait prompts. If I close it, this is the error I get (these are the last lines of the log, previous lines seems normal)

Code: Select all

 653.446 Error RuntimeError.cpp:24: Unknown variable 'e' at position 0 near 'e'.
Factorio crashed. Generating symbolized stacktrace, please wait ...
If I choose Wait, after some time the game continues: normally the letter has been written down in the field (the cursor is still blinking in the field), but sometimes it just closes the field and it is automatically set to 0, ignoring previous values.
If the letter has been written down correctly, editing the string by adding new characters (even numbers) results in the same lag/crash as before, unless all non-numerical characters are deleted, then it returns to function normally.
In a specific case, in the "Blueprint parametrisation", any input field works fine (accepting letters with no problems) with the exception of the "Formula" one.
This field behave a little different from others: like before, typing non-numerical characters causes a huge lag-spike but if I manage to type a whole defined parameter name (like "p0_s" while having a parameter 0 defined before, otherwise it behaves like normal text) then the typing becomes normal and I can add numbers and in some cases even symbols for operations (like + and *), but only in-between defined variables or numbers (or a combination of the two) e.g. : if I manage to type "p0_s" then I can add "2" at the beginning and, only then add the symbol " * " resulting in "2*p0_s" with no lag in-between; but if I type the " * " first, then the problem occurs as before.

Note: I've recently (just yesterday) discovered the (secret) option "use-formulas-in-number-input-fields" and I unchecked it to prevent this issue since I often misclick and type letters in these fields and it is very annoying. Now I can no longer type any non-numerical characters, except for the "Blueprint parametrisation" panel where the issue still exists.

Scenario 2: highly correlated
After saving (or importing) a parametrized blueprint, I select it and than the ghosts appears and I can drag the blueprint to place it somewhere. In the moment I click to place the blueprint down (when the window with the input fields should appear), I experience a huge lag-spike (much greater than Scenario 1), and the game is now basically doing less than a frame every 10 seconds.
I can now wait for the input window to appear (while still doing <0.1 fps so it needs some time and patience) and, until I don't close or confirm it, the lag remains.
I can try to insert the values in the input fields (the mouse cursor works but doesn't register in the game, so I can click on the fields and hope that it will register and try to type the desired variables while still doing <0.1 fps) and, if I manage to do it and confirm the blueprint (by pressing the green check icon or Enter and waiting some time) then the game starts to respond normally and the blueprint is placed down correctly with all the variables correctly assigned and the blueprint working.
Taking a step back, when the input window is still on, the game sometimes becomes totally unresponding (it is more frequent than Scenario 1) especially if I try to write in the fields or click things, and the same Windows popup as before shows up prompting to close Factorio or wait for it. As before I can wait and try to close the fields window, or just close the app. If I close it, the log reports the same RuntimeError.
These are the Errors I get in the log if I try to place a blueprint with a lot of variables. It repeats for every variable.

Code: Select all

2891.165 Error RuntimeError.cpp:24: Unknown variable 'p0_i3' at position 0 near 'p0_i3'.
Factorio crashed. Generating symbolized stacktrace, please wait ...
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\libraries\StackWalker\StackWalker.cpp(924): StackWalker::ShowCallstack
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\Util\Logger.cpp(337): Logger::writeStacktrace
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\Util\Logger.cpp(379): Logger::logStacktrace
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\libraries\CommonUtil\Exceptions.cpp(9): InputException::InputException
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\Util\MathExpressions\Evaluator.cpp(89): MathExpressions::Evaluator::run
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\Util\MathExpressions\Evaluator.cpp(212): MathExpressions::Evaluator::run
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\Util\MathExpressions\Evaluator.cpp(204): MathExpressions::Evaluator::run
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\Blueprint\BlueprintParametersNumberItem.cpp(95): BlueprintParametersNumberItem::evaluate
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\Blueprint\BlueprintParameters.cpp(180): BlueprintParameters::evaluateValues
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\Graphics\DrawBlueprintToBeBuiltLogic.cpp(145): DrawBlueprintToBeBuiltLogic::drawEntities
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\Graphics\BuildingRenderer.cpp(253): BuildingRenderer::drawBlueprintToBeBuilt
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\Graphics\BuildingRenderer.cpp(199): BuildingRenderer::prepareBuildingInGame
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\Graphics\BuildingRenderer.cpp(102): BuildingRenderer::prepare
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\Graphics\GameRenderer.cpp(102): GameRenderer::prepare
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\GameView.cpp(1518): GameView::prepareRender
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\Game.cpp(331): Game::prepareRender
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\MainLoop.cpp(1143): MainLoop::prepare
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\MainLoop.cpp(708): MainLoop::mainLoopStep
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\MainLoop.cpp(412): MainLoop::run
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\Main.cpp(1357): fmain
C:\Users\build\AppData\Local\Temp\factorio-build-ZDK82g\src\Main.cpp(1379): wmain
D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(288): __scrt_common_main_seh
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFE1E6E7374)
00007FFE1E6E7374 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFE206FCC91)
00007FFE206FCC91 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
2910.926 Error RuntimeError.cpp:24: Unknown variable 'p0_i4' at position 0 near 'p0_i4'.
Factorio crashed. Generating symbolized stacktrace, please wait ...
I really hope this is useful to solve this bug because I really need those parametrised blueprints and, as it is now, they are practically unusable.
Attachments
factorio-current.log
The entire log file if needed, but it is just a bunch of identical and repeating errors.
(388.29 KiB) Downloaded 68 times
NegevsTheBear
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Nov 27, 2024 6:40 pm
Contact:

Re: [kovarex] [2.0] Crash inputting variable "RuntimeError.cpp:24: Unknown variable 'p0_i4' at position 0 near 'p0_i4*10

Post by NegevsTheBear »

Definitely looks like the same issue I am having. Mine was still occurring on the newest version as of posting. Definitely wonder whats causing it myself - I have a feeling if it was across the board, this would have been a much bigger issue, so my gut tells me there is some conflict / clash / cause based on some other part of my system.

As a wild guess... Dr.Garuby, do you have any non-english character sets installed? I have the Hebrew Language Alphabet added to windows myself, and tempted to see what happens if I temporarily uninstall that.
Muche
Smart Inserter
Smart Inserter
Posts: 1006
Joined: Fri Jun 02, 2017 6:20 pm
Contact:

Re: [kovarex] [2.0] Crash inputting variable "RuntimeError.cpp:24: Unknown variable 'p0_i4' at position 0 near 'p0_i4*10

Post by Muche »

dR.Garuby wrote: Wed Feb 05, 2025 6:29 pm Normally, in numerical input fields [...] if I type any non-numerical character (most commonly I erroneously type "E" instead of "Enter" expecting it to confirm the input), the game freezes for some seconds (around 5 second if only one character is typed) becoming unresponding

Code: Select all

 653.446 Error RuntimeError.cpp:24: Unknown variable 'e' at position 0 near 'e'.
Factorio crashed. Generating symbolized stacktrace, please wait ...
This happens to me as well when I have the (secret) debug setting log-stack-trace-on-non-critical-exception set to true.
As per viewtopic.php?p=594271 (and other posts), it's for debugging only.
Try turning it off and retest.
NegevsTheBear
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Nov 27, 2024 6:40 pm
Contact:

Re: [kovarex] [2.0] Crash inputting variable "RuntimeError.cpp:24: Unknown variable 'p0_i4' at position 0 near 'p0_i4*10

Post by NegevsTheBear »

Muche wrote: Wed Feb 05, 2025 8:54 pm
dR.Garuby wrote: Wed Feb 05, 2025 6:29 pm Normally, in numerical input fields [...] if I type any non-numerical character (most commonly I erroneously type "E" instead of "Enter" expecting it to confirm the input), the game freezes for some seconds (around 5 second if only one character is typed) becoming unresponding

Code: Select all

 653.446 Error RuntimeError.cpp:24: Unknown variable 'e' at position 0 near 'e'.
Factorio crashed. Generating symbolized stacktrace, please wait ...
This happens to me as well when I have the (secret) debug setting log-stack-trace-on-non-critical-exception set to true.
As per viewtopic.php?p=594271 (and other posts), it's for debugging only.
Try turning it off and retest.
That does stop the error for me.
dR.Garuby
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Feb 05, 2025 5:06 pm
Contact:

Re: [kovarex] [2.0] Crash inputting variable "RuntimeError.cpp:24: Unknown variable 'p0_i4' at position 0 near 'p0_i4*10

Post by dR.Garuby »

Muche wrote: Wed Feb 05, 2025 8:54 pm
dR.Garuby wrote: Wed Feb 05, 2025 6:29 pm Normally, in numerical input fields [...] if I type any non-numerical character (most commonly I erroneously type "E" instead of "Enter" expecting it to confirm the input), the game freezes for some seconds (around 5 second if only one character is typed) becoming unresponding

Code: Select all

 653.446 Error RuntimeError.cpp:24: Unknown variable 'e' at position 0 near 'e'.
Factorio crashed. Generating symbolized stacktrace, please wait ...
This happens to me as well when I have the (secret) debug setting log-stack-trace-on-non-critical-exception set to true.
As per viewtopic.php?p=594271 (and other posts), it's for debugging only.
Try turning it off and retest.
This fixes it, thank you so much! I knew it probably was something stupid like a single wrong option, but I searched everywhere and had no idea that option could cause this type of problems.
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [kovarex] [2.0] Crash inputting variable "RuntimeError.cpp:24: Unknown variable 'p0_i4' at position 0 near 'p0_i4*10

Post by kovarex »

So the resolution is, that you used hidden debug option, which made the game slow.
Post Reply

Return to “Not a bug”