Page 1 of 1

[Rseding91] [1.1.100] Crash in floatcast.hpp entering large constant in combinator

Posted: Mon Dec 11, 2023 1:25 am
by Matrix_V
Steps to reproduce:
- Place a constant combinator.
- Click on the combinator to open the configuration GUI, then click on the first Output signals slot, then click on signal A.
- Input a constant value of 9999999999999999999 (exactly 19 digits).
- Press the green check mark.

Expected behavior:
- Signal A is configured with value 2147483647, displaying as 2.1G.

Actual behavior:
- Factorio crashes.

Excerpts from attached log file:
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\users\build\appdata\local\temp\factorio-build-y2mhrs\src\floatcast.hpp (112): float_cast<__int64>
c:\users\build\appdata\local\temp\factorio-build-y2mhrs\src\gui\signalandcountselectgui.cpp (141): SignalAndCountSelectGui::confirm
c:\users\build\appdata\local\temp\factorio-build-y2mhrs\libraries\agui\widget\widget.cpp (1383): agui::Widget::dispatchMouseClick
c:\users\build\appdata\local\temp\factorio-build-y2mhrs\libraries\agui\gui.cpp (298): agui::Gui::handleMouseUp
188.726 Error FloatCast.hpp:112: 10000000000000000000.000000 > 9223372036854774444.000000
188.726 Error CrashHandler.cpp:641: Received 22

Re: [1.1.100] Crash in floatcast.hpp entering large constant in combinator

Posted: Mon Dec 11, 2023 9:17 pm
by Rseding91
Thanks for the report. This will be fixed in 2.0. In the meantime you can work around this issue by simply not doing that :P

Re: [Rseding91] [1.1.100] Crash in floatcast.hpp entering large constant in combinator

Posted: Wed Dec 13, 2023 2:18 pm
by Rseding91
Actually, this will now be fixed for the next 1.1. release.