Handbrake just running in background

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
zzvipboomzz
Posts: 2
Joined: Mon Aug 02, 2021 2:32 pm

Handbrake just running in background

Post by zzvipboomzz »

Description of problem or question:
I start handbrake but it not show anything.
I checked task manager and found it.
So I ended task, uninstall and install again but It still unchanged. (.Net 5.0.8 windows desktop runtime is installed)

Steps to reproduce the problem (If Applicable):




HandBrake version (e.g., 1.0.0):
1.4.0



Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
windows 10 Pro (build 10240)



HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

Please replace this text with the contents of your log file between the two code tags - OR -  provide a pastebin URL in place of these 3 lines.
If you are unable to do so, please state why so we can help you.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Handbrake just running in background

Post by Woodstock »

Make the handbrake task active by clicking on it in the task bar. Type Alt-Space, then the letter M, then use your cursor keys to see if the window suddenly appears at a screen edge.

Windows can decide to start programs on a screen that no longer exists, if it memorized that location previously. And it's easy enough to move something off the active screen, even if you don't have multiple monitors. Mouse movements don't work off-screen.
zzvipboomzz
Posts: 2
Joined: Mon Aug 02, 2021 2:32 pm

Re: Handbrake just running in background

Post by zzvipboomzz »

Link image: https://imgur.com/a/uoPwQO3
I tried your comment and It still unchanged.
Can I do somethings else ?
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Handbrake just running in background

Post by Woodstock »

Using the task manager, you have to tell it to "switch to", rather than just clicking on it.

I haven't tried this with 1.4 (not using dual screens right now), but handbrake normally opens in the center of the active screen. If it doesn't, it is because it "thought" the cursor was elsewhere.
JustSid
Posts: 5
Joined: Mon Aug 16, 2021 9:10 pm

Re: Handbrake just running in background

Post by JustSid »

I have the exact same problem. I can see that Handbrake doesn't create a single window, it just runs in the background seemingly not doing anything. Here is my activity log:

Code: Select all

HandBrake 1.4.1 (2021081500)
OS: Microsoft Windows NT 10.0.22000.0
CPU: AMD Ryzen 9 3900X 12-Core Processor            
Ram: 32696 MB, 
GPU Information:
  NVIDIA GeForce RTX 2070 - 30.0.14.7168
Screen: 3840x2160
Temp Dir: C:\Users\ME\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake\
Data Dir: C:\Users\ME\AppData\Roaming\HandBrake

-------------------------------------------

[13:49:34] Compile-time hardening features are enabled
I will admit that I run the Windows 11 preview, although Handbrake works just fine on a similar PC also running the Windows 11 Preview. I tried clearing the preferences as well as re-installing various versions. Is there a published PDB for HandBrake so I can take a look with a debugger what's up?
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: Handbrake just running in background

Post by s55 »

You'd need to pull the source from our github repo to take a quick look.

I suspect it'll be rendering statck, not HB code. A good way to check that sort of thing is to reboot in Windows SafeMode. If it works that tells us it's either software on the system, or drivers that are bad.
JustSid
Posts: 5
Joined: Mon Aug 16, 2021 9:10 pm

Re: Handbrake just running in background

Post by JustSid »

I actually ran HandBrake without PDB under a debugger, just to see what's up, and it looks like it's stuck here:

Code: Select all

 # Child-SP          RetAddr               Call Site
