[posila] [0.17.4] Crash when using SpritePath 'file/'

This subforum contains all the issues which we already resolved.
Post Reply
grilledham
Inserter
Inserter
Posts: 23
Joined: Tue Sep 25, 2018 9:32 pm
Contact:

[posila] [0.17.4] Crash when using SpritePath 'file/'

Post by grilledham »

Using a SpritePath with the path 'file/' causes a crash to desktop.

I've tested the same code and it works in 0.16.51.

Code:

Code: Select all

script.on_event(
    defines.events.on_player_created,
    function(event)
        local player = game.players[event.player_index]
        player.gui.center.add {type = 'sprite', sprite = 'file/logo.png'}
    end
)
Logs:

Code: Select all

  13.947 Error CrashHandler.cpp:515: Received SIGSEGV
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-ocil06\libraries\stackwalker\stackwalker.cpp (924): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-build-ocil06\src\util\logger.cpp (405): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-build-ocil06\src\util\logger.cpp (515): Logger::logStacktrace
c:\cygwin64\tmp\factorio-build-ocil06\src\util\crashhandler.cpp (169): CrashHandler::writeStackTrace
c:\cygwin64\tmp\factorio-build-ocil06\src\util\crashhandler.cpp (524): CrashHandler::SignalHandler
minkernel\crts\ucrt\src\appcrt\misc\exception_filter.cpp (219): _seh_filter_exe
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl (304): `__scrt_common_main_seh'::`1'::filt$0
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF6DDC3BD18)
00007FF6DDC3BD18 (Factorio): (filename not available): __C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFDF103F7DD)
00007FFDF103F7DD (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFDF0FAD856)
00007FFDF0FAD856 (ntdll): (filename not available): RtlWalkFrameChain
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFDF103E70E)
00007FFDF103E70E (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-build-ocil06\src\graphics\drawcommandbatch.cpp (278): DrawCommandBatch::drawSprite
c:\cygwin64\tmp\factorio-build-ocil06\src\graphics\imagedraworder.cpp (112): ImageDrawOrder::render
c:\cygwin64\tmp\factorio-build-ocil06\src\graphics\guirenderer.cpp (90): GuiRenderer::render
c:\cygwin64\tmp\factorio-build-ocil06\src\mainloop.cpp (574): MainLoop::mainLoopStep
c:\cygwin64\tmp\factorio-build-ocil06\src\mainloop.cpp (356): MainLoop::run
c:\cygwin64\tmp\factorio-build-ocil06\src\main.cpp (1244): wmain
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl (288): __scrt_common_main_seh
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFDEFD13DC4)
00007FFDEFD13DC4 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFDF1013691)
00007FFDF1013691 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
  15.130 Error CrashHandler.cpp:174: Map tick at moment of crash: 2
Attached is the scenario.
Attachments
test.zip
(17.4 KiB) Downloaded 77 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 12214
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.4] Crash when using SpritePath 'file/'

Post by Rseding91 »

Thanks for the report however I can't reproduce any crash. When I try it, the sprite just doesn't render.
If you want to get ahold of me I'm almost always on Discord.

grilledham
Inserter
Inserter
Posts: 23
Joined: Tue Sep 25, 2018 9:32 pm
Contact:

Re: [0.17.4] Crash when using SpritePath 'file/'

Post by grilledham »

I tested again in 0.17.9 and it still crashes for me, same error.

Even if it doesn't crash for you, wouldn't you expect it to show the sprite?

Rseding91
Factorio Staff
Factorio Staff
Posts: 12214
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.4] Crash when using SpritePath 'file/'

Post by Rseding91 »

"logo.png" is not a valid file path so no I expect it to show nothing.
If you want to get ahold of me I'm almost always on Discord.

grilledham
Inserter
Inserter
Posts: 23
Joined: Tue Sep 25, 2018 9:32 pm
Contact:

Re: [0.17.4] Crash when using SpritePath 'file/'

Post by grilledham »

Rseding91 wrote:
Sat Mar 09, 2019 9:49 pm
"logo.png" is not a valid file path so no I expect it to show nothing.
Interesting. What would the correct file path be then?

I must say I'm a little confused as the exact same code in 0.16.51 gives me this.
screenshot.png
screenshot.png (3.76 MiB) Viewed 1851 times

Bilka
Factorio Staff
Factorio Staff
Posts: 2853
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [0.17.4] Crash when using SpritePath 'file/'

Post by Bilka »

I can reproduce this with the attached scenario, I hit a log and abort that was added in a later version. "Error ImageDrawOrder.cpp:61: Invalid sprite reference. Sprite: C:\Users\Erik\Documents\GitHub\Factorio\temp\currently-playing\logo.png {x = 0, y = 0, w = 512, h = 512}, 0x0000027479ac9af0"
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

posila
Factorio Staff
Factorio Staff
Posts: 5147
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [posila] [0.17.4] Crash when using SpritePath 'file/'

Post by posila »

Thanks for the report.
Fixed for 0.17.42

Post Reply

Return to “Resolved Problems and Bugs”