UnrealMultiple / UnrealMultiple/TShockPlugin
[BUG] servertools报错了
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 128
- Forks
- 37
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 3
Description
BUG可复现 | 错误可重现
- 是 | 是的
插件最新 | 插件是最新的
- 是 | 是的
插件名称 | 插件名称
服务器工具
TShock版本 | TShock版本
5.9.9
系统 | 系统
窗口
发生了什么?| 发生了什么事?
如何复现 | 如何重现
莫名其妙报错
期望的结果?|预期结果?
修复
文本日志 | 文本日志
[07/10/25 23:49:41] [Server API] Warning: Plugin "ServerTools" has had an unhandled exception thrown by one of its GameUpdate handlers:
MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered during command execution
---> MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered attempting to read the resultset
---> MySql.Data.MySqlClient.MySqlException (0x80004005): Reading from the stream has failed
---> System.IO.IOException: Unable to read data from the transport connection: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。.
---> System.Net.Sockets.SocketException (10060): 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
at System.Net.Sockets.NetworkStream.Read(Span1 buffer) in System.Net.Sockets.dll:token 0x600012e+0x39 --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Read(Span1 buffer) in System.Net.Sockets.dll:token 0x600012e+0x68
at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](CancellationToken cancellationToken, Int32 estimatedSize) in System.Net.Security.dll:token 0x600031f+0x32
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) in System.Private.CoreLib.dll:token 0x60077b8+0x0
at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](Memory1 buffer, CancellationToken cancellationToken) in System.Net.Security.dll:token 0x6000321+0x14c at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token) in System.Private.CoreLib.dll:token 0x60077b8+0x0 at MySql.Data.MySqlClient.TimedStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, Boolean execAsync) in MySql.Data.dll:token 0x600139b+0xa8 at MySql.Data.MySqlClient.MySqlStream.ReadFullyAsync(Stream stream, Byte[] buffer, Int32 offset, Int32 count, Boolean execAsync) in MySql.Data.dll:token 0x6001275+0xbb at MySql.Data.MySqlClient.MySqlStream.LoadPacketAsync(Boolean execAsync) in MySql.Data.dll:token 0x6001276+0xa0 at MySql.Data.MySqlClient.MySqlStream.LoadPacketAsync(Boolean execAsync) in MySql.Data.dll:token 0x6001276+0x1bc at MySql.Data.MySqlClient.MySqlStream.ReadPacketAsync(Boolean execAsync) in MySql.Data.dll:token 0x6001274+0x75 at MySql.Data.MySqlClient.NativeDriver.GetResultAsync(Int32 affectedRow, Int64 insertedId, Boolean execAsync) in MySql.Data.dll:token 0x60012a7+0xd6 at MySql.Data.MySqlClient.Driver.GetResultAsync(Int32 statementId, Int32 affectedRows, Int64 insertedId, Boolean execAsync) in MySql.Data.dll:token 0x6000e2c+0x83 at MySql.Data.MySqlClient.Driver.NextResultAsync(Int32 statementId, Boolean force, Boolean execAsync) in MySql.Data.dll:token 0x6000e2b+0xb9 at MySql.Data.MySqlClient.MySqlDataReader.NextResultAsync(Boolean execAsync, CancellationToken cancellationToken) in MySql.Data.dll:token 0x6001160+0x20f at MySql.Data.MySqlClient.MySqlDataReader.NextResultAsync(Boolean execAsync, CancellationToken cancellationToken) in MySql.Data.dll:token 0x6001160+0x6ec at MySql.Data.MySqlClient.MySqlCommand.ExecuteReaderAsync(CommandBehavior behavior, Boolean execAsync, CancellationToken cancellationToken) in MySql.Data.dll:token 0x600101f+0x4c4 at MySql.Data.MySqlClient.MySqlCommand.ExecuteReaderAsync(CommandBehavior behavior, Boolean execAsync, CancellationToken cancellationToken) in MySql.Data.dll:token 0x600101f+0x9d3 at MySql.Data.MySqlClient.MySqlCommand.ExecuteReaderAsync(CommandBehavior behavior, Boolean execAsync, CancellationToken cancellationToken) in MySql.Data.dll:token 0x600101f+0xaed at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQueryAsync(Boolean execAsync, CancellationToken cancellationToken) in MySql.Data.dll:token 0x6001014+0xc2 at LinqToDB.Data.DataConnection.ExecuteNonQuery(DbCommand command) in linq2db.dll:token 0x6001bed+0x15 at LinqToDB.Data.DataConnection.ExecuteNonQuery() in linq2db.dll:token 0x6001bee+0x0 at LinqToDB.Data.DataConnection.QueryRunner.ExecuteNonQueryImpl(DataConnection dataConnection, ExecutionPreparedQuery executionQuery) in linq2db.dll:token 0x60041ab+0x17 at LinqToDB.Linq.QueryRunner.NonQueryQuery(Query query, IDataContext dataContext, Expression expr, Object[] parameters, Object[] preambles) in linq2db.dll:token 0x60014fb+0x1a at LinqToDB.Linq.QueryRunner.Update1.Query(IDataContext dataContext, T obj, UpdateColumnFilter1 columnFilter, String tableName, String serverName, String databaseName, String schemaName, TableOptions tableOptions) in linq2db.dll:token 0x6003c3f+0x0 at LinqToDB.DataExtensions.Update[T](IDataContext dataContext, T obj, String tableName, String databaseName, String schemaName, String serverName, TableOptions tableOptions) in linq2db.dll:token 0x60003cc+0x0 at ServerTools.Plugin.OnUpdatePlayerOnline(EventArgs args) in ServerTools.dll:token 0x6000030+0x26 at ServerTools.Plugin.OnUpdate(EventArgs e) in ServerTools.dll:token 0x600003b+0x0 at TerrariaApi.Server.HandlerCollection1.Invoke(ArgsType args) in /home/runner/work/TShock/TShock/TerrariaServerAPI/TerrariaServerAPI/TerrariaApi.Server/HandlerCollection.cs:line 96
控制台日志 | 控制台日志
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the ServerTools.Plugin.OnUpdatePlayerOnline entry point named in the stack trace, then inspect the database update it triggers through MySql.Data and LinqToDB. Reproduce the failure with the provided log while checking the MySQL connection and update path. Done means the recurring unhandled exception is addressed and the server no longer floods the console.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, mysql
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100