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

websocket-related crash #83

Open
VladimirAkopyan opened this issue Oct 5, 2017 · 3 comments
Open

websocket-related crash #83

VladimirAkopyan opened this issue Oct 5, 2017 · 3 comments
Labels
Milestone

Comments

@VladimirAkopyan
Copy link
Member

The app on the tablet crashes sometimes while publishing data, happens every 10 hours or so.
The stack-trace form the store says it's related to the web-socket class, which is entirely feasible.
stackTrace.txt

@VladimirAkopyan VladimirAkopyan added this to the Backlog milestone Oct 5, 2017
@VladimirAkopyan
Copy link
Member Author

Example of crash from the Tablet, compiled to native
Log-171007-222244395.zip

@VladimirAkopyan VladimirAkopyan modified the milestones: Backlog, 1.8 Oct 8, 2017
@VladimirAkopyan
Copy link
Member Author

Found the bug, by running the app in Visual Studio for a long time:
Crash report:

   at Windows.Storage.Streams.DataWriter.DetachStream()
   at Quickbird.Internet.WebSocketConnection.CleanUp()
   at Quickbird.Internet.WebSocketConnection.MessageRecieved(MessageWebSocket sender, MessageWebSocketMessageReceivedEventArgs args)

related code:

private void CleanUp()
{
	_ReconnectTimer?.Dispose();

	try
	{
		_webSocket?.Close(1000, SocketCloseMessage);
	}
	catch (Exception ex)
	{
		LoggingService.LogInfo($"Closing Websocket Failed, {ex.ToString()}", Windows.Foundation.Diagnostics.LoggingLevel.Error);
	}

	_messageWriter?.DetachStream();
	_messageWriter?.Dispose();
	_messageWriter = null;

	_webSocket?.Dispose();
	_webSocket = null;
}   

@VladimirAkopyan
Copy link
Member Author

Need to implement all the errors from https://docs.microsoft.com/en-us/uwp/api/windows.web.weberrorstatus

@VladimirAkopyan VladimirAkopyan changed the title websocket-related crash on the publishing app websocket-related crash Oct 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant