suriyun-production / mmorpg-kit-docs

This is document for MMORPG KIT project (https://www.assetstore.unity3d.com/#!/content/110188?aid=1100lGeN)
https://suriyun-production.github.io/mmorpg-kit-docs
49 stars 10 forks source link

Mysql error, player cant login anymore #2586

Closed moepi2k closed 1 month ago

moepi2k commented 1 month ago

i had this issue few years ago already. player cant login anymore even after restart server. it stuck after selecting character. last time i remember there was an issue with an equipet item or so. but i thought it was fixed.

this is the error log:

ERROR DatabaseNetworkManager [2024-10-22 22:17:45] - Cannot UpdateUserCount status: Timeout ERROR No Tag [2024-10-22 22:17:53] - OverflowException: Arithmetic operation resulted in an overflow. MySqlConnector.Core.ResultSet.gScanRowAsyncRemainder|9_1 (MySqlConnector.Core.ResultSet resultSet, MySqlConnector.Protocol.PayloadData payload, MySqlConnector.Core.Row row) (at D:/Projects/CSharp/MySqlConnector-1.3.11/src/MySqlConnector/Core/ResultSet.cs:316) MySqlConnector.Core.ResultSet.ScanRowAsync (MySqlConnector.Protocol.Serialization.IOBehavior ioBehavior, MySqlConnector.Core.Row row, System.Threading.CancellationToken cancellationToken) (at D:/Projects/CSharp/MySqlConnector-1.3.11/src/MySqlConnector/Core/ResultSet.cs:236) MySqlConnector.Core.ResultSet.ReadAsync (MySqlConnector.Protocol.Serialization.IOBehavior ioBehavior, System.Threading.CancellationToken cancellationToken) (at D:/Projects/CSharp/MySqlConnector-1.3.11/src/MySqlConnector/Core/ResultSet.cs:200) MySqlConnector.Core.ResultSet.Read () (at D:/Projects/CSharp/MySqlConnector-1.3.11/src/MySqlConnector/Core/ResultSet.cs:192) MySqlConnector.MySqlDataReader.Read () (at D:/Projects/CSharp/MySqlConnector-1.3.11/src/MySqlConnector/MySqlDataReader.cs:34) MultiplayerARPG.MMO.MySQLDatabase.ReadStorageItem (MySqlConnector.MySqlDataReader reader, MultiplayerARPG.CharacterItem& result) (at :0) MultiplayerARPG.MMO.MySQLDatabase+<>c__DisplayClass171_0.b0 (MySqlConnector.MySqlDataReader reader) (at :0) MultiplayerARPG.MMO.MySQLDatabase.ExecuteReader (MySqlConnector.MySqlConnection connection, MySqlConnector.MySqlTransaction transaction, System.Action1[T] onRead, System.Boolean isAsync, System.String sql, MySqlConnector.MySqlParameter[] args) (at <dfb94e1b3f994189a3fb1846b7dbfafc>:0) Cysharp.Threading.Tasks.UniTask+ExceptionResultSource.GetResult (System.Int16 token) (at <45b7092461144f998a40a36a425ccaa5>:0) MultiplayerARPG.MMO.MySQLDatabase.ExecuteReader (MySqlConnector.MySqlConnection connection, MySqlConnector.MySqlTransaction transaction, System.Action1[T] onRead, System.String sql, MySqlConnector.MySqlParameter[] args) (at :0) Cysharp.Threading.Tasks.UniTask+ExceptionResultSource.GetResult (System.Int16 token) (at <45b7092461144f998a40a36a425ccaa5>:0) MultiplayerARPG.MMO.MySQLDatabase.ExecuteReader (System.Action1[T] onRead, System.String sql, MySqlConnector.MySqlParameter[] args) (at <dfb94e1b3f994189a3fb1846b7dbfafc>:0) Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask1[TStateMachine].GetResult (System.Int16 token) (at <45b7092461144f998a40a36a425ccaa5>:0) MultiplayerARPG.MMO.MySQLDatabase.ReadStorageItems (MultiplayerARPG.StorageType storageType, System.String storageOwnerId) (at :0) Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask2[TStateMachine,T].GetResult (System.Int16 token) (at <45b7092461144f998a40a36a425ccaa5>:0) MultiplayerARPG.MMO.DatabaseNetworkManager.ReadStorageItems (MultiplayerARPG.StorageType storageType, System.String storageOwnerId) (at <dfb94e1b3f994189a3fb1846b7dbfafc>:0) Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask2[TStateMachine,T].GetResult (System.Int16 token) (at <45b7092461144f998a40a36a425ccaa5>:0) MultiplayerARPG.MMO.DatabaseNetworkManager.ReadStorageItems (LiteNetLibManager.RequestHandlerData requestHandler, MultiplayerARPG.MMO.ReadStorageItemsReq request, LiteNetLibManager.RequestProceedResultDelegate1[TResponse] result) (at <dfb94e1b3f994189a3fb1846b7dbfafc>:0) UnityEngine.Debug:LogException(Exception) Cysharp.Threading.Tasks.UniTaskScheduler:PublishUnobservedTaskException(Exception) MultiplayerARPG.MMO.<ReadStorageItems>d__87:MoveNext() Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoid1:Run() Cysharp.Threading.Tasks.AwaiterActions:Continuation(Object) Cysharp.Threading.Tasks.UniTaskCompletionSourceCore1:TrySetException(Exception) Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask2:SetException(Exception) MultiplayerARPG.MMO.d126:MoveNext() Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask2:Run() Cysharp.Threading.Tasks.AwaiterActions:Continuation(Object) Cysharp.Threading.Tasks.UniTaskCompletionSourceCore1:TrySetException(Exception) Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`2:SetException(Exception) MultiplayerARPG.MMO.d171:MoveNext() Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask2:Run() Cysharp.Threading.Tasks.AwaiterActions:Continuation(Object) Cysharp.Threading.Tasks.UniTaskCompletionSourceCore1:TrySetException(Exception) Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask1:SetException(Exception) MultiplayerARPG.MMO.<ExecuteReader>d__20:MoveNext() Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask1:Run() Cysharp.Threading.Tasks.AwaiterActions:Continuation(Object) Cysharp.Threading.Tasks.UniTaskCompletionSourceCore1:TrySetResult(AsyncUnit) Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask1:SetResult() MultiplayerARPG.MMO.d__10:MoveNext() Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`1:Run() UnityEngine.UnitySynchronizationContext:ExecuteTasks()

any ideas?

insthync commented 1 month ago

My answer might be a stupid answer, so I don't want to answer :)

insthync commented 1 month ago

As I read the error, I think the problem is it read wrong type of data, your column type in your table struct might be different to the reader codes.

For example if your table have following columns: id (string), dataId (int), level(short), amount(short)

but your reader read it as string, int, int, int then the error occurs

moepi2k commented 1 month ago

so the table import is vanilla from 188f5 nothning changed and no custom tables/colums. so yea need to check where or why it happen then

insthync commented 1 month ago

"Vanilla" :)

