So as the title says, calling destroy() on the entity from the onentitydied event crashes Factorio to the desktop...Should probably raise a script error (or ignore the call) instead. Yes I realize it's a minor issue but thought I'd mention it.
As a side note, this bug was discovered when attempting to prevent ghosts from being created for an entity see Modding help: Ghost entities
[0.9.8 Script Crash] onentitydied event.entity.destroy()
Re: [0.9.8 Script Crash] onentitydied event.entity.destroy()
Hi, thanks for the report.
Yes, and not even talking about trying to call entity.die()
My humble guess is, that crashes on stack overflow.
Fixed for 0.10, it will not throw error, but calling die, or destroy on entity in the process of destroying it will just be silently discarded.
P.S. I don't have time to test this kind of bug, but as the fix is quite simple, it should work, let me know if it isn't so.
Yes, and not even talking about trying to call entity.die()
My humble guess is, that crashes on stack overflow.
Fixed for 0.10, it will not throw error, but calling die, or destroy on entity in the process of destroying it will just be silently discarded.
P.S. I don't have time to test this kind of bug, but as the fix is quite simple, it should work, let me know if it isn't so.
Re: [0.9.8 Script Crash] onentitydied event.entity.destroy()
Oh, I hadn't even tested die(), figured if destroy crashed it die would likely be just as bad (since it involves health and dropping the loot as well). I suppose I got a bit lazy there,kovarex wrote:Yes, and not even talking about trying to call entity.die()
Seems like a fair guessMy humble guess is, that crashes on stack overflow.
A 'quick' build of master (which takes a nice 45 minutes or so on my laptop...) reveals no crashes, I'll test again with the official release of 0.10, when it's out, to be sure but I doubt any problems would be reintroduced at this point.P.S. I don't have time to test this kind of bug, but as the fix is quite simple, it should work, let me know if it isn't so.
Re: [0.9.8 Script Crash] onentitydied event.entity.destroy()
Great, thanks for the check, we should find a time to optimise the make againFreeER wrote:A 'quick' build of master (which takes a nice 45 minutes or so on my laptop...) reveals no crashes, I'll test again with the official release of 0.10, when it's out, to be sure but I doubt any problems would be reintroduced at this point.