clsid2 / mpc-hc

Media Player Classic
GNU General Public License v3.0
10.91k stars 488 forks source link

"DX9AllocatorPresenter failed D3DERR_NOTAVAILABLE" then system bootloops beyond repair. #1060

Closed Disappeaer closed 3 years ago

Disappeaer commented 3 years ago

Hello there. It's the second time within the first year of my new PC that I am running into this ghastly, unrepairable Windows 10 BSOD / bootloop which appears to be somehow (at least to some degree) connected with MPC-HC. I am saying this, because both times, it all started after playing a seemingly random video with MPC-HC. The circumstances were pretty similar in both cases, but I think I should mention as much details as possible.

Bootloop 1, a few months ago: The "random video" was a .ts recording, stored on a Sandisk micro sd card, connected via a micro sd external usb adapter. I record TV programs using a DVBT-T2 receiver in .ts format, then edit them on PC or simply view them with video players (includ. MPC-HC), usually with no problems, meaning it was not the first time I did that. Upon launching it with MPC-HC, the message "DX9AllocatorPresenter failed D3DERR_NOTAVAILABLE" appeared and I remember the video being flipped upside down (I can't recall if sound was playing or not). Interestingly, the system didn't instantly BSODed so I didn't even realize something was (seriously) wrong. On the very next boot though, a little later, Windows failed to boot, "CRITICAL DEVICE FAILED" message (unfortunately there was no code) appeared, then I am stuck in a dreaded bootloop limbo where no safe mode, disabling driver signature enforcement or other advanced startup setting or typical cmd line wizardry (fixboot/dism etc.) was able to do anything about it. Fortunately, "System Restore" came to rescue back then, and I was able to recover my system to a previously working state.

Being 100% honest, I've started being a bit hesitant to keep using MPC-HC, so because of this (and also because of the minor annoyance of MPC-HC momentarily pausing when seeking around .ts videos - if not remuxed into .mp4 or .mkv that is), I've also started using GOM Player as my main player but still kept using MPC-HC now and then (as a secondary player), mainly while connecting my PC to my TV via HDMI to watch x265/10 bit encoded movies (it works really well with an android remote control app, which is convenient) and because well... it's the player I've learnt to love through the years.

Bootloop 2, a week ago. This time I had demuxed a .mkv, downloaded off youtube (stored locally on my hard drive) into elementary H.264 and .wav streams using Videoredo and the idea was remux the elementary H.264 with another .wav with Mkvtoolnix or Videoredo etc. But first, I wanted to load the video in a player then load the .wav file stream separately, so I test audio/video sync, adjust the audio accordingly, then note down how many ms I need to add or subtract, so I set the right sync on Mkvtoolnix later. I've opened the H.264 stream with Gom Player and I wasn't able to find a "load external audio stream option" (as I wasn't able to find it one on MPC-HC, but this is not our problem). It didn't show any error messages though. So I thought I'd give MPC-HC a go. Upon opening it, the "DX9AllocatorPresenter failed D3DERR_NOTAVAILABLE" showed up once more (this time without the video being upside down). I said to myself: "Uh oh", because I knew what that meant... So I've rebooted my system and... sure enough... I was facing the exact same bootloop... Only this time, not even "System Restore" or even "Reset this PC" was able to save me (they both failed) and I was left with no choice but to reinstall Windows...

Now, I don't believe in recurring coincidences and I am sure you understand how why I suspect that MPC-HC might (at least partially) be responsible for my bootloops. But I am not here to point fingers or accuse by any means, so please don't see it like that. I am here hoping you (or anyone else really) can help me understand what's happening, why it does, how could I possibly escape the bootloop when that happened and of course, most importantly, what should I do to make perfectly sure this isn't happening ever again. It's been driving me nuts, to the point I am this close of trying to setup a Virtual Machine and try to replicate the problem, hoping I finally understand the reason. Would you advise that btw or since, AFAIK VSs use the host machine hardware, in case MPC-HC or something else cause a corrupt video driver for example, it's pretty likely this will cause bootloops to my main OS anyway, rendering the VM experiment useless or even dangerous? It is really painful having to install so many audio production and video editing programs and plugins, plus setup various things on Windows 10 all over again... In fact, I am hesitant to do that, before I find out what went wrong, so I make sure my system/installation is stable enough and know how to prevent that from happening ever again. Then I can install my programs, create a system image with Macrium Reflect (lesson learnt) and, hopefully, even keep using MPC-HC without being afraid that sooner or later it will bite me again.

When I've posted about my issue on a forum a guy asked me: "Well, why you keep using MPC-HC then?". The question (and answer?) seems simple enough and I get why this person probably thinks I am a fool for keep using a program who might be responsible for such a serious issue, but the truth is I really want to get to the bottom of this. I could be way off, and surely you should know better, but to me, it looks like those two times MPC-HC was asked to play two files that for some reason didn't like and for whatever reason corrupted something on my system (most likely the video card driver) which Windows didn't like at all ,to the point they could not possibly recover...

I think it's also important to mention that when it comes to Bootloop #2, I do remember installing the K-Lite Codec Pack a could of days ago (latest version, from the legit, official site of course: https://codecguide.com/download_kl.htm) which I suspect it might also be (partially or even fully?) responsible for my issues. Why did I install it? Because Gom Player was complaining about not being able to play AC3 or AAC (I don't remember which one to be honest) with some .mkv movies AND because I wanted to give MadVR a go with MPC-HC, since everyone seems to love it. Had I installed K-Lite Codec Pack back then, when the Bootloop #1 occurred? I don't remember, but it's quite possible, because I remember trying to make MPC-HC play .ts files without those momentary pauses when seeking forward, before I resort in trying to find an alternative player. Researching online, I've figured many people seem to advise against K-Lite because it can cause various problems, including bootloops so I am now pretty skeptical about it. The thing is, I've been using it along MPC-HC (the original one, not your fork), for years on my laptop with no such problems. Of course, I fully understand that we are talking about a completely different system (Windows 7, Intel i3, on board Intel video card driver, different MPC & K-Lite versions) and a couple of different factors come into play, so that maybe doesn't say much.

I apologize for the length of this message but as a DEV, I hope you agree that when it comes to troubleshooting, the Devil is often hiding in the details. so hopefully you don't mind me being brutally detailed, as well as, again, not get the wrong idea that I am blaming the program. As a matter of fact, I really really hope you (or others) can shed some light on this one and come up with a statement like "Ah well, I think I know what the problem is, it's simple, you shouldn't do this or that or try the x version etc." so I can get to the bottom of this, prevent it from happening ever again, and keep using a program I've grown to love through the years.

Thanks a lot for your time and consideration.

Ryzen 3900x 32 GB of RAM Nvidia 1660 Super Windows 10 1909

clsid2 commented 3 years ago

First of all, your problems are not the fault of MPC-HC. It does not have any effect at all on Windows during a boot. A user-mode application can also not cause BSoDs and similar issues. That happens on driver and Windows kernel level.

DX9AllocatorPresenter failed means that the video renderer is unable to create a Direct3D device instance. That normally indicates a problem with the graphics driver. But since Windows has issues during boot, it is likely that the cause of the problem is on the hardware side. When the standard renderer fails it falls back to the ancient VMR-7 renderer. That doesn't use Direct3D. The upside down video is due to this renderer being old and buggy in some situations.

  1. Re-seat the graphics card: take it out, blow away dust, and put it back in. Check that PCI connector is making good contact. A loose contact can result in random boot loops and other issues.
  2. Check if the power cable is connected properly. If the card needs two power connectors, you must use two separate cables, do not daisy-chain on one power cable because that gives stability issues.
  3. If possible test the card on another system. It might be broken.
  4. Replace NVIDIA driver with "Microsoft Basic Display Driver" in device manager. If that works good, then you know the problem is with the NVIDIA driver or the hardware itself.
  5. Do a fully clean install of the NVIDIA driver. Remove current one first with Display Driver Uninstaller (DDU). I recommend to test with a relatively old driver first (e.g. 442.74).

A virtual machine does not directly expose the GPU to the guest OS, so you can't test drivers in there. It will use a virtual GPU.

Disappeaer commented 3 years ago

Thanks for your reply.

First of all, your problems are not the fault of MPC-HC. It does not have any effect at all on Windows during a boot. A user-mode application can also not cause BSoDs and similar issues. That happens on driver and Windows kernel #level.

Again, I am not necessarily blaming MPC-HC and you are definitely in the position to know better than me whether this is responsible or not, so that's why I am taking your opinion seriously. Which is also the reason I didn't ask you the first time around, months ago. Nevertheless, I understand you are saying that the MPC-HC message, followed by the bootloop, could very well be the symptom, and the fact that the bootloop started right after playing a video with it, along with the message could merely be a coincidence, even if it happened twice. This is a scenario I am seriously considering anyway, no matter how much I wouldn't want it to be true, because while a messed up video card driver is something I could get around, a broken video card (mind you, a brand new one on a new build) is something I'd hate to have to deal with. Not only because it's depressing, but mainly because I can never be 100% sure about it (at least with the current symptoms), let alone prove it to the reseller and make a warranty claim. Again, wishful thinking aside, I am not pointing any fingers against a program I like and been using for quite a while. But here's the deal, I have to start from somewhere. I work both with audio and video editing apps. If the issue was manifested only while using Cubase and not Pro Tools, Studio One, Logic or whatever...I'd take it to Steinberg's forums and try to see whether the devs have any idea what's going on. The same would happen if it was manifested while working with Premiere and not DaVinci Resolve. I hope you see my point of view?

Re-seat the graphics card: take it out, blow away dust, and put it back in. Check that PCI connector is making good contact. A loose contact can result in random boot loops and other issues.

Will do.

Check if the power cable is connected properly. If the card needs two power connectors, you must use two separate cables, do not daisy-chain on one power cable because that gives stability issues.

For what is worth, it uses a 6 pin with an additional 2 pins detachable/hanging to the side (that side goes into the video card), you align the 2 pins with the 6 pin to make it into an 8 pin. What I am saying is not a double connector or daizy-chain, right?

If possible test the card on another system. It might be broken.

I, unfortunately am not in the position to do that. But even if I was, it's been months between the two bootloops. I wouldn't possibly be able to test it for that long.

But since Windows has issues during boot, it is likely that the cause of the problem is on the hardware side.

Again, It could partly be wishful thinking on my part, even though I am trying to think rationally, but doesn't the fact that Windows have been booting just fine, with the same video card: a). When I first built the PC, almost a year ago. b). For like 9 months time, between the two bootloops. Tested occasionally with Premiere and even some gaming. c). Now that I've reinstalled Windows 10.

signals that this, most likely, is not a hardware issue? I mean, if the video card was broken, wouldn't that manifest from the get go (maybe by not even POSTing), or at least more often, at random times and not necessarily after playing a video with MPC-HC?

Do a fully clean install of the NVIDIA driver. Remove current one first with Display Driver Uninstaller (DDU). I recommend to test with a relatively old driver first (e.g. 442.74).

Yes, I do know video card drivers are notorious for causing bootloops, especially after uninstalling. Now that you mention it, at some point before the second loop occured (unfortunately I am not sure when, but not like the day before), I did update on top of the older driver (without using DDU) to test if it'd make any difference with Premiere performance. As a matter of fact, when I saw that it didn't, exactly because I am cautious/nervous with installing and uninstalling video drivers, I used "system restore" returning to a system state point with the old driver. Just typing it right now, I realize this probably wasn't the best idea, right? But again, I can't recall how long that was before my second bootloop, last week. Could it be I've ended up in a messed up/corrupt place between the two drivers, which didn't cause an immediate critical problem right away (bootloop) but when MPC-HC opened that video, "requesting smth" from my video card/driver (so rather than creating the problem, it actually revealed it) all hell broke loose?

I am not sure about the versions of those drivers but after I reinstalled Windows a few days ago and while I was determined to be extra cautious about the driver I am putting (I'd ideally want a version which doesn't cause much DPC Latency & play well with Premiere), Windows being Windows, went right ahead and installed 456.71. for me via Windows Update, without asking of course. I uninstalled it using DDU two days ago, and installed the latest Studio driver (461.92). I haven't tested with Premiere yet (because I really want to get to the bottom of the very issue we talk about first) but for time being I am still alive to tell the tale... Is there anything special with 442.74 btw? I mean, maybe you have experience with when it comes to DPC Latency or Premiere performance?

A virtual machine does not directly expose the GPU to the guest OS, so you can't test drivers in there. It will use a virtual GPU.

Ah, I see. But on the positive side, that means it also can't really BSOD the main/host OS, even on the hypothetical scenario there's something wrong in the mixture of MPC-HC with my video card driver? Meaning, again hypothetically, (I know you said it doesn't and I believe you, I am just trying to understand whether a VM would protect me on a similar case), if MPC-HC (or a driver conflict caused by K-Lite) or any other program was responsible for "corrupting" my video card driver or something else on Windows which would cause the bootloop, worse case scenario is that it would BSOD my VM/VM's OS, keeping my video card driver and host/main Windows installation intact/safe? I was considering trying VirtualBox to test programs, to keep my host Windows installation/registry clean, is it something you recommend (over other VM software) when it comes to simplicity (for someone who hasn't used a VM before) and resources? (mostly hard disk space, rather than CPU cores or RAM).

Btw, I am not sure whether you are involved with K-Lite, but couldn't installing it (on top of an older K-Lite version even) have something to do my problem? Maybe some codec conflict? Because ever person I've asked, blatantly claims this could very well be the source of the problem, rather than MPC itself or my video card (driver).

Finally, these two things could be completely unrelated but because there aren't exactly common and for troubleshooting's sake (and I got no more ideas) I have to mention. Could the culprit be:

a). The fact both videos were .ts recordings related from a DVBT-T2 receiver (before the first bootloop, I am sure it was a .ts file, when it comes to the second, it might have been a .mkv I made from another .ts recording/remux) stored externally, on a micro sd card even?

b). The fact that before I edit or view my .ts recordings, I ran some bat. files I put together using cmd examples found in places such as Super User? Not something, too fancy, basically whenever my DVBT-T2 receiver records TV programs on my sandisk flash drive, it creates folders which upon trying to open them I get a “You don’t currently have permission to access this folder” message and I have to press "continue", their format is actually .tsv (granted, it's still a .ts variation AFAIK but still...), nests all PVR recordings in several subfolders which isn't convenient and puts an x number of characters as a prefix (7 or smth?) so I run a .bat I've put together file with commands to:

a). Take permission for all the PVR subfolders. b). Take the .tsv recordings out of the subfolders then delete them. c). Rename .tsv to .ts d). Remove the first 7 or smth characters.

Actually, lately, probably the day before the second bootloop, I've converted this bat file to .exe in order to attach a keyboard shortcut to automate the process even further. Could by any chance these (because of some line of code I shouldn't use or something) have any relation with my problem? Could be totally unrelated, but since it's a bit of an unorthodox process, I thought I'd also mention, I could also provide the .bat files in question if you suspect that it could be related.

Thanks a lot for your help.

clsid2 commented 3 years ago

It is not even technically possible for MPC-HC to be the root cause this kind of problem. Period. There are more than 10 millions users. How many have boot-loops? One. How many people have boot-loops after doing something simple as just upgrading their driver? Lots. Just check the NVIDIA forum.

I have had this kind of discussions many times before. People see a correlation and get into a tunnel vision. Or simply blame the last application that they installed or used. Since it happened just two times over a course of months, it is likely just a coincidence that you used MPC-HC after the system had already gone into a bad state. If MPC-HC had not show that error message, then you probably won't even considered it as a possible cause.

Data corruption is not uncommon in DVB recording. So it is possible that in rare cases it triggers a bug in the hardware decoder or driver. But then it should have a reasonable high chance of being reproduceable with same file. You can disable hardware accelerated decoding the video decoder settings.

If in both boot loops you were using an SD card, then that might be related to the problem. Maybe Windows fails to boot when SD card is present. The most simple and logical explanation is often the correct one.

