Suggestions


Recommended Posts

Nope, not in any way obvious to me, the original issue seems unaffected

I found that issues with mod entities being invisible (i.e., its assets not being properly loaded) could happen when switching levels when the prefab assets are not unloaded before requesting the engine to load them.

Could you check if this MemSpikeFix version, which implements the above logic, fixes the goblin dungeon crash?

MemSpikeFix.zip

(you may also grab it from github, of course)

Link to comment
Share on other sites

I found that issues with mod entities being invisible (i.e., its assets not being properly loaded) could happen when switching levels when the prefab assets are not unloaded before requesting the engine to load them.

Could you check if this MemSpikeFix version, which implements the above logic, fixes the goblin dungeon crash?

attachicon.gifMemSpikeFix.zip

(you may also grab it from github, of course)

 

Still seems same to me..  although I might be up to something, or it might be just coincidence.... brb

Link to comment
Share on other sites

Still seems same to me..  although I might be up to something, or it might be just coincidence.... brb

I'm down for whatever you're up to. (that was awful)

Gimme details as soon as there are details to be given.

Link to comment
Share on other sites

I'm down for whatever you're up to. (that was awful)

Gimme details as soon as there are details to be given.

 

Well it's clearly taking me way longer due to the random nature of crash, but brute force exclusion shows that the cause (or at least most common cause) of the crash is within fa_redtotem_kos and I'm still trying to find out why, or what the hell that has to do with memfix at all.

 

And lol, beware what you wish for

Link to comment
Share on other sites

Ha. Ad hoc making fx entities that are using assets of the main prefab. If I just create the fx object, it still doesn't crash, if I make it a follower it crashes, I assume, if followed object is getting collected/its assets are killed and the following object still exists. In which case, just moving it to a proper prefab may fix it.

 

EDIT: no it's still crashing as separate prefab too. Even with (proper) persists=false. If all FollowSymbol calls act up on level switches...

Edited by DeathDisciple
Link to comment
Share on other sites

Ha. Ad hoc making fx entities that are using assets of the main prefab. If I just create the fx object, it still doesn't crash, if I make it a follower it crashes, I assume, if followed object is getting collected/its assets are killed and the following object still exists. In which case, just moving it to a proper prefab may fix it.

 

EDIT: no it's still crashing as separate prefab too. Even with (proper) persists=false. If all FollowSymbol calls act up on level switches...

Interesting... Thanks for tracking this down. I'm really sorry for all the time you spent chasing this.

I'll look further into this as soon as I can.

Link to comment
Share on other sites

Proof that it's a race condition: Sleep(1) at the end of the SaveCurrent() is making it stop crashing - which is clearly not something that should be in production code.

Proof that it's a follower issue - replacing just

local follower = boom.entity:AddFollower()follower:FollowSymbol( inst.GUID, "fa_redtotem", 0, 50, -0.0001 )

with

inst:DoTaskInTime(0,function()            local x,y,z=inst:GetPosition():Get()            boom.Transform:SetPosition(x, y+1, z)end)

makes totems not crash, yet the same follow system on flags do cause the same crash if nearby.

 

Obviously not all follower things are crashing it, otherwise it would have crashed on burning effects. I would guess it affects just custom asset follower objects on custom asset entities, because spell effects that are clearly using the same logic and apply to me (character) do not cause crashes on level changes. I can 'change' the FollowSymbol calls to 0-delay prefab spawns on the static objects, but there's no way in hell I could do that with effects, esp after spell pass and the rest of the chars, so that's out of question.

 

@simplex, is any part of the 'save' code being executed before the popup dialog is called or not at all? I can't understand for the life of me why the crashes based on this affect just my enter/exit calls and not beanstalks....or normal caves for that matter, that Is almost exact same as mine.

 

 

Interesting... Thanks for tracking this down. I'm really sorry for all the time you spent chasing this.

I'll look further into this as soon as I can.


You're sorry cause I fail at coding? Come on. I'm just frustrated I can't figure out what's wrong.

Link to comment
Share on other sites

Proof that it's a race condition: Sleep(1) at the end of the SaveCurrent() is making it stop crashing - which is clearly not something that should be in production code.

Proof that it's a follower issue - replacing just

local follower = boom.entity:AddFollower()follower:FollowSymbol( inst.GUID, "fa_redtotem", 0, 50, -0.0001 )
with

inst:DoTaskInTime(0,function()            local x,y,z=inst:GetPosition():Get()            boom.Transform:SetPosition(x, y+1, z)end)
makes totems not crash, yet the same follow system on flags do cause the same crash if nearby.

 

Obviously not all follower things are crashing it, otherwise it would have crashed on burning effects. I would guess it affects just custom asset follower objects on custom asset entities, because spell effects that are clearly using the same logic and apply to me (character) do not cause crashes on level changes. I can 'change' the FollowSymbol calls to 0-delay prefab spawns on the static objects, but there's no way in hell I could do that with effects, esp after spell pass and the rest of the chars, so that's out of question.

 

@simplex, is any part of the 'save' code being executed before the popup dialog is called or not at all? I can't understand for the life of me why the crashes based on this affect just my enter/exit calls and not beanstalks....or normal caves for that matter, that Is almost exact same as mine.

Based on this and what you posted before, I'm quite certain the issue is caused by an entity following an animation symbol of a mod asset (belonging to a prefab which was just spawned for the first time). I'm guessing the engine only finishes asset loading at the end of the tick* (i.e., at the end of the current iteration of the engine's main loop), so making an entity follow an animation symbol belonging to an asset loaded at the same tick in which it was spawned may case issues.

* It's possible the game creates a worker thread for asset loading, only waiting for it to finish at the end of the tick. This would fully explain the race condition and why it's unpredictable.

I also doubt the follower entity using custom assets has any significance (if my previous reasoning is correct, it shouldn't). Fire effects due to burning are not a concern because by default they just follow the entity as a whole (by simply being set as a child entity, inst.entity:AddFollower() is never called); they just follow an animation symbol when the burnable entity is explicitly configured to work that way.

Now... the big question is how the hell I'm going to combine lazy asset loading on one hand and preemptive asset loading on the previous tick on the other. I may have to tweak the follower engine level component to delay symbol following by a tick, though I'd rather think of something better.

And, about the U&A dialog, no, the save code only runs after the dialog, if the user confirms going into the cloudrealm. I think you're having issues without other scenarios triggering it simply because of the existence of prefabs with mod assets and an entity following one of their animations symbols; I don't think there's anything particular about HitD causing the issue to manifest itself differently.

 

You're sorry cause I fail at coding? Come on. I'm just frustrated I can't figure out what's wrong.

No, I'm sorry you ended up putting so much time chasing this issue (which is much more about MemSpikeFix and general mod asset loading than HitD), time which you'd otherwise have spent developing your mod.

But don't get me wrong, I may be sorry for it, but I'm very glad you did. :razz:

Link to comment
Share on other sites

This is just a suggestion but while playing the Druid, which I have not yet, Maybe a sanity gain for wearing a Flower crown? It doesn't have to be a huge sanity gain per however long she wears it, maybe it could reduce how much sanity is loss when cutting down trees, picking grass etc. If this is already implemented then great! but aforementioned, I haven't played the Druid yet, though I have played the others, Druid is next on my list :3 but other than the suggestion, very great mod! Keep up the good work.

  • Like 1
Link to comment
Share on other sites

This is just a suggestion but while playing the Druid, which I have not yet, Maybe a sanity gain for wearing a Flower crown? It doesn't have to be a huge sanity gain per however long she wears it, maybe it could reduce how much sanity is loss when cutting down trees, picking grass etc. If this is already implemented then great! but aforementioned, I haven't played the Druid yet, though I have played the others, Druid is next on my list :3 but other than the suggestion, very great mod! Keep up the good work.

planting splings/pinecones and grass gives more sanity than dig/cut it ;)

  • Like 1
Link to comment
Share on other sites

This is just a suggestion but while playing the Druid, which I have not yet, Maybe a sanity gain for wearing a Flower crown? It doesn't have to be a huge sanity gain per however long she wears it, maybe it could reduce how much sanity is loss when cutting down trees, picking grass etc. If this is already implemented then great! but aforementioned, I haven't played the Druid yet, though I have played the others, Druid is next on my list :3 but other than the suggestion, very great mod! Keep up the good work.

Thanks! we are currently working hard on the next update that will change a lot about how the druid plays, spell wise, a lot of new spells will be added to the mod for all casters, a couple other surprises will come with the update as well ;)

  • Like 2
Link to comment
Share on other sites

Thanks! we are currently working hard on the next update that will change a lot about how the druid plays, spell wise, a lot of new spells will be added to the mod for all casters, a couple other surprises will come with the update as well ;)

WWWWWWWWWWWWOOOOOOOOOOOOOOOOOOHHH!!

(sorry but i can't be more arguing than that!)

Link to comment
Share on other sites

A traveling merchant who can appear like a Maxwell biome and will sell 3 items like merchants from the classic zelda.  He would wear a turban that wraps around his whole head so that only his eyes are seen. He could have a set of items he sells for various amounts of gold or gems. Pick rare materials for him to sell marble suits tentacle spike or the special staves/amulets. 

  • Like 1
Link to comment
Share on other sites

A traveling merchant who can appear like a Maxwell biome and will sell 3 items like merchants from the classic zelda.  He would wear a turban that wraps around his whole head so that only his eyes are seen. He could have a set of items he sells for various amounts of gold or gems. Pick rare materials for him to sell marble suits tentacle spike or the special staves/amulets. 

Thanks for the suggestion :)

 

Yeah, we have something along these lines planned "soon", hopefully in the next update. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share