Page 1 of 1

[1.1.104] Crash on --dump-icon-sprites (linux)

Posted: Sun Mar 31, 2024 9:50 am
by KeepResearchinSpoons
seen from at least v1.1.100 (also v1.1.104), game crashes on using `./bin/x64/factorio --dump-icon-sprites`
kinda works for some(?) items, but then crashes up with "pls report".
(( side note, would have been NICE if it dumped icons under `./script-output/icons/all-the-folders-go-HERE` instead of `./script-output/all-the-folders-go-HERE` but that is purely taste preference ))

the setup has 25 tiny mods, think FNEI, Train_Control_Signals, Jetpack, PickerBeltTools... but that is probably irrelevant, since same have also be observed with other mod groups.
specs are x11, mesa, kde, not sure if relevant either.

the log tail (v104) is

Code: Select all

   3.524 Factorio initialised
   4.633 Error CrashHandler.cpp:639: Received SIGSEGV
Factorio crashed. Generating symbolized stacktrace, please wait ...
/tmp/factorio-build-MzGUjo/src/Util/Logger.cpp (336): Logger::writeStacktrace(FileWriteStream*, StackTraceInfo*)
/tmp/factorio-build-MzGUjo/src/Util/Logger.cpp (346): Logger::logStacktrace(StackTraceInfo*)
/tmp/factorio-build-MzGUjo/src/Util/CrashHandler.cpp (188): CrashHandler::writeStackTrace(CrashHandler::CrashReason)
/tmp/factorio-build-MzGUjo/src/Util/CrashHandler.cpp (642): CrashHandler::commonSignalHandler(int)
/tmp/factorio-build-MzGUjo/src/Util/CrashHandler.cpp (648): CrashHandler::SignalHandler(int)
0x7f8d1e44251f
/tmp/factorio-build-MzGUjo/src/Graphics/DrawCommandBatch.cpp (599): DrawCommandBatch::drawSpriteFromTiledTexture(BlendMode, SamplingMode, TiledVideoBitmap const*, float, float, float, float, Color32, float, float, float, float, float, float, float, DrawingFlags, GraphicsEffect)
/tmp/factorio-build-MzGUjo/src/Graphics/DrawCommandBatch.hpp (94): DrawCommandBatch::drawSprite(BlendMode, SamplingMode, VideoBitmap const*, float, float, float, float, Color, float, float, float, float, float, float, float, DrawingFlags, SpriteEffectData const&, GraphicsEffect)
/tmp/factorio-build-MzGUjo/src/Graphics/ImageDrawOrder.cpp (116): ImageDrawOrder::render() const
/tmp/factorio-build-MzGUjo/src/Graphics/DrawQueue.cpp (2156): DrawQueue::renderOthers() const
/tmp/factorio-build-MzGUjo/src/Graphics/ScreenshotRequest.cpp (150): RenderIconsRequest::draw(DrawQueue&, Sprite const&, Filesystem::Path)
/tmp/factorio-build-MzGUjo/src/Graphics/ScreenshotRequest.cpp (111): operator()<PrototypeList<EquipmentPrototype> >
/tmp/factorio-build-MzGUjo/src/Util/MplVector.hpp (10): forEach<RenderIconsRequest::renderIcons() const::<lambda(auto:135)> >
/tmp/factorio-build-MzGUjo/src/Graphics/ScreenshotRequest.cpp (101): RenderIconsRequest::renderIcons() const [clone .constprop.0]
/tmp/factorio-build-MzGUjo/src/Main.cpp (941): main
../sysdeps/nptl/libc_start_call_main.h (58): __libc_start_call_main
../csu/libc-start.c (392): __libc_start_main_impl
0x783342
0xffffffffffffffff
Stack trace logging done
   4.803 Error Util.cpp:100: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.
have fun with the bug-hunting!
( me available for other steps, if necessary )

Re: [1.1.104] Crash on --dump-icon-sprites (linux)

Posted: Tue Apr 02, 2024 10:03 am
by Bilka
Cannot reproduce with the provided information. I'm on x11, proprietary nvidia driver, kde.

It may be helpful if you provide the full log because it contains information on the used graphics settings.

