[posila] [0.18.1] Creating an artillery flare via trigger effect causes crash

This subforum contains all the issues which we already resolved.
Post Reply
calcwizard
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat Apr 20, 2019 6:30 am
Contact:

[posila] [0.18.1] Creating an artillery flare via trigger effect causes crash

Post by calcwizard »

The attached mod creates a custom artillery flare when a land mine dies by using a "create-entity" dying_trigger_effect. In the 0.17 version, this functioned as expected, creating the flare on death (through "create-particle"). In 0.18, this was changed to "create-entity" as the game does not recognize artillery flares as particles anymore. However, this causes a crash when the flare is created. The effect is at the top of data-final-fixes and is assigned to the land mine's dying_trigger_effect.

Steps to reproduce:
Start a game with the mod installed
Place a land mine
Have it die (destroyed by a biter, detonate, blow up with grenade)

Code: Select all

   0.004 2020-01-24 06:05:01; Factorio 0.18.1 (build 48982, win64, alpha)
   0.005 Operating system: Windows 8.1 
   0.005 Program arguments: "C:\Program Files\Factorio\bin\x64\factorio.exe" "--wait-to-close" "1196" 
   0.005 Read data path: C:/Program Files/Factorio/data
   0.005 Write data path: %appdata%/Factorio [80413/238346MB]
   0.005 Binaries path: C:/Program Files/Factorio/bin
   0.013 System info: [CPU: Intel(R) Core(TM) i5-4460  CPU @ 3.20GHz, 4 cores, RAM: 5201/8067 MB, page: 9282/12601 MB, virtual: 108/134217727 MB, extended virtual: 0 MB]
   0.013 Display options: [FullScreen: 1] [VSync: 0] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: lmw] [Lang: en]
   0.020 Available displays: 2
   0.020  [0]: \\.\DISPLAY1 - AMD Radeon R9 200 Series {0x8080005, [0,0], 1920x1080, 32bit, 60Hz}
   0.021  [1]: \\.\DISPLAY2 - AMD Radeon R9 200 Series {0x8080001, [-1280,0], 1280x1024, 32bit, 60Hz}
   0.055 [Direct3D11] Display: 0, Output: 0, DisplayAdapter: 0, RenderingAdapter: 0; d3dcompiler_47.dll
   0.099 Initialised Direct3D[0]: AMD Radeon R9 200 Series; id: 1002-679a; driver: aticfx64.dll 22.19.171.1024
   0.099   D3D Feature Level: 11.1, DXGI 1.2+, SwapChain: 3,flip-sequential,-,-,-,none
   0.099   Tiled resources: Tier 1
   0.099   BGR 565 Supported: Yes
   0.099   MaximumFrameLatency: 3, GPUThreadPriority: 0
   0.099 Graphics settings preset: very-high
   0.099   Dedicated video memory size 3050 MB
   0.144 Desktop composition is active.
   0.144 Graphics options: [Graphics quality: normal] [Video memory usage: high] [Light scale: 25%] [DXT: high-quality] [Color: 32bit]
   0.144                   [Max threads (load/render): 32/4] [Max texture size: 0] [Tex.Stream.: 1] [Rotation quality: normal] [Other: STDC] [B:0,C:0,S:100]
   0.156 DSound: Starting _dsound_update thread
   0.156 DSound: Enter _dsound_update; tid=7696
   0.509 Info ModManager.cpp:242: Found duplicate mod test-mod, using higher version (0.18.1 > 0.17.1).
   0.525 Loading mod settings landmine-thrower 18.0.0 (settings.lua)
   0.527 Loading mod core 0.0.0 (data.lua)
   0.645 Loading mod base 0.18.1 (data.lua)
   0.958 Loading mod landmine-thrower 18.0.0 (data.lua)
   1.116 Loading mod base 0.18.1 (data-updates.lua)
   1.272 Loading mod landmine-thrower 18.0.0 (data-final-fixes.lua)
   1.440 Checksum for core: 754498064
   1.441 Checksum of base: 4035372542
   1.441 Checksum of landmine-thrower: 3063893912
   1.656 Prototype list checksum: 1776051936
   1.700 Loading sounds...
   1.767 Info PlayerData.cpp:68: Local player-data.json available, timestamp 1579863901
   1.767 Info PlayerData.cpp:75: Cloud player-data.json unavailable
   1.938 Initial atlas bitmap size is 16384
   1.942 Created atlas bitmap 16384x6592 [none]
   1.942 Created atlas bitmap 4096x1880 [decal]
   1.942 Created atlas bitmap 8192x2576 [low-object]
   1.943 Created atlas bitmap 4096x2320 [mipmap, linear-minification, linear-magnification, linear-mip-level]
   1.943 Created atlas bitmap 8192x3552 [terrain, mipmap, linear-minification, linear-mip-level]
   1.943 Created atlas bitmap 4096x1216 [terrain-effect-map, mipmap, linear-minification, linear-mip-level]
   1.943 Created atlas bitmap 4096x1600 [smoke, mipmap, linear-minification, linear-magnification]
   1.943 Created atlas bitmap 4096x928 [mipmap]
   1.944 Created atlas bitmap 4096x2128 [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
   1.944 Created atlas bitmap 2048x192 [icon-background, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, ]
   1.944 Created atlas bitmap 4096x756 [alpha-mask]
   1.948 Created atlas bitmap 16384x4428 [shadow, linear-magnification, alpha-mask]
   1.949 Created atlas bitmap 4096x1328 [shadow, mipmap, linear-magnification, alpha-mask]
   1.994 Created virtual atlas pages 4096x4096x3
   1.998 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
   2.396 Parallel Sprite Loader initialized (threads: 3)
   7.854 Warning! Sprite at {0,0; 32x32} from __landmine-thrower__/graphics/icons/landmine-thrower.png is defined with 4 mipmap levels, but level 1 is expected to be at {32,0; 16x16} which is out of bounds of the source image.
   7.890 Sprites loaded
   7.902 Generated mipmaps (3) for atlas [2] of size 8192x2576   
   7.913 Generated mipmaps (3) for atlas [3] of size 4096x2320   
   7.924 Generated mipmaps (3) for atlas [4] of size 8192x3552   
   7.935 Generated mipmaps (3) for atlas [5] of size 4096x1216   
   7.946 Generated mipmaps (3) for atlas [6] of size 4096x1600   
   7.975 Generated mipmaps (3) for atlas [7] of size 4096x928   
   7.986 Generated mipmaps (5) for atlas [8] of size 4096x2128   
   7.997 Generated mipmaps (3) for atlas [12] of size 4096x1328   
   7.997 Custom mipmaps uploaded.
   8.123 Generated mipmaps for virtual atlas of size 4096x12288
   8.156 Factorio initialised
   8.156 Discord overlay detected (DiscordHook64.dll)
   8.157 Info HttpSharedState.cpp:54: Downloading https://updater.factorio.com/updater/get-available-versions?username=calcwizard&token=<private>&apiVersion=2
   9.088 0 packages available to download (experimental updates enabled).
  21.323 Loading level.dat: 1189040 bytes.
  21.323 Info Scenario.cpp:187: Map version 0.18.1-1
  21.437 Checksum for script C:/Users/Andrew/AppData/Roaming/Factorio/temp/currently-playing/control.lua: 4116257306
  21.438 Checksum for script __landmine-thrower__/control.lua: 305558863
  37.643 Error CrashHandler.cpp:461: Exception Code: c0000005, Address: 0x00007ff7737b160b
ModuleBase: 0x00007ff772f20000, ImageSize: 018cc000, RelativeAddress: 0089160b
  37.643 Error CrashHandler.cpp:467: Access Violation: Read at address 0000000000000000
  37.643 Error CrashHandler.cpp:481: Exception Context:
rax=0000000000000000, rbx=0000000000000000, rcx=1f832170e77c0000,
rdx=0000003dcc71d660, rsi=0000003dcc71d868, rdi=0000003dd5cc6a60,
rip=00007ff7737b160b, rsp=0000003dcc71d5e0, rbp=0000003dcc71d6e0,
 r8=7fffffff7fffffff,  r9=7fffffff7fffffff, r10=0000000000000000,
r11=0000003dcc71d560, r12=0000003dd5cc6a70, r13=0000003dd61dad30,
r14=0000003dd5c18700, r15=0000003dcdfe3010
  37.643 Crashed in C:\Program Files\Factorio\bin\x64\factorio.exe (0x00007ff772f20000 - 0x00007ff7747ec000)
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-fdkiek\libraries\stackwalker\stackwalker.cpp (924): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-build-fdkiek\src\util\logger.cpp (540): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-build-fdkiek\src\util\logger.cpp (547): Logger::logStacktrace
c:\cygwin64\tmp\factorio-build-fdkiek\src\util\crashhandler.cpp (184): CrashHandler::writeStackTrace
c:\cygwin64\tmp\factorio-build-fdkiek\src\util\crashhandler.cpp (510): CrashHandler::SehHandler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA5E1A1B22)
00007FFA5E1A1B22 (KERNELBASE): (filename not available): UnhandledExceptionFilter
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA60BEF1B3)
00007FFA60BEF1B3 (ntdll): (filename not available): memset
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA60BD1E26)
00007FFA60BD1E26 (ntdll): (filename not available): _C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA60BE349D)
00007FFA60BE349D (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA60BA48D7)
00007FFA60BA48D7 (ntdll): (filename not available): RtlRaiseException
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA60BE262A)
00007FFA60BE262A (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-build-fdkiek\src\trigger\createentitytriggereffectitem.cpp (35): CreateEntityTriggerEffectItem::applyInternal
c:\cygwin64\tmp\factorio-build-fdkiek\src\trigger\triggereffect.cpp (32): TriggerEffect::apply
c:\cygwin64\tmp\factorio-build-fdkiek\src\entity\entitywithhealth.cpp (329): EntityWithHealth::die
c:\cygwin64\tmp\factorio-build-fdkiek\src\entity\entitywithhealth.cpp (205): EntityWithHealth::damage
c:\cygwin64\tmp\factorio-build-fdkiek\src\entity\entitywithowner.cpp (165): EntityWithOwner::damage
c:\cygwin64\tmp\factorio-build-fdkiek\src\trigger\damagetriggereffectitem.cpp (23): DamageTriggerEffectItem::applyInternal
c:\cygwin64\tmp\factorio-build-fdkiek\src\trigger\triggereffect.cpp (32): TriggerEffect::apply
c:\cygwin64\tmp\factorio-build-fdkiek\src\trigger\directtriggeritem.cpp (32): DirectTriggerItem::apply
c:\cygwin64\tmp\factorio-build-fdkiek\src\trigger\trigger.cpp (21): Trigger::apply
c:\cygwin64\tmp\factorio-build-fdkiek\src\trigger\shooter.cpp (602): Shooter::doShoot
c:\cygwin64\tmp\factorio-build-fdkiek\src\trigger\shooter.cpp (484): Shooter::shootInternal
c:\cygwin64\tmp\factorio-build-fdkiek\src\entity\unit.cpp (189): Unit::attack
c:\cygwin64\tmp\factorio-build-fdkiek\src\ai\pursuebehavior.cpp (97): PursueBehavior::execute
c:\cygwin64\tmp\factorio-build-fdkiek\src\ai\commandable.cpp (196): Commandable::runBehavior
c:\cygwin64\tmp\factorio-build-fdkiek\src\entity\unit.cpp (313): Unit::update
c:\cygwin64\tmp\factorio-build-fdkiek\src\surface\chunk.cpp (649): Chunk::updateActiveEntities
c:\cygwin64\tmp\factorio-build-fdkiek\src\surface\chunk.cpp (710): Chunk::updateEntities
c:\cygwin64\tmp\factorio-build-fdkiek\src\surface\surface.cpp (1540): Surface::update
c:\cygwin64\tmp\factorio-build-fdkiek\src\map\map.cpp (1630): Map::updateEntities
c:\cygwin64\tmp\factorio-build-fdkiek\src\game.cpp (201): Game::update
c:\cygwin64\tmp\factorio-build-fdkiek\src\scenario\scenario.cpp (1216): Scenario::update
c:\cygwin64\tmp\factorio-build-fdkiek\src\mainloop.cpp (1172): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-fdkiek\src\mainloop.cpp (1039): MainLoop::gameUpdateLoop
c:\cygwin64\tmp\factorio-build-fdkiek\src\util\workerthread.cpp (49): WorkerThread::loop
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\thr\xthread (230): std::_LaunchPad<std::unique_ptr<std::tuple<void (__cdecl WorkerThread::*)(void),WorkerThread *>,std::default_delete<std::tuple<void (__cdecl WorkerThread::*)(void),WorkerThread *> > > >::_Go
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\thr\xthread (209): std::_Pad::_Call_func
minkernel\crts\ucrt\src\appcrt\startup\thread.cpp (115): thread_start<unsigned int (__cdecl*)(void * __ptr64)>
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA5EB013D2)
00007FFA5EB013D2 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA60B654F4)
00007FFA60B654F4 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
  39.868 Error CrashHandler.cpp:189: Map tick at moment of crash: 949
  39.868 Error Util.cpp:97: 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.
Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.
  49.390 Uploading log file
  49.407 Error CrashHandler.cpp:244: Heap validation: success.
  49.408 Creating crash dump.
  49.491 CrashDump success
Attachments
factorio-current.log
(11.16 KiB) Downloaded 121 times
landmine-thrower_18.0.0.zip
(85.53 KiB) Downloaded 109 times

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

Re: [posila] [0.18.1] Creating an artillery flare via trigger effect causes crash

Post by posila »

Thanks for the report.
Fixed for 0.18.2

calcwizard
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat Apr 20, 2019 6:30 am
Contact:

Re: [posila] [0.18.1] Creating an artillery flare via trigger effect causes crash

Post by calcwizard »

Thank you for the fix.

Post Reply

Return to “Resolved Problems and Bugs”