EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Windows Phone 7 - Tombstoning issue

Posted: 03/19/2012 13:52:56
by Martin Plante (Basic support level)
Joined: 01/15/2012
Posts: 10


We have an issue on Windows Phone 7 with tombstoning/deactivating (when the application is interrupted by another event, and when the operating system decides to halt a deactivated application).

When the FTP component is downloading or uploading and the application is deactivated, we want to halt the current transfer and save where we were at. We tried calling, Abort, forcing a close of the control connection, or simply setting the OnProgress' Cancel parameter to true, we always end up in the same situation. We can see exceptions being raised under the "DownloadStream" method, but the method doesn't return. It blocks inside TElSocket.SLPendingReceiveClearedm which is waiting on FRecvDoneFlag.

Our first guess was that the main thread wasn't waiting for completion long enough, but if we wait ourself on an EventWaitHandle, nothing completes. It seems the TElSocket isn't "informed" of being aborted, or at least FRecvDoneFlag isn't set, or depends on the main dispatcher thread.

I'm trying to reproduce this in a smaller project, but does this ring any bell, and is there a way to make sure a transfer is interrupted on deactivation?

Thank you.
Posted: 03/19/2012 14:20:39
by Martin Plante (Basic support level)
Joined: 01/15/2012
Posts: 10

I have a simple WP7 sample application that tries to abort the current transfer on deactivation, that reproduces the blocked wait. I can provide you with a zip file upon request.
Posted: 03/19/2012 14:40:26
by Ken Ivanov (Team)

Thank you very much for reporting the problem. In fact, I've been writing a question wondering whether you have some sample that could be used to reproduce the issue when your second message arrived. It's brilliant that you have one. Could you please create a ticket in the Helpdesk and post it there?



Topic viewed 1290 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!