moepi2k commented 1 month ago

I mean default. Nothing custom

moepi2k commented 1 month ago

just to let u know https://gyazo.com/df4dcadd6246032dc0067e4360175fa4 the marked entry caused the issue so player was not able to login. its just a normal item evey other player has. so dont know why it cause that issue.

insthync commented 1 month ago

then it might be a mysqlconnector's issues? which i won't going to fix it, you may try use my .net version of database management to find if it is because of mysqlconnector or not, but you must find the correct version for your project

insthync commented 1 month ago

or you may export that character data to me to test, just one character which having an issues

moepi2k commented 1 month ago

email?

insthync commented 1 month ago

Yes

insthync commented 1 month ago

Yep, it is MySQLConnector bug which it cannot read the 522328318 and I can't fix it, You may try following choices:

insthync commented 1 month ago

You also can change value type to varchar to fix it (it work)

moepi2k commented 1 month ago

what do you prefer of those above? and do you mean change varchar for storageitem and characteritem to from int to varchar? https://gyazo.com/e379117e27ec7c3ac723737a175fed95

insthync commented 1 month ago

I prefer to use .NET version of database management web service

insthync commented 1 month ago

Yes. change data ID to varchar

insthync commented 1 month ago

Any more bugs that you've told I won't fix ?

moepi2k commented 1 month ago

yes but i better will mail it to you

insthync commented 1 month ago

Why?

moepi2k commented 1 month ago

because its critical and i not want that maybe player can see it and exploit in final projects

insthync commented 1 month ago

So you have never reported that bug and told me I won't fix bugs?

moepi2k commented 1 month ago

here another one -> image sometimes player get locked out and get this message, no way the enter game until you restart seerver

insthync commented 1 month ago

This one too, you never report me, why did you told me I won't fix bugs?

moepi2k commented 1 month ago

i did, just seems it came back or maybe was never fully fixed https://github.com/suriyun-production/mmorpg-kit-docs/issues/1864

insthync commented 1 month ago

Then just try to reopen it or repost it, not blaming or making up me that I won't fix

moepi2k commented 1 month ago

calm down please, okey, we just discusse and i try to help u find bugs, ok?

insthync commented 1 month ago

I won't okay if anyone makes up the story like you did

insthync commented 1 month ago

Any more bugs ?

moepi2k commented 1 month ago

yes. instanced dungeon after some time lead to crash mapserver. everytime the player join it starts then player get msg rejected and server closed and kick out of game. then need to restart game and player will stay on normal map (warpportal)

https://gyazo.com/e2c925553c9d0af0e3e59d8ff45a90eb

this is something i not tested yet with default kit so dont know if its maybe something on my side

insthync commented 1 month ago

Post all bugs you've found, and please create a new post, I've did 2 above

moepi2k commented 1 month ago

player report https://github.com/suriyun-production/mmorpg-kit-docs/issues/1756

same issue. player report rarely that pets level reset to 1 while playing

insthync commented 1 month ago

I will sleep now, I hope I will see it have as many as you've told me, and I want to know why you chose to blame me instead of creating bug reporting.

moepi2k commented 1 month ago

you see what i do? reproting bugs xD and i dont blame you. i always wanted to help you. why i else should report so many bugs?

btw just was able to reproduce pet level reseting. sometimes happen when u have a pet with specific level in inventory and u add another pet of the same type it will reset. in my case i added it with /add_item PET

insthync commented 1 month ago

And... I don't fix bugs as you said?

RunOrDi3 commented 1 month ago

Calm down guys , first thanks to @insthync for fixing bugs , second @moepi2k report all the bugs you found every bug in a single post and @insthync will fix them .. thats all

insthync commented 1 month ago

@RunOrDi3 Yep, if he just reports bugs before blaming me then I won't have problems.

moepi2k commented 1 month ago

Ok so for the pet thing. One guy just reportet that the pet even disappeard when the player died while using pet. Sonseems there are multible issues with pet

insthync commented 1 month ago

Any other bugs that not relate to pet?

insthync commented 1 month ago

Hey, repost or comment whats you've commented here that is not related to the title to others.