Solved

Strange Hanging Condition

Posted on 2011-09-12
10
308 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: 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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

689 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