Some Ryzen systems do also have USB related issues that can happen pretty randomly. The SD reader uses it too. I have only read about it, so I don't know all details. But it is worth to check if it also applies to your motherboard. There might be an updated BIOS and also newer AMD chipset drivers available.

Disappeaer commented 3 years ago

It is not even technically possible for MPC-HC to be the root cause this kind of problem. Period. There are more than 10 millions users. How many have boot-loops? One.

I value and respect Devs' work as well as recognizing one's Github is one's home, so I really do think I've chosen my words carefully, something I'd do even if, hypothetically, I was 100% convinced that MPC-HC is the reason behind the bootloops. Which I never said I am, to begin with, not even in my original message. But after your initial reply where you said the program is not responsible for my issue and explained why is that, I've more or less accepted it as a fact, not only because I trust you (careless as I may appear, I am extra cautious about what I am installing into my system anyway), but also because it makes sense. So, in my previous message, I even took an extra step backwards. As a matter of fact, there is not a single reference in there that implies I hold MPC-HC, itself responsible for what happened.

I've pretty much listed every other possible reason I could think of: Video card driver, Windows System Restore, K-Lite Codec Pack, Files format (.ts), files being on an external drive/micro sd, running .bat files to nest them out and rename them.

Everything but MPC-HC (and the Pandemic).

So I am not sure why you appear to be annoyed, accusing me for tunnel vision etc. I perfectly understand you probably get people accusing the program for stuff totally unrelated with it (or even because of their own mistakes) and how annoying this must be, especially if they do not really know what they are talking about. But, for my part, I insist I've been extremely polite, merely trying to examine possibilities, research and hear your take (confirm or explain why stuff is either possible or not, along with any other useful tip you might got) on a matter I have pretty limited knowledge about (if anyone, it's myself I've been putting down all along), while you, as the Dev, are obviously in the complete opposite side of the spectrum.

Some Ryzen systems do also have USB related issues that can happen pretty randomly. The SD reader uses it too. I have only read about it, so I don't know all details. But it is worth to check if it also applies to your motherboard. If in both boot loops you were using an SD card, then that might be related to the problem.

I am 100% sure Bootloop #1 and the MPC-HC message occurred after playing a .ts recording off a micro sd card on a usb adapter. About the recent Bootloop #2, I am not so sure it was a .ts file or stored in external storage (it definitely was not stored on a micro sd this time), but I've just found out something interesting, I am going to talk about it in a while, when we reach the data corruption part....

As for Ryzen + USB issues, yes, I recently ran into some snippet talking about an imminent fix about USB related issues for Series 5000 but for some reason (probably because of the 5 prefix and since my CPU isn't "new" anymore), I thought it refers to the most recent 5xxxx processors and/or B550 motherboards. Clearly, it appears I was wrong...

Maybe Windows fails to boot when SD card is present. The most simple and logical explanation is often the correct one.

I am not sure whether I come across as tech illiterate, (and I am not being sarcastic, obviously my previous answer about the USB issues doesn't help much), but I really wish it was that simple. It wasn't even connected all these times Windows would fail to boot. :) They wouldn't boot no matter what I do, advanced settings, trying to enter safe mode or trying several terminal commands which are often supposed to fix things through recovery and Hiren's boot disc. Again, I'd only get a "Critical Device Failed" message. Only a few times I've tried to boot using the "disabling driver signature enforcement" start up option, where I'd also get the 0xC000021A error code. I am not sure whether that happened because of the issue or that specific start up setting, but from what I read, it also seems to signal it's a driver issue.

There might be an updated BIOS

My Bios version is pretty old indeed. I've chosen not to update it because of the risk (as small as it is) to end up with a completely bricked/dead motherboard if something goes wrong (corruption etc.). Unfortunately, my motherboard doesn't support Dual Bios or has a reflashing tool or something, so as much as I'd like to update it, I am trying not to open up another can of worms. Asrock even told me they do not recommend to do so, because of that chance, unless I have a serious problem I can't solve in any other way. Of course one could argue this is a quite serious problem, but you get my point.

and also newer AMD chipset drivers available.

These are up-to-date, I've installed them after reinstalling Windows, a few days ago.

Data corruption is not uncommon in DVB recording. So it is possible that in rare cases it triggers a bug in the hardware decoder or driver.

Now this is pretty interesting and it's the kind of stuff I came here to be more informed about, (rather than put down or accuse MPC-HC). And I agree, PVR recordings are quite prone to corruption, it's pretty likely some of my recordings suffer from this, because AFAIK this can be a result of the transmission and/or the way the receiver (or the recording flash drive even?) captures them, meaning I can't do much more, other than use software that tries to deal with it (Videoredo). This program or even mkvtoolnix often outputs errors of that nature, which usually do not affect the video itself, apart from some minor audio/sync issues I can simply ignore if they are really negligible or, alternatively, equalize them with sync settings in the programs in question. But I thought corruption could only affect sync or in the worse case scenario, prevent the video from playing altogether. I understand you are saying it is possible that's the culprit? Again, this is the kind of stuff I meant with phrases such as:

the MPC-HC message, followed by the bootloop, could very well be the symptom (rather than the cause)

when MPC-HC opened that video, "requesting smth" from my video card/driver (so rather than creating the problem, it actually revealed it) all hell broke loose?

I hope that further makes clear, once and for all, that I am not holding the program responsible.

But then it should have a reasonable high chance of being reproduceable with same file. You can disable hardware accelerated decoding the video decoder settings.

Windows fortunately kept parts of my old installation in a "Windows.old" folder. In the "AppData\Roaming\MPC-HC" folder there's a .mpcpl file with just one, specific video filename.

MPCPLAYLIST 1,type,0 1,filename, (a video filename)

How likely is that's the last video played aka the video before the error message appears and the bootloop starts? I think there's a pretty good chance it is and the reason I am not saying I am 100% sure is because I was working with 3 files of the same TV Show (my .ts recording, a mkv downloaded off youtube and a trimmed bit of that .mkv file with Videoredo - again, I wanted to sync the audio track from the youtube video with the one in my .ts recording), so naturally they got similar filenames too. The video in the .mpcpl file is the Videoredo trimmed bit off the .mkv ripped from Youtube, I am curious whether you can confirm that it should be that file. Because the video trimmer (Videoredo), while a great program in general, could very well produce a corrupted trimmed bit, it wouldn't be something that hasn't happened before. So, could it be one of the rare cases you've mentioned? I always use hardware acceleration btw.

And well, what makes it even more interesting is that I've tried playing it with the generic Windows video player, which is the only one I've got installed at the moment (it's called Films & TV, again, I'm trying to troubleshoot this problem before I re-install all my go-to programs), and If try to seek by clicking at some point later in the timeline, the video starts skipping all over the place, audio stucks and I can even see some colorful artifacts. Of course, it could very well be because it's the simplistic, poor, default Windows player. But I've tried playing several video types and apart from those which played fine, the ones that didn't play simply requested a codec installation, I didn't get the same behaviour. Still, it can always be a coincidence but I wouldn't rule out the video was corrupted and triggered a problem like the ones you've mentioned.

clsid2 commented 3 years ago

Yes, the playlist contains last file played. A corruption in the video data normally only gives minor issues such as malformed decoded image or some skipped frames. Similar to how you noticed in Movies&TV. It sounds like this specific file is pretty broken. Making the driver go into a bad state is very very very unlikely with a damaged video. It is likely that it was already in bad state when you started playback. Certainly if it happened directly on first file played. Premiere and lots of other applications like web browser heavily use GPU hardware acceleration as well. So any of those can trigger a fault in driver and result in a BSoD. But a boot-loop suggests the driver (installation) itself is already faulty during boot. Maybe Windows update was messing with the driver. Always a good idea to disable automatic driver updates. Since it also has a nasty habit of using old drivers. Thinking of that. You should also disable "fast startup" in the Windows 10 settings. Otherwise it doesn't do a fully "fresh" boot and some driver issues could persist even with a reboot. That could very well be cause of the loop. Or there was some data corruption on the harddrive that damaged a driver file. I have had that once a couple years back. But also extremely rare.

Disappeaer commented 3 years ago

Maybe Windows update was messing with the driver. Always a good idea to disable automatic driver updates. Since it also has a nasty habit of using old drivers.

You are right. I am positive I've had group policy and other settings set up in a way I only receive "security" and not "feature" or drivers updates and although I also haven't noticed something like that, you can never be sure with Windows.

Or there was some data corruption on the harddrive that damaged a driver file. I have had that once a couple years back. But also extremely rare.

The hard disk/Windows SSD appeared and appears to be knocks wood fine. At least CHKDSK, Hard Disk Sentinel and the fact I haven't noticed anything fishy performance-wise seem to suggest so.

It is likely that it was already in bad state when you started playback.

I agree and if you say so, I understand it could very well be the case. All these are valid points and I'd like to thank you once again, for suggesting possible culprits to examine. Btw, I think it's really important to mention that if it looks like I am stubbornly, insisting to blame things connected with MPC-HC as the cause of my issue, this couldn't be further from the truth. Examining possibilities with you is only one of things I have currently running, trying to make sense of what's going on and more importantly prevent it from happening ever again.

Other include (but are not limited to):

A ticket with Nvidia, which as you can imagine, I am not very hopeful it will lead anywhere... and A conversation with an audio producer who also happens to work for Microsoft in a music production community. This is what I do btw, and I am trying to see whether this is, at least partially, a Windows quirk.

I'd also like to mention (whether you care or not of course), that after hearing your take (which as I've said, it also makes sense), I am refraining from even mentioning MPC-HC. I just think it wouldn't be fair.

