jlnunez89 / fibula-mmo

An open source server written in C# for the other-leg-bone-name game (which must not be named).
MIT License
28 stars 7 forks source link

Re-logging multiple times causes server crash #61

Closed SeeingBlue closed 4 years ago

SeeingBlue commented 4 years ago

I used OTclientv8 and it has auto-relog enabled. I discovered that re-logging twice will cause the server to crash and produce this error: [12:34:48] [Debug] Microsoft.EntityFrameworkCore.ChangeTracking: Context '"OpenTibiaInMemoryDatabaseContext"' started tracking 'System.ArgumentNullException: Value cannot be null. (Parameter 'value') at OpenTibia.Common.Utilities.Validate.ThrowIfNull(Object o, String paramName) in C:\Users\Josh\Documents\GitHub\fibula-mmo\OpenTibia.Common.Utilities\Validate.cs:line 44 at OpenTibia.Server.Thing.set_ParentCylinder(ICylinder value) in C:\Users\Josh\Documents\GitHub\fibula-mmo\OpenTibia.Server\Thing.cs:line 74 at OpenTibia.Server.PlayerInventory.Finalize() in C:\Users\Josh\Documents\GitHub\fibula-mmo\OpenTibia.Server\PlayerInventory.cs:line 52

I tried the same thing using the real tibia client and it did the same thing but produced this slightly different error instead: [12:36:23] [Debug] OpenTibia.Server.Game: Placed Player One at [32369, 32241, 7]. System.ArgumentNullException: Value cannot be null. (Parameter 'value') at OpenTibia.Common.Utilities.Validate.ThrowIfNull(Object o, String paramName) in C:\Users\Josh\Documents\GitHub\fibula-mmo\OpenTibia.Common.Utilities\Validate.cs:line 44 at OpenTibia.Server.Thing.set_ParentCylinder(ICylinder value) in C:\Users\Josh\Documents\GitHub\fibula-mmo\OpenTibia.Server\Thing.cs:line 74 at OpenTibia.Server.PlayerInventory.Finalize() in C:\Users\Josh\Documents\GitHub\fibula-mmo\OpenTibia.Server\PlayerInventory.cs:line 52

jlnunez89 commented 4 years ago

Should be addressed with #62. Please reopen if you find it’s not the case, and thanks for testing!

jlnunez89 commented 4 years ago

Huh, I just reproed again, but I know what I missed. Will send out a PR in a bit.

jlnunez89 commented 4 years ago

K, now fully addressed in #63