Solved

Strange Hanging Condition

Posted on 2011-09-12
10
303 Views
Last Modified: 2012-05-12
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!
0
Comment
Question by:surfbored
  • 6
  • 3
10 Comments
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 36526528
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
 
LVL 25

Expert Comment

by:epasquier
ID: 36526542
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
 
LVL 25

Expert Comment

by:epasquier
ID: 36526557
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:surfbored
ID: 36526593
@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
 
LVL 25

Expert Comment

by:epasquier
ID: 36526609
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
 
LVL 25

Expert Comment

by:epasquier
ID: 36526618
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
 
LVL 1

Author Comment

by:surfbored
ID: 36531361
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
 
LVL 25

Expert Comment

by:epasquier
ID: 36531535
yes, with media files, and the windows thumbnail preview feature enabled (doesn't have to be displayed, windows update it anyway)
0
 
LVL 25

Accepted Solution

by:
epasquier earned 500 total points
ID: 36531565
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
 
LVL 1

Author Closing Comment

by:surfbored
ID: 36532587
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question