I can only give my standard hints here, which made me get projects to publish and runproperly more than one time:

- never trigger any level loading from an entity funtion. Either use some status handshake/polling for triggering the level change, or at least set my to null in order to decouple the function from an entity.
- never do complex things in events. No entity movement, no entity removal or creation. and - surprise - no level loading. Again, use a polling function for these things and inside the event function only set a status/or flags which is regularly evaluated by the polling function.
- take care with media instructions and videos (especially in connection with render to texture). A level change can cause real problems if media streaming is not stopped properly before level change.
- wait(1). The most hated statement and the imaginary fix for everything, yes. But in fact there are instruction like ptr_remove() (anything related spawning or deleting objects) which simply require to have the entity alive for at least one frame. I think somewhere in the manual there is (was?) a list of so called "dangerous instructions". Those should also never be called in event functions, as they can get you into extremly nasty random behavior.
- any looping entity function should have a well defined exit condition and not just a while(1). If the entity is deleted, the my pointer of the looping entity function is not guaranteed to be set to null, so the function may continue running - and it can even "switch" to a different entity this way". Always stop the entity loop(s), afterwards remove the entity.

Likely none of these are your problem, but it's the standards I always checked. With nearly every Ackcon there was some mysterious crash behavior which was solved by reviewing the code fo the issues mentioned above.