Patiencer / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

Check for auto updates hangs for very long time. #255

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start PyScripter for the first time.
2. It will hang for at least a few minutes (on one computer it took longer
than I had time to wait, >1h)
3.

What is the expected output? What do you see instead?
Checking for updates.

Workaround was to copy the pyscripter.ini from an computer where I had
disabled automatic updates 

[IDE Options]
AutoCheckForUpdates=FALSE

What version of the product are you using? On what operating system?
1.9.9.2 on Windows XP. Behind corporate firewall.

Please provide any additional information below.

Original issue reported on code.google.com by fredrik....@gmail.com on 18 Nov 2008 at 7:55

GoogleCodeExporter commented 9 years ago
Does this happen when you are not connected to the Internet?

Original comment by pyscripter on 6 Dec 2008 at 4:06

GoogleCodeExporter commented 9 years ago
No, but I am behind a corporate firewall so there is no direct access to the 
internet
apart from through a proxy server. 

I had a look at the repo and see this.

{code}
  if CommandsDataModule.PyIDEOptions.AutoCheckForUpdates and
    (DaysBetween(Now, CommandsDataModule.PyIDEOptions.DateLastCheckedForUpdates) >=
      CommandsDataModule.PyIDEOptions.DaysBetweenChecks) and ConnectedToInternet
  then
    PostMessage(Handle, WM_CHECKFORUPDATES, 0, 0);
{code}

The function ConnectedToInternet probably returns true in my case but an 
attempt to
download the file would have to go through the proxy.

If there is a timeout somewhere which can be set to a low value by default. A 
way to
cancel the checking for new version is probably harder but better.

Original comment by fredrik....@gmail.com on 6 Dec 2008 at 5:39

GoogleCodeExporter commented 9 years ago
I will have a look at the timeout, but you can disable the check for updates 
using
the Tools, Options, IDE Options.

Original comment by pyscripter on 7 Dec 2008 at 1:46

GoogleCodeExporter commented 9 years ago
True, but the problem is the first time I start the application hangs. That is 
why I
found the workaround using the INI-file otherwise I could not get the 
application to
start (or start with a very long timeout).

Original comment by fredrik....@gmail.com on 7 Dec 2008 at 9:55

GoogleCodeExporter commented 9 years ago
I am using WinInet to connect to the internet with the 
INTERNET_OPEN_TYPE_PRECONFIG. 

      hNet := InternetOpen(
        'PyScripter',
        INTERNET_OPEN_TYPE_PRECONFIG,
        nil, nil, 0);

So if you set your proxy with Internet Explorer internet options the proxy 
settings
would be available to PyScripter.  Similarly the WinInet timeout options apply 
to
PyScripter as well.

The only thing I could do is to disable Check for Updates by default, but I am 
not
sure I want to do that.

Original comment by pyscripter on 22 May 2009 at 1:45

GoogleCodeExporter commented 9 years ago
I see as designed for this issue. This might be a good point to add to a FAQ.

Original comment by daniel.w...@gmail.com on 3 Jun 2011 at 5:13