Re: [1.1.104] Crash on --dump-icon-sprites (linux)

Posted: Wed Apr 03, 2024 10:22 am
by KeepResearchinSpoons
I also went to backups to confirm the same on 1.1.80
well, the difference really seems to only in video drivers? using the on-the-chip graphics on this box.

here's logs for vanilla 104 and vanilla 80 (actually verbose huh)
factorio-current.v1-1-104.log
(6.96 KiB) Downloaded 30 times
factorio-current.v1-1-80.log
(8.27 KiB) Downloaded 26 times

hope this helps...
Edit:
okay. now it goes into stranger things land.
clean v104 (from the site) plays the music (with no screen gui, huh) but actually succeeds with no crash.
with predictable log
and I've even run the win-zip version (virtually) on the same box; it also succeeds, but this time around it actually shows the gui while playing the music, hehe.
fun fact: the (output) folders actually differ (haha) for all 1278 files (win folder came out a bit smaller in size as well). Might look into it on pixels with some scripts later to see if non-meta differs, too lazy-busy rn tho.


While I could fuzz/bin-search for the crashing config, it would be nice to get some pointers on what could be the glaring offender right away
the "uncommented" part of 104 config.ini has these in [graphics]:

Code: Select all

[graphics]
cache-sprite-atlas=true
compress-sprite-atlas-cache=true
graphics-quality=normal
full-screen=false
show-smoke=false
show-clouds=false
show-decoratives=false
show-item-shadows=false
show-inserter-shadows=false
show-tree-distortion=false
v-sync=false
high-quality-animations=false
high-quality-shadows=false
high-quality-terrain=false
show-game-simulations-in-background=false
video-memory-usage=medium
I mean, it should not go down if I do a medium mem usage? Or crank down some shadows? Too lazy-busy to test right now (still, not too much to fuzz about "in total").


as usual, me ready for some more bug crunching...
good luck and have fun with tracing it all up

Re: [1.1.104] Crash on --dump-icon-sprites (linux)

Posted: Mon Apr 08, 2024 9:23 pm
by KeepResearchinSpoons
could be triaged as minor issue or duplicate
Okay; to me this seems like a duplicate of a known issue with "linux vram size detection is broken".
mostly means "video-memory-usage" has to be set to "all" (as is by default).

Not sure if it's even worth it on time-investment, assuming the workaround is possible. Not sure if fix-able at all of some specific setups.
Could be a minor issue, could be a duplicate, could be whatever. Not really matters. ¯\_(ツ)_/¯

Casually confirm rsed on 1/0 linux magic policy (2020-05-06)
It's why anytime any linux user makes a bug report I just let it sit for 2 -3 days and a *huge* percent of the time they just self-reply with "nevermind it's working now" or "I fixed it/I broke it earlier with some change I did that I never needed to do but i'm a linux user so I did it anyway just to see what would happen."

97.63159%~ of the time it works every time to just ignore bug reports from linux players :D
apparently we've made if work yet again. Somehow. So much for capable linux users, I guess.
for those 2 hundred views that came around
set `video-memory-usage=all` in [graphics] section.
here's a small-and-simple JS script that does implement a neat-enough workaround.
mostly to put all the dumps under specific folders data|icons|locales under `/tmp/prefix/` (in RAM-mapped tmpfs).

there is no reason to use JS, but why not. *casually confirms rsed yet again*.
We shall need:
  • shelljs (DT) (aka "some" unix commands; used for simplicity sake),
  • js-ini (TS) (just about any edit-ini works; even naive regexp one)
  • this little sparce ~150 lines file
    example.js
    (7.28 KiB) Downloaded 27 times
After getting the dumps, you *might* want to do some more steps.
recipe normalization at least

I do not really thing this is worthy to get into technical-help forum; but I doubt it has much use in bugs list either.
And since wiki is cumbersome, dated and you get most of your data elsewhere (aside from its policy of no-crude-examples such as this one) this little tool does not belong there anyways. And I doubt the original tool where this part was actually extracted from does it any better.
But if getting-dumps is all you need *and* you have npm/node on your toolbox somehow? then it just works.

Have fun, and may the gear force and fish luck be with you.