MPEG files in directory cause Explorer.exe to use 50% or 100% CPU

  • Thread starter James from Canberra
  • Start date
J

James from Canberra

My PC was showing Explorer using 50 percent or 100 percent CPU usage for
hours, even though th PC was doing nothing.

I've found various threads on the Internet on how to stop Explorer in XP
going to 50% or 100% CPU usage if it finds a big AVI file. I'm assuming it
also happens for MPG files too because that's what happened to me. The
(probably non-Microsoft approved) fix is to change or delete the Default
value for HKey_Classes_Root\SystemFileAssociations\.AVI\Shellex\Property
Handler.

I don't have a Default value in the Registry for MPG or MPEG files so
apparently I shouldn't still have the problem. But I do.

My "My Videos" folder contained 2 .MPG files, one 3.6GB and one 4.9GB.
Whenever I displayed the contents of the folder, Explorer.exe used 50% of the
CPU usage. If I try to do anything else with the directory, the other
program may use the other 50%. I haven't done much checking on the second
program issue, but I know it happens with Explorer. I've left it running
many times in case it was looking for something in the files, but CPU usage
stayed high for literally hours. I always ended up restarting the PC.

Note that I'm NOT right-clicking on the files. I'm just displaying them.

Displaying the files in a MS Office 2007 Open File Dialog does not cause
problems. Displaying the files in the Open File dialog of VideoRedo TV Suite
(a video editing suite) also has the problem. Explorer and VideoRedo both
use 50% each.

I 'fixed' the problem for myself by deleting the two files. Now my machine
runs well again. It was a very nasty week though. I spent a lot of time
searching for the cause of the problem. Now I know most people can fix it by
disabling some of the XP functionality. That seems to be the wrong way to go
about it though.

If this is a problem for many people, why is it still there? If Explorer
has a problem with a file, surely it shouldn't use huge amounts of CPU time
for long periods of time. Why doesn't it give up? It's affecting the
usability of the PC and, worse, may make people think they have a virus or a
hopelessly corrupted system. I know I did.

If it's a problem just waiting to happen for everyone, can we ask Microsoft
to correct it?

Does anyone else get this problem?

XP Pro SP3
2GB Memory
Intel 6400 dual core
4 hard disks

Thanks

James
 
J

James from Canberra

I'm pretty sure it isn't. I've got Trend running and it does regular scans.

I just did a Google search on
HKey_Classes_Root\SystemFileAssociations\.AVI\Shellex\PropertyHandler and it
found this on the Microsoft site with a reply by Kelly.
http://www.microsoft.com/communitie...86-995c-dde4eaaae10e&cat=&lang=&cr=&sloc=&p=1
It showed a link to a Microsoft Help and Support Document
http://support.microsoft.com/Default.aspx?kbid=822430 that says

This problem occurs because Windows scans the large AVI file when you click
it in Windows Explorer. When you click a large AVI file (for example, when
you click a 700-megabyte [MB] AVI file) in Windows Explorer, Windows tries to
query the index of the file. If there is no index information in the file,
Windows performs a loop to check all portions of the file to build the index.
Because of the large size of the AVI file (in this example, 700 MB), it takes
a long time for Windows to scan the whole file. Because of this behavior, the
CPU usage of the Explorer.exe process reaches 100 percent.

I didn't find it when I used the Microsoft search because I was looking for
info on MPEGs, not AVIs.

Microsoft provide a hotfix for AVIs
Product Language Platform Release File name Version Build
File size (bytes) Modified date

Windows XP English x86 sp2 PKG47598 WxP 2600 502849 10/24/2003 7:13:03
AM

The Hotfix page says: Hotfixes are included in subsequent service packs that
are safer to install through Microsoft Update.

Doesn't that mean it should have been corrected in SP3? Or does that only
apply to AVIs, not MPEG files?
 
L

Leonard Grey

