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:61Swap 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