Certainly if it happened directly on first file played.

There is a good chance it was not the first file played but I can't be sure. But I am sure I played that and the other related videos with the other player and they appeared to play fine, without outputting any error messages such as "DX9AllocatorPresenter failed D3DERR_NOTAVAILABLE" at least, right before I try with MPC-HC. Not that this fact alone, necessarily means anything of course.

I'd honestly pay good money to have Marty McFly & Dr. Emmett Brown arrive with their DeLorean time machine and take me to the point in time right after playing the video file in question with that other player and before I play it with MPC-HC. Then I'd reboot the system. And If I was getting a bootloop I'd have Marty & Doctor Emmett find you and apologize on my behalf AND arrive in this Github personally and do the same. That could certainly make up things in this, that and possibly every universe in the multiverse. But I am sure you'll agree that the chances of being able to do that, are even more slim than the chances of a broken video being responsible for a broken driver and the bootloops... Which brings us to:

Yes, the playlist contains last file played. A corruption in the video data normally only gives minor issues such as malformed decoded image or some skipped frames. Similar to how you noticed in Movies&TV. It sounds like this specific file is pretty broken. Making the driver go into a bad state is very very very unlikely with a damaged video.

In that case, would you mind If I upload it to give it a look, please? It's only 340 mb. I perfectly understand you are saying a broken video damaging the video driver is unlikely, as well as even if (for argument's sake) assume that the video had something to do with the crash/bootloops, reproducing it might not be as straightforward since there's a change it's not MPC-HC version / Video Driver (version) / Windows version / System in general, agnostic. Then again, you said in your previous message that "it should have a reasonable high chance of being reproduceable with same file". Also, I can't tell for sure of course, but my guess would be that as a Dev of one of the most popular and older media players around (even though it's a fork), you may have seen even crazier things!

