[1.1.73] Mod error into crash

This subforum contains all the issues which we already resolved.
Post Reply
heyqule
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Sun Mar 05, 2017 1:35 am
Contact:

[1.1.73] Mod error into crash

Post by heyqule »

What did you do?
I'm adding a new unit to the game in the dev build of my mods. The data stage loaded fine. The game crashed with Exception Code: c0000005 when I load my debug scenario.

The custom scenario spawns the new unit with surface.create_entity

What happened?
The game crashed with this.

42.934 Error CrashHandler.cpp:494: Exception Code: c0000005, Address: 0x00007ff687945284
ModuleBase: 0x00007ff687490000, ImageSize: 01de7000, RelativeAddress: 004b5284
42.934 Error CrashHandler.cpp:500: Access Violation: Read at address FFFFFFFFFFFFFFFF
42.934 Error CrashHandler.cpp:514: Exception Context:
rax=0000000000000000, rbx=0000020dfd95ce98, rcx=0000000000000030,
rdx=0000000000000034, rsi=0000020db96896a0, rdi=0000020d844ebfa0,
rip=00007ff687945284, rsp=00000039786ff870, rbp=00000039786ff970,
r8=0000000000000000, r9=0000020d88804d50, r10=000000000000000a,
r11=00000039786ff760, r12=0000020dea5406c0, r13=0000020df1b0c9f1,
r14=ffff000000000000, r15=0000000000000000
42.934 Crashed in E:\Factorio_EXP\Factorio_1.1.73\bin\x64\factorio.exe (0x00007ff687490000 - 0x00007ff689277000)


What did you expect to happen instead? It might be obvious to you, but do it anyway!
The new unit should spawn in the game. It shouldn't crash.

Does it happen always, once, or sometimes?
It always happened. I tried it with different instances on my machine. 2 builds of 1.1.72 and brand new 1.1.73. The bug report logs are from 1.1.73 build.

If you can reproduce the issue provide the exact steps!
- Go to New game
- Load Enemy Race Manager / Unit Debug scenario


Additional Info
You can unzip the enemyracemanager mod. Go to mods/enemyracemanager_1.16.0/scenarios/unit-test/control.lua:61
Swap out the firebat to marine. That scenario loads perfectly fine.

```
surface.create_entity({
name='erm_terran/firebat/mk2',
--name='erm_terran/marine/mk3',
force='player',
player=1,
position={-10,-10}
})
```

<link removed since the bug is fixed>
Here is the google drive folder for the mods, the log and the dump


Btw this player's log crashed with same exception code.
viewtopic.php?f=7&t=104275
Last edited by heyqule on Sun Dec 04, 2022 11:23 pm, edited 2 times in total.

Loewchen
Global Moderator
Global Moderator
Posts: 8285
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [1.1.73] Mod error into crash

Post by Loewchen »

