Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8623

Re: Crystal Reports 13 for VS2013 Hangs when report deployed via Clickonce

$
0
0

Hi,

 

Finally found the issue:

 

Our windows application every 20 minutes ( 1 minute in debug ) check for clickonce updates in an independent thread using CheckForDetailedUpdate method and then it sleeps.

 

public void ApplicationUpdateTimerThread()

{

  int updateInterval = applicationUpdateTimer.Interval = 1200000; // 20 mins

  if (ApplicationDataAccess.IsDebug) { updateInterval = 60000; }

  while (true)

  {

     UpdateCheckInfo updateInfo = appDeployment.CheckForDetailedUpdate();

     Thread.Sleep(updateInterval);

  }

}

 

Doing this was locking the filesystem where now Crystal is putting their temporary report files and therefore preventing file access until the thread was active again ( The reason for the 60 seconds delay )

 

So Creating a new thread to only check for update and let it die inmediately fixed the issue.

 

public void ApplicationUpdateTimerThread()

{

  int updateInterval = applicationUpdateTimer.Interval = 1200000; // 20 mins

  if (ApplicationDataAccess.IsDebug) { updateInterval = 60000; }

  while (true)

  {

  System.Threading.Thread t1 = new System.Threading.Thread (delegate()

  { UpdateCheckInfo updateInfo = appDeployment.CheckForDetailedUpdate(); });

  t1.Start();

  Thread.Sleep(updateInterval);

  }

}


Viewing all articles
Browse latest Browse all 8623

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>