I mean, this could also be a coincidence, but the fact that during the 9 months period between this and the first bootloop occurred, in a similar fashion, (after a playing a video file that could very well be broken itself - a corrupt .ts file), I was still using MPC-HC quite a lot, but I never got a crash with a certified, well-behaved / not broken video file such as a movie or tutorial course purchased by a legitimate company, makes me a bit skeptical - of course it could always be another coincidence. And it might be a "tin foil hat" precaution measure, but I just don't feel comfortable attempting to play the same video with MPC-HC, I am just going to get rid of it. Because, even If I was trying to play it again, no matter if I'd get another crash/bootloop or not, I wouldn't have the diagnostic tools or other measures / alternative MPC-HC builds / and knowledge you have, to know what to do with this information.

Unlikely as it may seem, best case scenario is you discover a "ghost of a chance" bug, that just might, at some point, affect other users or at least see something in the file that might give you or myself some useful information, concerning MPC-HC and/or my issue. Worst case scenario is you get rid of me even sooner (not that if you deny to check the video I will keep insisting of course, quite the contrary, I don't plan to bug you any further anyway) and next time someone arrives with a similar or other "problem" you know it's completely unrelated with the player, you'll have another arrow in your quiver of telling him to "go on his merry way" (refraining from putting it, in another, sliiiightly less polite, way...) by saying: "Jeez man, MPC-HC has nothing to do with your issue, just get a load of that guy who dropped by the other day, and don't be like him." :)

clsid2 commented 3 years ago

You can upload the file. I can test it with a 1660Ti, so almost same card.

If MPC-HC ever gives the renderer error again, write down all things you have done since boot. Check the Windows Event log to see if there have been any issues. Check Windows Update log to see if it did anything recently. Maybe even use Windows search to check for last modified files and see if that includes anything unusual. Run DirectX Diagnostic Tool (dxdiag.exe)

You can restart the graphics driver by pressing Winkey+CTRL+SHIFT+B.

In case of a boot loop, power down the computer by holding the power button for 10 seconds. Unplug the power cord and wait a few minutes. Then do a cold boot.

Opening a bug report with NVIDIA or Microsoft is pointless, as you don't have any useful information that they can act on. They need crash dumps or steps to reproduce a problem.

Disappeaer commented 3 years ago

Thank you. I really hope I won't have to encounter one of these bootloops ever again... but I am keeping the tips. There you go: https://we.tl/t-LpTW3yAff6 (password is your username) Github wouldn't let me upload it here, because of the size, hope WeTransfer is okay, we use it with colleagues to exchange huge chunks of .wav files. We have never come across any malware and the download speed is reasonably fast.

A little disclaimer, especially if you happen to be a Clash fan: This is a prime time, family show (I've ripped the specific episode from here: https://www.youtube.com/watch?v=FTvgfTS6r1c), opening with viewers' videos, singing their own, parody version of ""Rock the Casbah". I mean, playing the video with Movies & TV appears almost unwatchable on my end and the fact you will probably not be able to understand the language will protect you, but, being a Clash fan, has absolutely ruined the song for me... Random and useless info, I know, but this is almost as annoying as the bootloops... :)

crosses fingers you make something out of this

clsid2 commented 3 years ago

Video playback works fine here with hardware acceleration. No visible corruption. I have also played your whole video with FFplay and that logged no decoding issues. So no evidence of anything being wrong with this video stream.

The audio is completely broken apart from the first few seconds. If you ripped this from Youtube, then I suspect your tools messed something up somehow. Youtube uses AAC and Opus audio. Your file contains a MP2 audio track.

Disappeaer commented 3 years ago

Thanks for giving it a go. Ok, I've tried playing the video too (with another player) and after hearing that "corrupted data"-like sound from hell, along with the fact you've said it's an MP2 audio track, I am now sure what this file is and the exact process I've followed, it's not from the youtube rip, but a trimmed part from my .ts recording, remuxed into .mkv. Let me explain:

I've got a large size, DVBT-T2 recording in tsv. format. That's the full show + some extra time from the next program + ads of course. Let's call this "TvShowFull+ads".tsv. Now, If I had kept this original recording before I start processing it, I wouldn't have to go through the hoops I did later (regardless if it has to do anything with my issue or not).

Then, I've use my video trimmer (Videoredo) to remove the extra time and the ads, remuxing into a .mkv so it plays smoother on my TV's internal media player. Let's call this **"TvShowFull-NoAds-FromOriginalTs".mkv. Now, it seems that with the latter Videoredo versions, because of a bug or something, when you do that, it sometimes introduces (corruption?) that horrible noise at some point (like from the 10 - 20 min. mark on an 1-hour program in this case) in the video (video as in the type of the file, not the video stream** specifically). It's not the first time it happens and I have no idea why it does and whether it's a bug only reproducible under certain cirumstances (like, specific parts/conditions on my system). Interestingly enough, it doesn't happen with other video trimmers and it doesn't happen with an older version of the program. I've actually told them about it and they've found it very weird (mainly the fact it only affects the newer versions), but since it was a problem I could simply get around by using an older version (apparently I forgot to do that this time) , I didn't insist or sent them a sample. Maybe I should.

Nevertheless, upon trying to watch the .mkv on my TV, when I've reached that part where the "corrupted data" noise kicks in, I knew what happened and I've stopped playing it.

Then, since I had deleted the original recording so I couldn't start from scratch, I ripped the full episode from Youtube. Let's call it "TvShowFull-Youtube.mkv".

Next, I took **"TvShowFull-NoAds-FromOriginalTs".mkv. back into Videoredo and extracted the 10-min "corrupted data" noise part into a new .mkv. Let's call it "TVShow-10mins-Noise-bit".mkv. This is the last file played on MPC-HC before the renderer error appears and the bootloop issue started (upon rebooting right after the error message). And of course, this** is the file I've uploaded.

I've also extracted the .H264 and WAV. from "TvShowFull-Youtube.mkv" and the idea was to play "TVShow-10mins-Noise-bit".mkv with a video player (used the other player then also tried with MPC-HC) that would allow me to load the .WAV file from the youtube rip so I note down how much I need to +/- adjust the clean audio stream in a latter operation so it syncs with the video "TVShow-10mins-Noise-bit".mkv. So I would end up with a "proper" 10 min snippet (it'd almost retain the full quality of my original .ts recording + have the youtube audio stream replacing the "data noise" one). Finally, I'd combine this part with the rest of the **"TvShowFull-NoAds-FromOriginalTs".mkv. for a video of the full show**+proper audio for a video file with the best quality possible. Trimmers like Videoredo supposedly only encode a few frames between snippets so that makes for a faster process + minimum quality loss.

Too much work for a lousy TV show, I know, especially since it's on Youtube but my sister keeps an archive of it and she wants the best quality possible...

Now, how does that help with troubleshooting my issue? It kinda doesn't, unless of course you got any ideas.

I just have two remarks:

1). Even though there is no corruption/errors in the video stream, doesn't the fact there's "corrupted" audio mean it's still a broken or at least problematic video file, nonetheless? I mean, it's problematic enough for a, granted, less advanced/simple video player such as Movies & TV to have a hard time playing it, couldn't those problems trigger a bug in the hardware decoder or the video card driver as you've said? Or the fact it's the audio stream it has the problem would make that even more unlikely?