Code: Select all

   0.053 2022-12-04 01:44:07; Factorio 1.1.73 (build 60242, win64, full)
   0.053 Operating system: Windows 10 (build 19044) 
   0.054 Program arguments: "E:\Factorio_EXP\Factorio_1.1.73\bin\x64\factorio.exe" 
   0.054 Config path: E:/Factorio_EXP/Factorio_1.1.73/config/config.ini
   0.054 Read data path: E:/Factorio_EXP/Factorio_1.1.73/data
   0.054 Write data path: E:/Factorio_EXP/Factorio_1.1.73 [372805/976744MB]
   0.054 Binaries path: E:/Factorio_EXP/Factorio_1.1.73/bin
   0.075 System info: [CPU: Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz, 6 cores, RAM: 11372/32640 MB, page: 25576/41877 MB, virtual: 4246/134217727 MB, extended virtual: 0 MB]
   0.075 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: lmw] [Lang: en]
   0.081 Available displays: 2
   0.081  [0]: \\.\DISPLAY1 - NVIDIA GeForce RTX 2060 {0x05, [0,0], 3840x2160, 32bit, 60Hz}
   0.081  [1]: \\.\DISPLAY2 - NVIDIA GeForce RTX 2060 {0x01, [3840,0], 1080x1920, 32bit, 60Hz}
   0.147 [Direct3D11] Display: 0, Output: 0, DisplayAdapter: 0, RenderingAdapter: 0; d3dcompiler_47.dll
   0.274 Initialised Direct3D[0]: NVIDIA GeForce RTX 2060; id: 10de-1f08; driver: nvldumdx.dll 31.0.15.1694
   0.274   D3D Feature Level: 11.1, DXGI 1.5+, SwapChain: 3,flip-discard,-,-,-,none
   0.274   [Local Video Memory] Budget: 5212MB, CurrentUsage: 4MB, Reservation: 0/2734MB
   0.274   [Non-Local Vid.Mem.] Budget: 15552MB, CurrentUsage: 0MB, Reservation: 0/7904MB
   0.274   Tiled resources: Tier 2
   0.274   Unified Memory Architecture: No
   0.274   BGR 565 Supported: Yes
   0.274   MaximumFrameLatency: 3, GPUThreadPriority: 0
   0.274 Graphics settings preset: very-high
   0.274   Dedicated video memory size 5980 MB
   0.335 Desktop composition is active.
   0.335 Graphics options: [Graphics quality: high] [Video memory usage: all] [DXT: high-quality] [Color: 32bit]
   0.335                   [Max threads (load/render): 32/6] [Max texture size: 0] [Tex.Stream.: 0] [Rotation quality: normal] [Other: STDCWT] [B:0,C:0,S:100]
   0.390 [Audio] Backend:SDL(default); Driver:wasapi, Device:Default device, Depth:16, Channels:2, Frequency:44100
   0.530 Loading mod settings enemyracemanager_assets 1.0.0 (settings.lua)
   0.531 Loading mod settings enemyracemanager 1.16.0 (settings.lua)
   0.532 Loading mod settings erm_terran 1.14.0 (settings.lua)
   0.533 Loading mod core 0.0.0 (data.lua)
   0.624 Loading mod base 1.1.73 (data.lua)
   1.047 Loading mod enemyracemanager_assets 1.0.0 (data.lua)
   1.062 Loading mod Unit_Control 0.3.11 (data.lua)
   1.072 Loading mod enemyracemanager 1.16.0 (data.lua)
   1.232 Loading mod erm_terran 1.14.0 (data.lua)
   1.253 Loading mod zerm_postprocess 1.0.0 (data.lua)
   1.266 Loading mod base 1.1.73 (data-updates.lua)
   1.282 Loading mod enemyracemanager 1.16.0 (data-updates.lua)
   1.288 Script @__enemyracemanager__/lib/debug_helper.lua:26: Disabling Vanilla Spawners...
   1.288 Script @__enemyracemanager__/lib/debug_helper.lua:26: Using 0
   1.288 Script @__enemyracemanager__/lib/debug_helper.lua:26: Using 0
   1.288 Script @__enemyracemanager__/lib/debug_helper.lua:26: Using 0
   1.288 Script @__enemyracemanager__/lib/debug_helper.lua:26: Using 0
   1.288 Script @__enemyracemanager__/lib/debug_helper.lua:26: Using 0
   1.288 Script @__enemyracemanager__/lib/debug_helper.lua:26: Using 0
   1.308 Loading mod enemyracemanager_assets 1.0.0 (data-final-fixes.lua)
   1.320 Loading mod Unit_Control 0.3.11 (data-final-fixes.lua)
   1.333 Loading mod enemyracemanager 1.16.0 (data-final-fixes.lua)
   1.449 Checksum for core: 870127790
   1.449 Checksum of base: 4211423066
   1.449 Checksum of enemyracemanager_assets: 3121613130
   1.449 Checksum of stdlib: 0
   1.449 Checksum of Unit_Control: 1424286825
   1.449 Checksum of enemyracemanager: 841052832
   1.449 Checksum of erm_terran: 4040556702
   1.449 Checksum of zerm_postprocess: 0
   1.782 Warning SDLWindow.cpp:529: Mouse cursor definition "" was not found.
   1.784 Prototype list checksum: 2844098777
   1.846 Loading sounds...
   5.673 Info PlayerData.cpp:73: Local player-data.json unavailable
   5.673 Info PlayerData.cpp:78: Cloud player-data.json unavailable
   5.855 Crop bitmaps.
  17.026 Parallel Sprite Loader initialized (threads: 5)
  22.801 Initial atlas bitmap size is 16384
  22.828 Created atlas bitmap 16384x16364 [none]
  22.874 Created atlas bitmap 16384x16380 [none]
  22.874 Created atlas bitmap 16384x1476 [none]
  22.875 Created atlas bitmap 8192x4208 [decal]
  22.876 Created atlas bitmap 16384x5568 [low-object, linear-minification]
  22.877 Created atlas bitmap 8192x4416 [mipmap, linear-minification, linear-magnification, linear-mip-level]
  22.877 Created atlas bitmap 16384x6064 [terrain, mipmap, linear-minification, linear-mip-level]
  22.878 Created atlas bitmap 4096x3216 [terrain-effect-map, mipmap, linear-minification, linear-mip-level]
  22.880 Created atlas bitmap 4096x1856 [smoke, mipmap, linear-minification, linear-magnification]
  22.881 Created atlas bitmap 4096x3104 [mipmap]
  22.881 Created atlas bitmap 8192x2240 [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
  22.882 Created atlas bitmap 8192x1496 [alpha-mask]
  22.885 Created atlas bitmap 16384x14824 [shadow, linear-magnification, alpha-mask]
  22.885 Created atlas bitmap 8192x2336 [shadow, mipmap, linear-magnification, alpha-mask]
  22.886 Created atlas bitmap 2048x240 [icon-background, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, ]
  22.893 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
  23.620 Parallel Sprite Loader initialized (threads: 5)
  30.473 Sprites loaded
  30.516 Generated mipmaps (4) for atlas [4] of size 16384x5568   
  30.537 Generated mipmaps (3) for atlas [5] of size 8192x4416   
  30.569 Generated mipmaps (3) for atlas [6] of size 16384x6064   
  30.580 Generated mipmaps (3) for atlas [7] of size 4096x3216   
  30.591 Generated mipmaps (3) for atlas [8] of size 4096x1856   
  30.633 Generated mipmaps (3) for atlas [9] of size 4096x3104   
  30.644 Generated mipmaps (5) for atlas [10] of size 8192x2240   
  30.656 Generated mipmaps (3) for atlas [13] of size 8192x2336   
  30.674 Custom mipmaps uploaded.
  30.682 Custom inputs active: 18
  30.894 Factorio initialised
  42.533 Loading level.dat: 1225441 bytes.
  42.533 Info Scenario.cpp:199: Map version 1.1.73-0
  42.558 Checksum for script E:/Factorio_EXP/Factorio_1.1.73/temp/currently-playing/control.lua: 332769937
  42.562 Checksum for script __Unit_Control__/control.lua: 1528341581
  42.583 Checksum for script __enemyracemanager__/control.lua: 472375087
  42.592 Checksum for script __erm_terran__/control.lua: 3053813790
  42.596 Checksum for script __zerm_postprocess__/control.lua: 2203836596
  42.630 Script @__enemyracemanager__/lib/debug_helper.lua:26: ArmouredBiters is inactive
  42.630 Script @__enemyracemanager__/lib/debug_helper.lua:26: Cold_biters is inactive
  42.631 Script @__enemyracemanager__/lib/debug_helper.lua:26: Explosive_biters is inactive
  42.920 Error MainLoop.cpp:1284: Exception at tick 0: The scenario level caused a non-recoverable error.
Please report this error to the scenario author.

Error while running event level::on_nth_tick(600)
The mod Enemy Race Manager (1.16.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event enemyracemanager::on_script_trigger_effect (ID 154)
__enemyracemanager__/lib/army_population_processor.lua:87: attempt to perform arithmetic on field '?' (a nil value)
stack traceback:
	__enemyracemanager__/lib/army_population_processor.lua:87: in function 'can_place_unit'
	__enemyracemanager__/controllers/army_population.lua:21: in function '?'
	__enemyracemanager__/controllers/army_population.lua:59: in function 'handler'
	__stdlib__/stdlib/event/event.lua:342: in function 'pcall'
	__stdlib__/stdlib/event/event.lua:362: in function 'dispatch_event'
	__stdlib__/stdlib/event/event.lua:438: in function <__stdlib__/stdlib/event/event.lua:396>
stack traceback:
	[C]: in function 'create_entity'
	...o_EXP/Factorio_1.1.73/temp/currently-playing/control.lua:59: in function 'handler'
	__stdlib__/stdlib/event/event.lua:342: in function 'pcall'
	__stdlib__/stdlib/event/event.lua:362: in function 'dispatch_event'
	__stdlib__/stdlib/event/event.lua:438: in function <__stdlib__/stdlib/event/event.lua:396>
  42.934 Error CrashHandler.cpp:494: Exception Code: c0000005, Address: 0x00007ff687945284
ModuleBase: 0x00007ff687490000, ImageSize: 01de7000, RelativeAddress: 004b5284
  42.934 Error CrashHandler.cpp:500: Access Violation: Read at address FFFFFFFFFFFFFFFF
  42.934 Error CrashHandler.cpp:514: Exception Context:
rax=0000000000000000, rbx=0000020dfd95ce98, rcx=0000000000000030,
rdx=0000000000000034, rsi=0000020db96896a0, rdi=0000020d844ebfa0,
rip=00007ff687945284, rsp=00000039786ff870, rbp=00000039786ff970,
 r8=0000000000000000,  r9=0000020d88804d50, r10=000000000000000a,
r11=00000039786ff760, r12=0000020dea5406c0, r13=0000020df1b0c9f1,
r14=ffff000000000000, r15=0000000000000000
  42.934 Crashed in E:\Factorio_EXP\Factorio_1.1.73\bin\x64\factorio.exe (0x00007ff687490000 - 0x00007ff689277000)
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\tmp\factorio-build-yv0zm3\libraries\stackwalker\stackwalker.cpp (924): StackWalker::ShowCallstack
c:\tmp\factorio-build-yv0zm3\src\util\logger.cpp (316): Logger::writeStacktrace
c:\tmp\factorio-build-yv0zm3\src\util\logger.cpp (323): Logger::logStacktrace
c:\tmp\factorio-build-yv0zm3\src\util\crashhandler.cpp (186): CrashHandler::writeStackTrace
c:\tmp\factorio-build-yv0zm3\src\util\crashhandler.cpp (543): CrashHandler::SehHandler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA3A6202E7)
00007FFA3A6202E7 (KERNELBASE): (filename not available): UnhandledExceptionFilter
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA3CE15530)
00007FFA3CE15530 (ntdll): (filename not available): memset
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA3CDFC876)
00007FFA3CDFC876 (ntdll): (filename not available): _C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA3CE1241F)
00007FFA3CE1241F (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA3CDC14A4)
00007FFA3CDC14A4 (ntdll): (filename not available): RtlRaiseException
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA3CE10F4E)
00007FFA3CE10F4E (ntdll): (filename not available): KiUserExceptionDispatcher
c:\tmp\factorio-build-yv0zm3\src\graphics\entityrenderer.cpp (315): EntityRenderer::prepareRow
c:\tmp\factorio-build-yv0zm3\src\graphics\entityrenderer.cpp (225): EntityRenderer::threadJob
c:\tmp\factorio-build-yv0zm3\src\util\workerthread.cpp (49): WorkerThread::loop
c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\thr\xthread (230): std::_LaunchPad<std::unique_ptr<std::tuple<void (__cdecl MapGenerationHelper::*)(void),MapGenerationHelper *>,std::default_delete<std::tuple<void (__cdecl MapGenerationHelper::*)(void),MapGenerationHelper *> > > >::_Go
c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\thr\xthread (209): std::_Pad::_Call_func
minkernel\crts\ucrt\src\appcrt\startup\thread.cpp (97): thread_start<unsigned int (__cdecl*)(void *),1>
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA3CC274B4)
00007FFA3CC274B4 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFA3CDC26A1)
00007FFA3CDC26A1 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
  44.799 Error CrashHandler.cpp:191: Map tick at moment of crash: 0
  44.841 Info CrashHandler.cpp:311: Executable CRC: 1414869340
  44.841 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.
  46.680 Uploading log file
  46.710 Error CrashHandler.cpp:262: Heap validation: success.
  46.710 Creating crash dump.
  46.857 CrashDump success

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

Re: [1.1.73] Mod error into crash

Post by Rseding91 »

Thanks for the report. It's now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.

heyqule
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Sun Mar 05, 2017 1:35 am
Contact:

Re: [1.1.73] Mod error into crash

Post by heyqule »

wow. That was quick lol. especially today is Sunday.

Post Reply

Return to “Resolved Problems and Bugs”