00 0000001e`c097d248 00007ffa`62e02627     amfrt64!AMFInit+0x7
01 0000001e`c097d250 00007ffa`62e02832     hb!check_component_available+0x87
02 0000001e`c097d2e0 00007ffa`62e0b585     hb!hb_vce_h264_available+0x22
03 0000001e`c097d310 00007ffa`62dfa115     hb!hb_common_global_init+0x215
04 0000001e`c097d360 00007ffa`16e95c35     hb!hb_global_init+0x175
05 0000001e`c097d390 00000148`df7f1537     0x00007ffa`16e95c35
06 0000001e`c097d450 00000148`df7f0ace     0x00000148`df7f1537
07 0000001e`c097d4b0 00000644`8826dfb0     0x00000148`df7f0ace
08 0000001e`c097d540 00000644`88198f54     0x00000644`8826dfb0
09 0000001e`c097d570 00007ffa`7462975f     0x00000644`88198f54
0a 0000001e`c097da10 00007ffa`75674476     PresentationFramework+0x7c975f
0b 0000001e`c097da50 00007ffa`75674306     WindowsBase+0x194476
// snip
1c 0000001e`c097e1c0 00007ffa`f1c31a6c     0x00007ffa`1660f182
1d 0000001e`c097e240 00007ffa`f1c30cc6     USER32!UserCallWinProcCheckWow+0x33c
1e 0000001e`c097e3b0 00007ffa`16c7d32b     USER32!DispatchMessageWorker+0x2a6
1f 0000001e`c097e430 00007ffa`75677ee3     0x00007ffa`16c7d32b
20 0000001e`c097e4f0 00007ffa`756753c1     WindowsBase+0x197ee3
21 0000001e`c097e580 00007ffa`7567536e     WindowsBase+0x1953c1
22 0000001e`c097e5b0 00007ffa`746296bc     WindowsBase+0x19536e
23 0000001e`c097e5e0 00007ffa`74627d1d     PresentationFramework+0x7c96bc
24 0000001e`c097e610 00007ffa`74624cac     PresentationFramework+0x7c7d1d
25 0000001e`c097e660 00000644`88199d91     PresentationFramework+0x7c4cac
26 0000001e`c097e690 00007ffa`76149d13     0x00000644`88199d91
Cut down a bit for brevity. Basically, no HandBrake PDB necessary because it won't do me much good anyways. amfrt64 seems to be AMDs hardware transcoding library? Of course no symbol file available for that. Also weirdly enough, I don't have a AMD GPU in this machine _right now_. This is my dev machine used for game development and I do have the occasional AMD GPU attached, so I'm wondering if the presence of the AMD drivers is enough to make Handbrake load the driver which then fails because there just isn't any AMD hardware that can be initialized? I can see it looping over and over again calling into `AMFXInputCreateController` and checking the result (which, surprise, fails). Questionable loop choices from AMD here...

My other machine only ever has seen an Nvidia GPU, so it doesn't have any AMD driver. So no surprises that it doesn't fail in this way. The HandBrake code that corresponds to this seems to be this one: https://github.com/HandBrake/HandBrake/ ... .c#L37-L45

It also looks like disabling hardware acceleration through the preference files will prevent HandBrake from trying to load this in the first place. I guess uninstalling the AMD driver would also do the trick? I'm mostly spitballing here based on the backtrace I have at hand as well as some quick github searches of function names. I guess ultimately this is an AMD bug, AMF just spins forever if it can't initialize device.
JustSid
Posts: 5
Joined: Mon Aug 16, 2021 9:10 pm

Re: Handbrake just running in background

Post by JustSid »

More of an edit, although I don't see a way to edit posts: I just rebooted with an AMD GPU and HandBrake runs completely fine now... Do you have a contact at AMD that this can be forward to? If not, I can see if our contact at their GPU driver team can point me in the right direction for a report.
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: Handbrake just running in background

Post by s55 »

That reminds me. A while back I added a "--no-hardware" flag that you can pass to Handbrake.exe that if I recall correctly, will bypass the checks. You can add this to a custom shortcut. That might be an easier workaround if your swapping GPU's

Our contacts at AMD are limited, so if you know folks over there, worth giving it a shot. If not, we can give it a go.

I think you've probably hit the nail on the head here. Interesting that it just locks on that rather than returning an AMF_FAIL
JustSid
Posts: 5
Joined: Mon Aug 16, 2021 9:10 pm

Re: Handbrake just running in background

Post by JustSid »

I'm also a bit confused why it doesn't fail, since the API is clearly designed to fail? I'm guessing they have some spurious errors that can be resolved by just trying again, although putting a limit there would certainly help. No hardware acceleration is unfortunately no bueno for me, or rather, I'd like it because I want to crunch a bunch of video files down and why not use the dedicated hardware for it?

I'll see what our contact at AMD has to say. Their office/internal structure is wild, so it's possible that they can't help at all given that they are on the GL/Vulkan Windows driver team.
JustSid
Posts: 5
Joined: Mon Aug 16, 2021 9:10 pm

Re: Handbrake just running in background

Post by JustSid »

Shoot and again, no edit, sorry for double posting... Given that HandBrake knows that there is no AMD GPU present, would it be possible to just skip trying to initialize AMF in this case? This might do more harm than good, I don't know how the GPU iteration looks like and what kind of cards can do hardware video transcoding but don't report as GPUs. But that's just an idea I had as a possible HandBrake side work around.
Post Reply