Results 1 to 8 of 8

Hybrid View

  1. #1
    Member
    Join Date
    May 2010
    Location
    Pisa
    Posts
    10

    Silverlight client hanged when closing the browser window

    Hi,

    When I try to quit my silverlight client by closing the browser window, the browser process remains hang. It looks like that some internal trheads spawned by the Lightstreamer API are preventing the process from closing.

    Please find attached the results of the analysis I carried out so far.
    If you could help me sorting this issue out it would be great.

    Thank you,
    Emilio Bova
    Attached Files Attached Files

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    The WaitOne calls in which the reported threads are stuck are supposed to have a short life. The involved monitor is used to wait for the outcome of a connection attempt and it is released after the connection attempt has completed with either success or failure.

    When I try keeping the response blocked on the Server and closing the browser, it still closes immediately, though the process remains alive for a few seconds more.
    Is that the issue you are reporting or, in your case, does the browser stay alive forever?
    Otherwise, may you please help us replicating the issue?

  3. #3
    Member
    Join Date
    May 2010
    Location
    Pisa
    Posts
    10
    Hi,

    Unfortunately the browser seems to stay alive forever. I've tried both with Firefox 3.6.3 and IE 8 (v 8.0.7600.16385) running my client on Silverlight 4, with the same result: the browser window closes, but the process remains there and I'm forced to kill it.

    What would you require from my side to help you going on with the investigation?

    Thanks,
    Emilio

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    Please reproduce the following test:
    1. launch a new instance of IE8 (v 8.0.7600.16385)
    2. open the online Silverlight demo http://www.lightstreamer.com/demo/Si..._StockListDemo through the address bar
    3. activate the demo fully, through the subscribe button
    4. close the browser


    I see that two iexplore processes are created after step 1, then no more.
    After step 4, the two processes disappear.
    Do you notice the same?
    If not, is there any other sequence of actions that triggers the issue (preferably based on the online demo)?
    (I'm using windows 7 with Silverlight 4)

  5. #5
    Member
    Join Date
    May 2010
    Location
    Pisa
    Posts
    10
    I already tried that here (same configuration Win7+ SL4) both with the online version and a version hosted by my local Lightstreamer server and in those cases the browser did shut gracefully down after a very short while, as you described.

    My client looks actually like the SL demo, but there is a substantial difference: I've put together a mechanism that automatically reconnects to the Lightstreamer server in case the connection is lost (basically by attempting a reconnection in a while if the previous connection attempt failed or an existing connection is dropped).

    Please look at the file I attached to my first post. I believe that the only object that can keep a connection to a LS server alive is the LSClient class: is that correct?. In my case, I have two instances of LSClient that have strong reference. The one I suspect to be the culprit of the issue is actually alive only on the stack of a "SessionActivitymanager" thread (thread 43 in the report), while the other one is kept alive on another "SessionActivitymanager" thread (thread 45). No other threads - notably, application threads or background threads explicitly spawned by my application - are referencing any LSClient class.

    What I imagine is that, for some reason, the fact that two LSClient are actually instanced prevents somehow those threads from shutting down.

    Can you confirm this?

    Coming to your question
    > If not, is there any other sequence of actions that triggers the issue (preferably based on the online demo)?
    I have not been able to identify yet a specific sequence of actions. It would seem that establishing a connection to a Lightstreamer server is enough to trigger that behaviour, but I do not have yet a specific sequence.

    Please let me know your findings or if you would like me to perform more specific tests.

    Thank you,
    Emilio

    PS
    Should this analysis fail to yield results, might I propose to enhance the LSClient class with a "Dispose" or "Shutdown" method which would abort the service threads and release the resources? Or to provide an option to have SL API spawn "background" threads, that do not keep a process alive when exiting?

  6. #6
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    Ok; if we had the opportunity to replicate the issue it would be easier.
    Anyway, you are right and there are a couple of fixes that we can do to improve the management of the internal threads.

    There is a caveat, though:
    The thread involved in your thread dump, i.e. the thread which dequeues data from streaming connections (or waits for data on long polling connections) cannot be declared as a background thread,
    because, during the normal session activity, it is possible that this thread is the only one active.

    For now, we need that you try to replicate the issue with a test version of the Silverlight library, which we will be sending you privately.

 

 

Similar Threads

  1. FF9 redirect to a new blank window
    By cara713 in forum Client SDKs
    Replies: 1
    Last Post: January 13th, 2012, 08:54 AM
  2. Silverlight Client Connection problem in IE
    By kkrisjoy in forum Client SDKs
    Replies: 7
    Last Post: December 17th, 2010, 09:30 AM
  3. Disable Window Status
    By chuan_ckc in forum Client SDKs
    Replies: 7
    Last Post: December 17th, 2009, 10:15 AM
  4. No Updated on Silverlight Client
    By gjoseph in forum Client SDKs
    Replies: 1
    Last Post: November 13th, 2009, 11:14 AM
  5. IE8 shows a small window
    By markgoldin in forum Client SDKs
    Replies: 5
    Last Post: September 26th, 2008, 11:28 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 01:13 AM.