I have multi-gigabyte AVIs on my computer (wedding videos - don't ask)
and Windows Explorer does not use up CPU cycles in those folders -
before or after SP 3. So I guess there's nothing more I can offer you.
Sorry.
 
J

James from Canberra

Thanks Leonard. Yours are probably well formed AVIs with valid indexes etc.

Today I found an old posting on
http://www.moviecodec.com/topics/3588p13.html which quoted
www.tweakxp.com/tweak2123.aspx, saying

“Windows XP Explorer has a 'feature' to provide a preview in the Details
box on the left of the file you have selected, if it’s supported. Image
files, HTML pages, video clips, MP3s, etc are all previewed (even with the
folder view open).
If you have a large movie clip and it either is corrupt (ie. no index from a
partial download) or it uses an unsupported codec, then Explorer tries to
load the whole file. This can slow your computer a lot and prevent
deleting/renaming/moving/etc the file until it’s finished." It then goes on
to suggest unregistering shimgvw.dll and shmedia.dll which seemed a little
drastic. I don't know what they do and what side-effects it could cause.

I took a suggestion from further down the thread and changed the "View -
Thumbnail" option in Explorer to "View - Icons" for that directory. This
stopped the problem happening, so I'm **very** happy. I don't have problems
playing other MPEGS, so it isn't likely to be a codec problem. It seems my
MPEGs don't have indexes or might be corrupt, so I'll contact the software
company that wrote the program I used to create the MPEG files.

That gives **me** and anyone else who finds this thread a work-around, but
still doesn't explain why Explorer behaves this way and could cause problems
for many other users who may not have the days needed to scour the Internet
for a work-around. Note, I'm not saying all users, because I can replicate
the problem on my desktop and laptop (both XP Pro SP3, but not on my kids
machine which is XP Home SP3 - which may or may not be a coincidence).

How can a bug report be submitted to Microsoft?

Regards

James
 
A

Alister

Thanks Leonard.  Yours are probably well formed AVIs with valid indexesetc.

Today I found an old posting onhttp://www.moviecodec.com/topics/3588p13.htmlwhich quotedwww.tweakxp.com/tweak2123.aspx, saying

 “Windows XP Explorer has a 'feature' to provide a preview in the Details
box on the left of the file you have selected, if it’s supported. Image
files, HTML pages, video clips, MP3s, etc are all previewed (even with the
folder view open).
If you have a large movie clip and it either is corrupt (ie. no index from a
partial download) or it uses an unsupported codec, then Explorer tries to
load the whole file. This can slow your computer a lot and prevent
deleting/renaming/moving/etc the file until it’s finished."  It then goes on
to suggest unregistering shimgvw.dll and shmedia.dll which seemed a little
drastic.  I don't know what they do and what side-effects it could cause.

I took a suggestion from further down the thread and changed the "View -
Thumbnail" option in Explorer to "View - Icons" for that directory.  This
stopped the problem happening, so I'm **very** happy.  I don't have problems
playing other MPEGS, so it isn't likely to be a codec problem.  It seems my
MPEGs don't have indexes or might be corrupt, so I'll contact the software
company that wrote the program I used to create the MPEG files.

That gives **me** and anyone else who finds this thread a work-around, but
still doesn't explain why Explorer behaves this way and could cause problems
for many other users who may not have the days needed to scour the Internet
for a work-around.  Note, I'm not saying all users, because I can replicate
the problem on my desktop and laptop (both XP Pro SP3, but not on my kids
machine which is XP Home SP3 - which may or may not be a coincidence).

How can a bug report be submitted to Microsoft?

Regards

James

I hate to say this, but it is a feature, not a bug!!!

If a user chooses thumbnail view in a folder containing video files,
then Explorer reads the file and tries to display the first frame of
video as an image in the thumbnail. This is by design. Should it
encounter a corrupt file then it will spend some time trying to do
what the user asked, but it will eventually timeout.

Of course, if you have a folder with tens of video files then even if
none are corrupt it will take quite some time to read them all and
display the thumbnails. This is exactly the same behaviour as you
would see if the folder contained a large number of large image files,
jpegs from a digital camera for example. Whilst explorer is trying to
read each file and display the thumbnail, it will use the CPU
intensively, and on a single CPU it may appear to lock up, as there
are no spare processor cycles to update the display or respond to
mouse and keyboard inputs.

However it will eventually reach the end of the files and start
responding again.

If you don't want this to happen, don't use thumbnail view.

Alister
 
J

James from Canberra

Alister,

I don't argue that it's a feature - and a very useful one. I just think it
isn't working the way it was intended to, and users will have to understand
the cause before thay can find the fix, which is too complicated and time
consuming for the average user. Try Googling for it and see what I mean.

To test your statement I left my system running overnight. After 8 hours 30
minutes, Explorer was still using 50% of my CPU. There's only one file in
the folder, and it's 4.9GB. I think any reasonable user would expect
Explorer to have finished its inspection of the file in that time, and
certainly to have timed out.

Then I clicked on the X on the top-right of the Explorer window. The window
closed, but Explorer continues to use 50% of my CPU. I don't think it's a
slow shutdown of the application because it's been 30 minutes so far. From
experience a Restart is the best and quickest option.

The thumbnail is the default view for video files. That means some users
with corrupt MPEG files will have this same problem. It will be up to them
to individually find a solution to the high CPU usage.

That doesn't seem reasonable, so I think it's worth alerting Microsoft.
 
A

Alister

Alister,

I don't argue that it's a feature - and a very useful one.  I just think it
isn't working the way it was intended to, and users will have to understand
the cause before thay can find the fix, which is too complicated and time
consuming for the average user.  Try Googling for it and see what I mean.

To test your statement I left my system running overnight.  After 8 hours 30
minutes, Explorer was still using 50% of my CPU.  There's only one filein
the folder, and it's 4.9GB.  I think any reasonable user would expect
Explorer to have finished its inspection of the file in that time, and
certainly to have timed out.

Then I clicked on the X on the top-right of the Explorer window.  The window
closed, but Explorer continues to use 50% of my CPU.  I don't think it's a
slow shutdown of the application because it's been 30 minutes so far.  From
experience a Restart is the best and quickest option.

The thumbnail is the default view for video files.  That means some users
with corrupt MPEG files will have this same problem.  It will be up to them
to individually find a solution to the high CPU usage.  

That doesn't seem reasonable, so I think it's worth alerting Microsoft.  

Hi James,

Thanks for explaining in more detail, I agree that what you are
describing is not normal behaviour.
I think it would be worth you trying to identify exactly what the
cause is, and in all honesty I doubt whether Microsoft will do
anything about it now as XP is no longer their currently supported
operating system.

I wonder if you would try unregistering shimgvw.dll and shmedia.dll as
you mentioned in an earlier post, and then trying to view the file
again.

It is a simple process - easily reversed, so little chance of damage.

To unregister a dll go to the run command (Window key and R) and type
in regsvr32 /u shimgvw.dll and press enter, then repeat and type
regsvr32 /u shmedia.dll

When you have done that try browsing to the folder with the video file
and see if you get the same issue with explorer.

To re-register the dll's go to the run command and type regsvr32
shimgvw.dll and press enter, and then repeat and type regsvr32
shmedia.dll

Alister
 
J

James from Canberra

Hi James,

Thanks for explaining in more detail, I agree that what you are
describing is not normal behaviour.
I think it would be worth you trying to identify exactly what the
cause is, and in all honesty I doubt whether Microsoft will do
anything about it now as XP is no longer their currently supported
operating system.

I wonder if you would try unregistering shimgvw.dll and shmedia.dll as
you mentioned in an earlier post, and then trying to view the file
again.

It is a simple process - easily reversed, so little chance of damage.

To unregister a dll go to the run command (Window key and R) and type
in regsvr32 /u shimgvw.dll and press enter, then repeat and type
regsvr32 /u shmedia.dll

When you have done that try browsing to the folder with the video file
and see if you get the same issue with explorer.

To re-register the dll's go to the run command and type regsvr32
shimgvw.dll and press enter, and then repeat and type regsvr32
shmedia.dll

Alister
Thanks Alister

OK. I just tried that, and shmedia.dll is the problem. shimgvw.dll by
itself was not a problem. Both are now re-registered.

I also tried to view the folder on another couple of computers. Of 3 XP Pro
SP3 and 4 XP Home SP3 machines (including a clean install of XP Pro SP3),
only my XP Pro SP3 PC and XP Pro SP3 laptop have the problem (ie 2 out of 7).
It obviously isn't as widespread as I thought.

I'm still interested in tracking down the cause though.
 
A

Alister

Thanks Alister

OK.  I just tried that, and shmedia.dll is the problem.  shimgvw.dll by
itself was not a problem. Both are now re-registered.

I also tried to view the folder on another couple of computers.  Of 3 XP Pro
SP3 and 4 XP Home SP3 machines (including a clean install of XP Pro SP3),
only my XP Pro SP3 PC and XP Pro SP3 laptop have the problem (ie 2 out of7).
 It obviously isn't as widespread as I thought.

I'm still interested in tracking down the cause though.  

You could try comparing the file dates and sizes for shmedia.dll on
each of the machines, to see if you have a different version on the
problem ones for some reason.

It is possible that some piece of installed software has replaced the
correct version with a broken one.

Alister
 
J

James from Canberra

They're all the same version - V6.0.2900.5512, but I went to Safe mode,
unregistered it, renamed the files in System32 and DLLCache and copied in a
version from a machine that didn't have the problem. I then reregistered it
and rebooted.

The problem remains - maybe it's a configuration issue, or another file that
shmedia.dll calls.

Is there an easy to find out if shmedia.dll calls any routines outside itself?

Thanks

James
 
J

James from Canberra

OK. Here's the answer, and how I found it.
I downloaded "Windows XP Video Decoder Checkup Utility", a tool from
Microsoft that showed all the DirectShow Filters. I then uninstalled all
programs that used those filters. No difference.
I downloaded Process Explorer, again from Microsoft (thanks guys), and
checked the thread that was using the 50%. It showed
ntdll.dll!RtlAllocateHeap+0x18c. I have no idea what that means but googling
it mentions memory leaks. I have no idea if that's correct or not.

Anyway, I selected the option to display DLLs in the lower pane and saw
TsDmux.ax, a MPEG2 codec. It came from a program supplied with my Wintel
PVR, called PVR_Player.exe. I uninstalled PVR_Player.exe and the problem is
now gone. All fixed!

Apologies if I've given 'too much' detail, but this site is indexed by
Google, so others with the same problem might find the answer.

I've advised the supplier of the software so hopefully the problem will be
corrected.

Thanks for your help everyone.

James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top