Strange Hanging Condition

This is a weird one, as I don't think it has anything to do with the code I'm using per se.

I'm in the middle of a very simple Delphi project, it just uses the file open dialog, makes a couple of changes to the file and then saves it.

Recently I started seeing a problem right after the file dialog is called. After the dialog closes (with or without selecting a file), the program hangs for 15-20 seconds. This hang happens while debugging and after creating/running the EXE.

Here's the tricky part. If I move the EXE to another PC, it doesn't hang.

It seems likely that some other program is conflicting with my program, but I'm not sure what it might be since I haven't made any changes recently (that I recall!). Before I go through disabling everything one at a time, I thought I'd check with the experts here.

Have you seen this kind of thing before? Any ideas how I might track down the culprit? I'm assigning a full 500 points, since this one is so weird. Thanks!
LVL 1
surfboredAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
epasquierConnect With a Mentor Commented:
Beside, the process to show the thumbnail preview may slow down the file listing process when opening folder with video files. Beside, the preview on no codec or corrupted movie or video clip (i.e. no index from a partial download) may cause system problems such as Windows XP stops responding or freezing with 100% CPU utilization, and prevent users from deleting, renaming or moving the file until the file is completely loaded.

http://www.mydigitallife.info/how-to-enable-or-disable-media-and-video-thumbnail-preview-in-windows-xp/
0
 
Geert GruwezOracle dbaCommented:
virusscanner ?
how to track ? this has a log of what was scanned.
> check the settings of the virusscanner to find where this log is written and check the contents
McAffee > check environment variable %DEFLOGDIR%
0
 
epasquierCommented:
Yeah, I think I have seen this. But only when running the application from Delphi IDE, and only with recent Delphi (2007 or XE, don't remember which) and never when run normally, so I didn't take that seriously.

Are you sure you have the problem when you run outside Delphi ? Which Delphi version ? Which OS ?
0
[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

 
epasquierCommented:
and yes, it's possible a virus scanner was involved at the time. Can't say for sure it's related, but at the time I saw that problem, I remember changing a few time the virus scanner on my system. I tried AVG, Avira and probably a third one I don't remember. None of those where satisfying IMO, so I went to Avast, and since then I'm happy. But I really haven't make any relationship between Antivirus & that problem.
0
 
surfboredAuthor Commented:
@Geert Gruwez: Virus scanner was my first thought too, but there isn't anything strange in the logs.

@epasquier: I'm running Delphi XE on Windows XP. I'm sure it happens outside Delphi, but only with this one EXE. I have other projects that use virtually identical code and they do not give the same results.

Thanks for the ideas. Got any more?
0
 
epasquierCommented:
I'm afraid we are already doing guesswork here... that looks like just another fluke like so many others.
God, I love computers and software :o)
0
 
epasquierCommented:
that's a long shot, and I found that rarely useful because of the amount of information that it gives, but have you tried ProcessExplorer or ProcessMonitor for MS sysinternals suite ?
http://technet.microsoft.com/fr-fr/sysinternals
0
 
surfboredAuthor Commented:
I tried using ProcessMonitor in the past and found it difficult to use effectively, but I'll give it a go again if nothing else turns up.

After more trial and error, I discovered something that makes a difference in the results. I have a very large file (300MB) in the same folder as my target files. When I move this file to a different location, the hang goes away!

This seems odd to me, since the large file isn't being used in any way. Perhaps it's a goofy Windows thing? Has anyone else experienced this before?
0
 
epasquierCommented:
yes, with media files, and the windows thumbnail preview feature enabled (doesn't have to be displayed, windows update it anyway)
0
 
surfboredAuthor Commented:
Just knowing that the problem is not in the code is good enough for me, but you went that extra mile to prove your point. Thanks for sticking it through to the end.
0
All Courses

From novice to tech pro — start learning today.