2). I thought it was the Youtube .mkv rip I've played last, but it's now clear it was one of my PVR recordings once again (that also happens to be problematic, at least to some degree - although according the the playlist file, this time it was not stored in an external drive or micro sd, so I guess we can rule this one out), just like in the first bootloop, 9 months ago. Again, not exactly, a well behaved video from a good source. Also, as I've said, because of the little pauses when seeking a .ts file I've experienced with MPC-HC (is this solvable btw?), I've stopped using it for these type of files altogether, so even though I've kept using it for some videos (playing x265-10 bit movies for example) it's very possible I haven't played another video file sourced from one of my PVR recordings (a .ts or a .ts remuxed into .mkv), let alone a problematic one. within this 9 months period.

Again, this could be yet another coincidence but when troubleshooting, I think it's important to mention every little detail or correlation. Without allowing them to put you in "tunnel vision" mode as you've said of course, so these remarks pretty much exhaust troubleshooting this factor and if there's really nothing to it, I should probably focus in other stuff.

clsid2 commented 3 years ago

Broken audio can't create any problem, apart from the horrible sound or playback failure.

Seeking .ts is slow because that container format does not contain a seek index. The format is designed for linear viewing. Only solution is to remux to a better container format, like you are already doing.

I see absolutely no evidence at all that your boot problem is in any way related to video playback.

Disappeaer commented 3 years ago

Alright, you are being crystal clear. Then I might as well focus in other things. Which, understandably, as you have nothing to do with, I am not going to bug you any further. But, since I believe power users and devs, can be way more helpful than let's Nvidia or Microsoft Reps in autoresponder mode (If you've ever been in "Microsoft Answers" forum, there's a good chance you'd agree with me) and you definitely seem to know your stuff, I am going to leave you with some fina remarks/questions, before I go on with my little troubleshooting saga. I consider 3,4,5, especially important so If you have any ideas, it'd be helpful!

1.

Premiere and lots of other applications like web browser heavily use GPU hardware acceleration as well. So any of those can trigger a fault in driver and result in a BSoD.

I am not sure whether I've mentioned but I do use Premiere + hardware acceleration. Never had a BSOD during working with it but for what is worth a). I am not exactly happy with the performance I seem to get (granted my GPU isn't the best), which can of course be a result of many factors and b). importing .mp4 remux versions of my .ts recordings always results in skipping frames and Premiere reporting random Variable Frame rate. If I import the .ts themselves - no such issue.

Opening a bug report with NVIDIA or Microsoft is pointless, as you don't have any useful information that they can act on. They need crash dumps or steps to reproduce a problem.

This isn't entirely true. Even though I wasn't able to boot in Windows at all, because of the bootloop, with the help of hiren's boot cd I managed to save Event Viewer and Minidump folder, I've figured it might come in handy once I reinstall Windows, for this very reason. The thing is, info on these sheets appears quite abstract to the untrained eye (mine), as well as logging things which aren't necessarily connected with something as serious as a BSOD let alone a bootloop. I've tried to make sense of it as much as I could, but the only things that partially stood out are:

System Event Log (only information and warning level events, strangely not critical or even error ones, in general, not only the day the Bootloop started):

Lots of:

Log Name:      System
Source:        Microsoft-Windows-DistributedCOM
Event ID:      10016
Task Category: None
Level:         Warning
Description:
The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID 
{C2F03A33-21F5-47FA-B4BB-156362A2F239}
 and APPID 
{316CDED5-E4AE-4B15-9113-7055D84DCC97}

and one:

Log Name:      System
Source:        Microsoft-Windows-Kernel-PnP
Event ID:      219
Task Category: (212)
Level:         Warning
Description:
The driver \Driver\UmPass failed to load for the device SWD\DAFUPnPProvider\uuid:0a21fe81-00aa-1000-b3ad-78bdbcf13745.

When it comes to the Application Event Log, these stood out from that particular day:

Log Name:      Application
Source:        ESENT
Event ID:      483
Task Category: General
Level:         Error
svchost (4476,P,98) SRUJet: An attempt to create the folder "C:\WINDOWS\system32\SRU\" failed with system error 5 (0x00000005): "Access is denied. ".  The create folder operation will fail with error -1032 (0xfffffbf8).

Log Name:      Application
Source:        Microsoft-Windows-Security-SPP
Event ID:      16385
Task Category: None
Level:         Error
Failed to schedule Software Protection service for re-start at 2021-05-07T15:38:19Z. Error Code: 0x80070003.

Strangely, when it comes to recent logs (last week, after reinstalling Windows, so not related with the bootloop) I seem to get this critical event on a daily basis:

Log Name:      System
Source:        Microsoft-Windows-Kernel-Power
Date:          17/04/2021 14:43:25
Event ID:      41
Task Category: (63)
Level:         Critical
Description:
The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">

The thing is I never had any random reboots, crashes or attempted to shut down the system by anything other than shutting down through Windows, the proper way. Also, if anything, these time marks are usually a time I switch ON my pc rather than OFF.

Oh, and opening the most recent Minidump with Bluescreenview reveals a "Critical Service Failed" crash: ntoskrnl.exe ntoskrnl.exe+7f7c93 fffff8031a400000 fffff8031aeb5000 0x00ab5000 0x90e03e2e 09/01/2047 05:51:26 However, the crash time shown is 8/3/2021, which lines up with the time the minidump file was last modified (the time string says the year is 2047, whatever that means...). But I didn't get a BSOD, let alone a bootloop in March, it was almost a week ago...

  1. I've asked before so I am not sure whether you've missed it or simply don't know the answer but I think it's a really important question to determine whether it's the video driver or the GPU having hardware problems, so I'd be really interested in your opinion. Doesn't the fact that Windows have been booting just fine, with the same video card: a). When I first built the PC, almost a year ago. b). For like 9 months time, between the two bootloops. Tested occasionally with Premiere and even some gaming. c). Now that I've reinstalled Windows 10.

signals that this, most likely, is not a hardware issue? I mean, even just the fact reinstalling Windows fixes things, doesn't indicate it's a driver issue or at least not a hardware one? Could it be because I don't normally have "fast startup" disabled as you've suggested?

  1. Is there a scenario (sans the "fast boot" enabled thing, I am not even sure whether it was enabled or not in my previous installation), where the driver could go bad for some reason (like improper installation/uninstallation process) BUT wouldn't show me a signal (like a bootloop perhaps...) after switching OFF then ON the PC (which I do on a daily basis). Meaning, is there a chance the driver went bad last Monday or a month ago, but for some reason it only signaled so by causing the bootloop, after switching ON the System and trying to boot Windows today?

  2. Let's say that I am 100% sure that for whatever reason "once in a while" the video driver gets corrupted. Is it anything I can do now, beforehand to back it up, then easily restore it, or simply delete some specific corrupted driver or Windows files that would help me getting out of the Bootloop if it ever occurs again? (Again, I can't boot in Windows, can't enter Safe mode but I can access C:// and Windows folders through a rescue disc such as Hiren's boot, maybe through cmd line too but I am not that efficient working with it, so the rescue disc way would be preferable).

EDITED to include Minidump info

clsid2 commented 3 years ago
  1. I can't help you with these issues.
  2. Yes, driver/windows issue is most likely.
  3. I don't know.
  4. You would have to make a full backup image. Since you don't know what exactly got broken, you don't know what to fix/restore.
Disappeaer commented 3 years ago

Alright, thanks for the heads up.