Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot crash #42

Closed
robotrono opened this issue Jan 13, 2017 · 6 comments
Closed

Bot crash #42

robotrono opened this issue Jan 13, 2017 · 6 comments

Comments

@robotrono
Copy link

I get this error:

[04:21:04]Warning: TH Web error: [403] Forbidden
[04:21:04]  Debug: YT Ruined!
[04:21:07]  Debug: AF stop old
[04:21:07]  Debug: AF ar start: Youtube ID:RZiB5HNPBOs
[04:21:07]  Debug: AF set volume: 5
[04:21:07]  Error: Critical program failure! Logs will follow.
[04:21:07]  Error: MSG: Specified cast is not valid.
TYPE:InvalidCastException
STACK:  at (wrapper castclass) System.Object:__castclass_with_cache (object,intptr,intptr)
  at LiteDB.PageService.GetPage[T] (System.UInt32 pageID) [0x00049] in <443e7085ca5f45b79ebe745a00233d33>:0 
  at LiteDB.IndexService.GetNode (LiteDB.PageAddress address) [0x0000b] in <443e7085ca5f45b79ebe745a00233d33>:0 
  at LiteDB.IndexService.Find (LiteDB.CollectionIndex index, LiteDB.BsonValue value, System.Boolean sibling, System.Int32 order) [0x0002c] in <443e7085ca5f45b79ebe745a00233d33>:0 
  at LiteDB.QueryEquals+<ExecuteIndex>d__2.MoveNext () [0x00022] in <443e7085ca5f45b79ebe745a00233d33>:0 
  at LiteDB.LiteEngine+<Find>d__49.MoveNext () [0x001a5] in <443e7085ca5f45b79ebe745a00233d33>:0 
  at LiteDB.LiteCollection`1+<Find>d__17[T].MoveNext () [0x00070] in <443e7085ca5f45b79ebe745a00233d33>:0 
  at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0003e] in <63992662b765477a898ef49cdcc99ee2>:0 
  at LiteDB.LiteCollection`1[T].FindOne (System.Linq.Expressions.Expression`1[TDelegate] predicate) [0x00018] in <443e7085ca5f45b79ebe745a00233d33>:0 
  at TS3AudioBot.History.HistoryManager.FindByUniqueId (System.String uniqueId) [0x0008a] in <487b5d3c9c294ec09e87f2ea1773ad1b>:0 
  at TS3AudioBot.History.HistoryManager.Store (TS3AudioBot.History.HistorySaveData saveData) [0x00029] in <487b5d3c9c294ec09e87f2ea1773ad1b>:0 
  at TS3AudioBot.History.HistoryManager.LogAudioResource (TS3AudioBot.History.HistorySaveData saveData) [0x00000] in <487b5d3c9c294ec09e87f2ea1773ad1b>:0 
  at TS3AudioBot.PlayManager.Play (TS3Client.Messages.ClientData invoker, TS3AudioBot.ResourceFactories.PlayResource play, TS3AudioBot.MetaData meta) [0x000bc] in <487b5d3c9c294ec09e87f2ea1773ad1b>:0 
  at TS3AudioBot.PlayManager.Play (TS3Client.Messages.ClientData invoker, TS3AudioBot.ResourceFactories.AudioResource ar, TS3AudioBot.MetaData meta) [0x0003b] in <487b5d3c9c294ec09e87f2ea1773ad1b>:0 
  at TS3AudioBot.PlayManager.Play (TS3Client.Messages.ClientData invoker, TS3AudioBot.PlaylistItem item) [0x000c9] in <487b5d3c9c294ec09e87f2ea1773ad1b>:0 
  at TS3AudioBot.PlayManager.Next (TS3Client.Messages.ClientData invoker) [0x00020] in <487b5d3c9c294ec09e87f2ea1773ad1b>:0 
  at TS3AudioBot.PlayManager.SongStoppedHook (System.Object sender, TS3AudioBot.SongEndEventArgs e) [0x0003c] in <487b5d3c9c294ec09e87f2ea1773ad1b>:0 
  at TS3AudioBot.AudioFramework.OnResourceEnd (System.Boolean val) [0x0001a] in <487b5d3c9c294ec09e87f2ea1773ad1b>:0 
  at TS3AudioBot.AudioFramework.<AudioFramework>m__0 (System.Object s, System.EventArgs e) [0x00000] in <487b5d3c9c294ec09e87f2ea1773ad1b>:0 
  at TS3AudioBot.Ts3Full.AudioSend () [0x000c2] in <487b5d3c9c294ec09e87f2ea1773ad1b>:0 
  at TS3AudioBot.Helper.TickPool.Tick () [0x00072] in <487b5d3c9c294ec09e87f2ea1773ad1b>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00017] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00031] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in <8f2c484307284b51944a1a13a14c0266>:0 
[04:21:07]   Info: Closing Mediaplayer...
[04:21:07]  Debug: AF stop old
[04:21:07]   Info: Closing QueryConnection...
[04:21:07]   Info: Closing QueryConnection...
@Splamy Splamy self-assigned this Jan 13, 2017
@Splamy Splamy added the bug label Jan 13, 2017
@Splamy
Copy link
Owner

Splamy commented Jan 13, 2017

Very strange bug. Unfotunately i have a hard time reproducing it.
Is this crash reproduceable with a certain playlist ?
Could you send me your history file? (If you dont want to upload it here publicly you can send it per email *** )

@robotrono
Copy link
Author

robotrono commented Jan 13, 2017

This is my playlist https://www.youtube.com/playlist?list=PLbbZzFSu3a-i-xc5VARuamD-Ds11-KXTm

Done, I sent it to your email.

Edit: Yeah is strange bug, I can't reproduce the bug again. Maybe is my vps, for now the bot works fine.

@robotrono
Copy link
Author

This is normal?

When Im listening the music bot and send the command !unsubscribe I get this messages in console:

[14:49:57]  Debug: 1804: the command failed to execute: no whisper targets found (missing permission:-1)
[14:49:57]  Debug: 1804: the command failed to execute: no whisper targets found (missing permission:-1)
[14:49:57]  Debug: 1804: the command failed to execute: no whisper targets found (missing permission:-1)
[14:49:57]  Debug: 1804: the command failed to execute: no whisper targets found (missing permission:-1)
[14:49:58]  Debug: 1804: the command failed to execute: no whisper targets found (missing permission:-1)
[14:49:58]  Debug: 1804: the command failed to execute: no whisper targets found (missing permission:-1)
[14:49:58]  Debug: 1804: the command failed to execute: no whisper targets found (missing permission:-1)

After I send the command !subscribe and the messages stop.

@Splamy
Copy link
Owner

Splamy commented Jan 13, 2017

Yes it is, this happens when the bot tries to whisper but there are no targets. At the moment it spamms this message because there is no reasonable error handling.

@robotrono
Copy link
Author

robotrono commented Jan 15, 2017

@Splamy I get this error after 5 hours without someone listening the bot.

[10:32:16]  Debug: 1804: the command failed to execute: no whisper targets found (missing permission:-1)
[10:32:16]  Debug: 1804: the command failed to execute: no whisper targets found (missing permission:-1)
[10:32:16]  Debug: 1804: the command failed to execute: no whisper targets found (missing permission:-1)
[10:32:17]  Debug: 1804: the command failed to execute: no whisper targets found (missing permission:-1)
[10:32:17]  Debug: 1804: the command failed to execute: no whisper targets found (missing permission:-1)
[10:33:35]Warning: TH Web error: [403] Forbidden
[10:33:35]  Debug: YT Ruined!
[10:33:38]  Debug: YT Saved!
[10:33:38]  Debug: AF stop old
[10:33:38]  Debug: AF ar start: Youtube ID:GX6aFoY8QNk
[10:33:38]  Debug: AF set volume: 5
[10:33:43]  Error: Critical program failure! Logs will follow.
[10:33:43]  Error: Critical program failure! Logs will follow.
[10:33:43]  Error: MSG: A connection attempt failed because the connected party did not properly respondafter a period of time, or established connection failed because connected host has failed to respond
TYPE:SocketException
STACK:  at System.Net.Sockets.Socket.ReceiveFrom_nochecks_exc (System.Byte[] buf, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags flags, System.Net.EndPoint& remote_end, System.Boolean throwOnError, System.Int32& error) [0x00076] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at System.Net.Sockets.Socket.ReceiveFrom (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint& remoteEP) [0x00029] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at System.Net.Sockets.Socket.ReceiveFrom (System.Byte[] buffer, System.Net.EndPoint& remoteEP) [0x0000d] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at System.Net.Sockets.UdpClient.Receive (System.Net.IPEndPoint& remoteEP) [0x00014] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at TS3Client.Full.PacketHandler.FetchPacket () [0x000af] in <423360fa41334eb8862aba22f08b665b>:0 
  at TS3Client.Full.Ts3FullClient.NetworkLoop () [0x00010] in <423360fa41334eb8862aba22f08b665b>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00017] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00031] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in <8f2c484307284b51944a1a13a14c0266>:0 
[10:33:43]  Error: MSG: Cannot access a disposed object.
Object name: 'System.Net.Sockets.UdpClient'.
TYPE:ObjectDisposedException
STACK:  at System.Net.Sockets.UdpClient.CheckDisposed () [0x00016] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at System.Net.Sockets.UdpClient.Send (System.Byte[] dgram, System.Int32 bytes) [0x00000] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at TS3Client.Full.PacketHandler.SendRaw (TS3Client.Full.OutgoingPacket packet) [0x0001d] in <423360fa41334eb8862aba22f08b665b>:0 
  at TS3Client.Full.PacketHandler.ResendLoop () [0x000cf] in <423360fa41334eb8862aba22f08b665b>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00017] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00031] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in <8f2c484307284b51944a1a13a14c0266>:0 

@Splamy
Copy link
Owner

Splamy commented Oct 22, 2017

I have upgaded the db library the bot uses to V4 which claims to have solved all transaction bugs.
I hope that this bug will not happen again. If the old corrupted history file is still present remove it once.
If the error happens again just open another issue.

@Splamy Splamy closed this as completed Oct 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants