becvert/cordova-plugin-websocket-server

[iOS] PSWebSocketServer SIGTRAP exception

asa47 opened this issue · 6 comments

asa47 commented

Hello,

I am receiving some crash logs, and I would like to investigate the issues. The following is the crash summary:

LOCATION: PSWebSocketServer.m line 770 in [PSWebSocketServer dealloc]
EXCEPTION: SIGTRAP

The PSWebSocketServer.m file is not present in the project, so I am struggling to identify the cause of the error. I am assuming that the file is generated during compilation from the WebSocketServer.swift.

Any advice?
Kind Regards

Hello,
I just made my fork of PocketSocket public.
You'll find what you want there.
I build libPocketSocket.a from that.
Good luck.
Regards

asa47 commented

Thanks for the reply.

One more question, how can I generate the libPocketSocket.a from the project? Do I need a script in the Build Phase, or can it be done automatically by Xcode?

Kind Regards

I just run build-pocket-socket.sh in a shell.

asa47 commented

Thanks, I have been able to narrow down the cause of the issue, even thought I am still not completely sure on how to solve it.

I can replicate the exception by closing the app.

Basically if the app-server is connected to one or more client devices, and we close the app (by swiping up); it triggers the SIGTRAP exception in the background, which can be located at line 770 in the PSWebSocketServer.m:

- (void)dealloc { [self executeWorkAndWait:^{ [self disconnect:YES]; }]; } }

It does not seem to be a "serious" issue, but please let me know and is it advisable to comment the [self disconnect:YES]; line? Or shall I leave it?

Kind Regards

Honestly I don't know what's best.
It's just in the logs, isn't it? the user does not see the app crash?
Maybe you could ask zwopple/PocketSocket/issues

Closing old issue. Feel free to reopen.