4.2-rc1 entity client <-> server sync broken

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

4.2-rc1 entity client <-> server sync broken

by sapier » Sat Aug 11, 2012 22:13

hello, I know entity handling has been buggy in 4.0 ever since. But in 4.2-rc1 it's gotten worse ever at least when I play it.

So what exactly am I talking about:

1) huge amount of errors like this
ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=19 m_static_exists=true but static data doesn't actually exist in (0,1,-3)

2) entitys not getting loaded/unloaded correctly und chunk load/unload

3) crashes upon errors of type 1)

4) entity duplications

5) health not beeing in sync between server and client (resulting in death animation whyle entity still there)

Does anyone else experience similar problems or do only I have them?
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Aug 11, 2012 22:22

1) Only in some dev states in my carts mod.
2) Yes
3) see 1)
4) nope
5) nope
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sat Aug 11, 2012 23:13

did you find out what triggered 1) in these dev states and how to avoid it?

addon to 4) it's not quite duplication bot more a factor 4
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Aug 12, 2012 09:43

sapier wrote:did you find out what triggered 1) in these dev states and how to avoid it?

Sure. It appears when the objects are deactivatet and the code is changed. When they now are activated the new code is not compatible with the old one, wich created the deactivated objects.
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sun Aug 12, 2012 14:02

I'm not sure I really got it. What do you mean with "code changed" lua code or minetest code?
I thought an entity merely consists of a position, an id and the saved static data?

If this is correct changing anything within lua shouldn't do any harm?
Last edited by sapier on Sun Aug 12, 2012 14:02, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Aug 12, 2012 14:36

sapier wrote:I'm not sure I really got it. What do you mean with "code changed" lua code or minetest code?
I thought an entity merely consists of a position, an id and the saved static data?

If this is correct changing anything within lua shouldn't do any harm?

When the object is deactivated by the engine is has a staticdata wich is create in lua. When the engine activates it again the staticdata is given to lua. Now if the staticdata is createt in an old version of the entitiy code and the object is activated in a new version of the lua code it might happen that the new code can not understand the "old" satictdata.
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sun Aug 12, 2012 14:59

Ok that far I'm with you ... BUT staticdata is directly passed to the entity so this message would originate from lua code and not from core. That's another problem.

If I do understand servers message corrctly it trys to save some static data which aren't existing.
In my opinion this is something like setting a flag to remember "I need to save some data later" and then when evaluating that flag not having any data available to save.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Aug 12, 2012 15:06

I now that it can cause lua errors but as I said i had this messages only in development of my carts mod when i change on_acitvate() and get_staticdata().
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sun Aug 12, 2012 16:05

ok i think that's another problem. I think I'm the only one doing that excessive entity usage :-)
DON'T mention coding style!
(c) sapier all rights reserved
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 9 guests

cron