NS_E_NAMESPACE_BUFFER_TOO_SMALL (0XC00D138E) Fix
Windows Media Player or Windows Media Center throws this when reading a corrupted playlist or media file. Quick fix: clear the library database.
The Quick Fix (30 seconds)
This error means Windows Media Player (or Media Center on older Windows versions) can't read a file path or playlist entry because the buffer that holds it is too small. That's geek-speak for: something in your library is corrupted, usually a shortcut to a file that doesn't exist anymore or a malformed URL.
Before you do anything else, just restart Windows Media Player by force-closing it:
- Press Ctrl + Shift + Esc to open Task Manager.
- Find Windows Media Player in the list. If it's not there, look under Background processes or Details tab for
wmplayer.exe. - Right-click it and select End task.
- Now restart WMP from the Start menu. After clicking the shortcut, you should see the player window open without any error.
Did that work? If the error pops up again when you open a specific file or playlist, move to the moderate fix below. If it doesn't come back at all, you're done — the restart cleared a temporary glitch.
The Moderate Fix (5 minutes)
Still seeing the error? The real culprit is almost always a corrupted playlist file or a media entry in your library that points to a deleted or moved folder. Let's clear out the garbage.
Step 1: Find and delete bad playlists
You probably have a playlist that's trying to load a file that doesn't exist anymore. Here's how to nuke them all at once:
- Close Windows Media Player completely (use the Task Manager trick above if needed).
- Press Windows + R, type
%userprofile%\Music\Playlists, and hit Enter. This opens your personal playlists folder. - Inside, you'll see a bunch of
.wplfiles. Delete any playlists you don't care about — or move them all to a temp folder on your desktop. You can always drag them back later if needed. - Also check
%userprofile%\Videos\Playlistsif you use Media Center for videos. - Restart Windows Media Player. After it loads, you should no longer see the error. If you do, move on to Step 2.
Step 2: Reset the media library database
This is where I've seen the fix work 9 times out of 10. Windows Media Player keeps its library index in a hidden database. When that database gets a bad entry — like a network drive that disconnected or a file that was renamed — it throws this exact error. Wiping the database forces WMP to rebuild it cleanly.
- Close WMP again.
- Press Windows + R, type
%LOCALAPPDATA%\Microsoft\Media Player, and press Enter. - You'll see several files with names like
CurrentDatabase_372.wmdbandwmdb*.wmdb. Select them all (Ctrl+A) and delete them. Don't worry — this doesn't delete your actual music or video files. It only wipes the database index. - Restart WMP. The first time it opens, it will say "Building library..." and scan your default Music and Videos folders. This takes 30 seconds to a minute depending on how many files you have.
- After the scan finishes, the error should be gone. If you still see it, you've got a deeper problem — time for the advanced fix.
Pro tip: If you had custom playlists saved in WMP, they'll be gone after this. Copy your
.wplplaylist files to a safe spot first if you want to keep them.
The Advanced Fix (15+ minutes)
This one's for when the error shows up only when you try to open a specific file — like a downloaded video or a CD rip that went wrong. The file itself is corrupted, and WMP can't load its metadata into the buffer.
Step 1: Identify the bad file
The error message usually doesn't tell you which file is causing the problem. But you can narrow it down:
- If the error pops up immediately when you start WMP, it's probably the last file you played. Check your Recently added or Now Playing list.
- If it pops up when you double-click a file, that file is the culprit.
- If it pops up while WMP is scanning a folder, move that folder's contents out one by one until the error stops. When it stops, the last file you moved is the bad one.
Once you've found the file, right-click it in File Explorer and select Properties. Look at the Details tab. If you see garbage characters or blank fields where you expect artist/album/title, the file's metadata is corrupt.
Step 2: Fix or trash the file
You have two choices here — both work, but I recommend the second one because it's faster:
- Option A: Re-download the file or re-rip the CD. This is the cleanest fix.
- Option B: Use a tool like MP3tag (free, from mp3tag.de) to strip and rebuild the metadata. Open the file in MP3tag, select all tags, and delete them. Then add new, clean tags manually. Save and try playing in WMP again.
If you'd rather not bother, just delete the file. WMP will stop complaining the next time you start it.
Step 3: Registry cleanup (last resort)
I've only seen this needed once, and it was on a Windows 7 machine. But if you're still stuck and the error appears even after deleting the library database, check this registry key:
HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer\Player\RecentFileList
- Press Windows + R, type
regedit, and press Enter. - Paste that path into the address bar at the top of Registry Editor and press Enter.
- On the right, you'll see a list of MRU (Most Recently Used) entries. Delete any that point to files you've already removed.
- Close Registry Editor and restart WMP.
If it still fails after all this, you're probably dealing with a damaged Windows Media Player installation. Run sfc /scannow from an elevated Command Prompt to check for system file corruption, or reinstall WMP via Turn Windows features on or off in Control Panel.
Was this solution helpful?