[WinGUI] Handbrake crashing when custom preset selected

Report and discuss *new*, *consistent*, *reproducible* bugs here
jamesj84
Posts: 13
Joined: Thu Mar 08, 2012 12:54 am

[WinGUI] Handbrake crashing when custom preset selected

Postby jamesj84 » Mon Mar 12, 2012 8:17 pm

I have saved presets which I have copied an pasted code which gives me AVC level 4. Encoding speed to slow etc.
ALso I hav saved one for slower & placebo.

If i click on these presets then handbrake stops responding and crashes.

Am i doing anything wrong here. Its really annoying.

User avatar
Rodeo
HandBrake Team
Posts: 11192
Joined: Tue Mar 03, 2009 8:55 pm

Re: Handbrake crashing A LOT!

Postby Rodeo » Mon Mar 12, 2012 8:33 pm

Operating system? Crash log?

jamesj84
Posts: 13
Joined: Thu Mar 08, 2012 12:54 am

Re: Handbrake crashing A LOT!

Postby jamesj84 » Mon Mar 12, 2012 9:36 pm

Operating system is fine.

Its to do with the handbrake presets

If i change my presets to
b-adapt=2:direct=auto:me=umh:rc-lookahead=50:ref=5:subme=8
Which is
preset - slow
tune - none
profile - high
level 4

also
b-adapt=2:direct=auto:me=umh:partitions=all:rc-lookahead=60:ref=8:subme=9:trellis=2
which is
preset - slower
tune - none
profile - high
level 4

Or are the preset codes wrong

User avatar
Rodeo
HandBrake Team
Posts: 11192
Joined: Tue Mar 03, 2009 8:55 pm

Re: Handbrake crashing A LOT!

Postby Rodeo » Mon Mar 12, 2012 9:53 pm

Only Windows, Mac OS X and Linux are supported. Running handBrake on an unknown OS is not supported.

jamesj84
Posts: 13
Joined: Thu Mar 08, 2012 12:54 am

Re: Handbrake crashing A LOT!

Postby jamesj84 » Mon Mar 12, 2012 9:57 pm

Its run on windows 7 PC.

User avatar
Rodeo
HandBrake Team
Posts: 11192
Joined: Tue Mar 03, 2009 8:55 pm

Re: Handbrake crashing A LOT!

Postby Rodeo » Mon Mar 12, 2012 10:01 pm

Well, that's a start.

How exactly do you copy/paste the options: in the Advanced panel or directly in the preset XML file?

Does HandBrake or Windows display any error when HandBrake crashes?

jamesj84
Posts: 13
Joined: Thu Mar 08, 2012 12:54 am

Re: Handbrake crashing A LOT!

Postby jamesj84 » Mon Mar 12, 2012 10:35 pm

NO, It doesnt post an error.
II have got the presets from this website from https://forum.handbrake.fr/viewtopic.php?f=6&t=19426

I have inputed this presets in the advance section of hanndbrake and then created my own preset. EG. LEVEL HIGH, SLOWER, 4.0
Now if i select one video to convert and say select 1 preset its ok.

If i select another video and choose another preset then it will crash and say handbrake has encounted a problem. It will just reboot handbrake and its really bugging me.

I basically want my encodes to be set to LEVEL HIGH, SLOWER and 4.1
I can not seem to do this with handbrake.

User avatar
Rodeo
HandBrake Team
Posts: 11192
Joined: Tue Mar 03, 2009 8:55 pm

Re: Handbrake crashing A LOT!

Postby Rodeo » Mon Mar 12, 2012 11:55 pm

Sounds like a Windows GUI bug.

User avatar
Rodeo
HandBrake Team
Posts: 11192
Joined: Tue Mar 03, 2009 8:55 pm

Re: [WinGUI] Handbrake crashing when custom preset selected

Postby Rodeo » Mon Mar 12, 2012 11:56 pm

Moving to bugs. What version of HandBrake are you using - 0.9.5, 0.9.6, something else?

jamesj84
Posts: 13
Joined: Thu Mar 08, 2012 12:54 am

Re: [WinGUI] Handbrake crashing when custom preset selected

Postby jamesj84 » Tue Mar 13, 2012 7:37 pm

My version of handbrake is 0.9.6

I think I have sussed out my problems.

As i wanted presets/ profiles etc i have now got them from the forum
Tutorial: x264 presets/tunes and HandBrake https://forum.handbrake.fr/viewtopic.php?f=6&t=19426

Before i was using them from another website http://jamielaw.com/presetsandtunes/ and it was these presets causing handbrake to crash.


One question i do have with the presets and profiles etc.

I want my handbrake settings to be
PRESET: SLOWER
PROFILE: HIGH
LEVEL: 4.1

I can not get level 4.0 or 4.1 only level 3.
How do i get my encodes to level 4.1 ?

User avatar
Rodeo
HandBrake Team
Posts: 11192
Joined: Tue Mar 03, 2009 8:55 pm

Re: [WinGUI] Handbrake crashing when custom preset selected

Postby Rodeo » Tue Mar 13, 2012 8:01 pm

Code: Select all

level=4.1


in the advanced opts string.

jamesj84
Posts: 13
Joined: Thu Mar 08, 2012 12:54 am

Re: [WinGUI] Handbrake crashing when custom preset selected

Postby jamesj84 » Tue Mar 13, 2012 9:44 pm

So in advanced opts string it will be like this:

ref=8:b-adapt=2:direct=auto:me=umh:subq=9:rc-lookahead=60:analyse=all:trellis=2:level=4.1

User avatar
Rodeo
HandBrake Team
Posts: 11192
Joined: Tue Mar 03, 2009 8:55 pm

Re: [WinGUI] Handbrake crashing when custom preset selected

Postby Rodeo » Tue Mar 13, 2012 10:05 pm

Yes.

Note that ref=8 will exceed level 4.1 limits for some sources (1080p), you should use ref=4 instead.
But ref=8 is OK for 720p and standard definition (e.g. DVD) at level 4.1.

jamesj84
Posts: 13
Joined: Thu Mar 08, 2012 12:54 am

Re: [WinGUI] Handbrake crashing when custom preset selected

Postby jamesj84 » Tue Mar 13, 2012 10:47 pm

Excellent, cheers for that info.

Time to do some testing ;)

User avatar
s55
HandBrake Team
Posts: 8181
Joined: Sun Dec 24, 2006 1:05 pm

Re: [WinGUI] Handbrake crashing when custom preset selected

Postby s55 » Sat Mar 17, 2012 2:04 pm

I am unable to reproduce this crash. It's very strange that you are not recieving an error as there is a global exception handler in there.

You could try re-creating it and have a look in the Windows Event Viewer under Applications and look for the time code.

It sounds like it's maybe something underneath HandBrake that is crashing out and not HandBrake itself.

SnickySnacks
Posts: 5
Joined: Thu Mar 15, 2012 11:48 pm

Re: [WinGUI] Handbrake crashing when custom preset selected

Postby SnickySnacks » Wed Mar 21, 2012 1:01 am

I get the same crash. I thought it was because I had edited my custom presets, but I deleted them (deleted user_presets.xml entirely) and recreated one and get the same crash.

For me, the steps are simple:
Works:
1. Click a custom preset
2. load a dvd source (by folder)

Crashes:
1. load a dvd source (by folder)
2. click a custom preset

windows event log entry:

Code: Select all

Faulting application name: Handbrake.exe, version: 0.9.6.4510, time stamp: 0x4f6565ef
Faulting module name: USER32.dll, version: 6.1.7601.17514, time stamp: 0x4ce7c9f1
Exception code: 0xc00000fd
Fault offset: 0x00000000000196c8
Faulting process id: 0x105c
Faulting application start time: 0x01cd06fc48d46ed2
Faulting application path: C:\Program Files (x86)\Handbrake\Handbrake.exe
Faulting module path: C:\Windows\system32\USER32.dll
Report Id: cff238a7-72ef-11e1-99b6-001cc026bb52


From VS2008:
First-chance exception at 0x77949aa1 in Handbrake.exe: 0xC00000FD: Stack overflow.

Tried 0.9.6 stable and today's nightly, 4510.

Here's my system info (from 0.9.6), I'm running Win 7 Pro.

OS: Microsoft Windows NT 6.1.7601 Service Pack 1
CPU: Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz
Ram: 4026 MB, Screen: 1920x1080

SnickySnacks
Posts: 5
Joined: Thu Mar 15, 2012 11:48 pm

Re: [WinGUI] Handbrake crashing when custom preset selected

Postby SnickySnacks » Wed Mar 21, 2012 2:24 am

Looks like the problem is in PictureSettings.cs,
private void TextWidthValueChanged(object sender, EventArgs e)
recursively calls itself from

Code: Select all

if (check_KeepAR.CheckState == CheckState.Checked && Source != null)
                  {
                        updownParWidth.Value = updownDisplayWidth.Value;
                     updownParHeight.Value = text_width.Value;
                    }



To be honest, changing the disiplay/par settings for custom anamorphic seems to be a bit flakey anyways, often requiring a click on "custom" to update the "display size" at the bottom, etc.

Wrapping the above in a "preventChangingWidth" makes it not crash.

Code: Select all

                    if (check_KeepAR.CheckState == CheckState.Checked && Source != null)
                    {
                        preventChangingWidth = true;
                        updownParWidth.Value = updownDisplayWidth.Value;
                        updownParHeight.Value = text_width.Value;
                        preventChangingWidth = false;
                    }


Also is there any reason that the height functions call TextWidthValueChanged rather than TextHeightValueChanged?

PictureSettings.designer.cs:
this.text_height.ValueChanged += new System.EventHandler(this.TextWidthValueChanged);

of course, changing this makes the values update erratically (often end up with PAR Width blank, or Display Width=8, Par width=8, par height=9, etc).

Also, switching between presets (apple tv 2) and a custom preset doesn't seem to reset cachedDar if the cropping changes, which makes the display width different than what the preset should be setting it to. Of course, normally when loading a preset it defaults to automatic cropping, but once switched to manual it'll stick when switching between presets.

Now to figure out how to get it to load my preset with the cropping turned off, so I don't have to reset it each time. :P

Well, figured that one out.
PresetLoader.cs -> LoadPreset()

Code: Select all

            mainWindow.PictureSettings.check_autoCrop.Checked = true;
            if (/*preset.CropSettings &&*/ presetQuery.HasCropping)
            {
                mainWindow.PictureSettings.check_customCrop.Checked = true;
                mainWindow.PictureSettings.crop_top.Value = presetQuery.Cropping.Top;
                mainWindow.PictureSettings.crop_bottom.Value = presetQuery.Cropping.Bottom;
                mainWindow.PictureSettings.crop_left.Value = presetQuery.Cropping.Left;
                mainWindow.PictureSettings.crop_right.Value = presetQuery.Cropping.Right;
            }


Now if I can just get it to stop modifying my display width based on the cropped settings, life will be good.

User avatar
s55
HandBrake Team
Posts: 8181
Joined: Sun Dec 24, 2006 1:05 pm

Re: [WinGUI] Handbrake crashing when custom preset selected

Postby s55 » Fri Mar 23, 2012 9:38 pm

If either of you have a user_settings file with a preset that causes this, could you please provide it's contents so I can re-create it.

The picture settings panel is "Mondays" code. The whole main window is pretty dire to be honest, which is why I've been re-writing everything recently. Most of this is getting chucked pretty soon.

SnickySnacks
Posts: 5
Joined: Thu Mar 15, 2012 11:48 pm

Re: [WinGUI] Handbrake crashing when custom preset selected

Postby SnickySnacks » Wed Mar 28, 2012 1:33 am

Somehow I missed the reply to this, here's my user_presets.xml

Code: Select all

<?xml version="1.0"?>
<ArrayOfPreset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Preset>
    <Name>Anime480i</Name>
    <Query> -f mp4 --detelecine --decomb -X 720 -Y 480 --crop 0:0:0:0 --custom-anamorphic  --display-width 640  --keep-display-aspect  -e x264 -q 19 --vfr  -a 1,1 -E faac,copy:ac3 -B 160,0 -6 dpl2,auto -R Auto,Auto -D 0,0 --gain=0,0 --audio-copy-mask none --audio-fallback ffac3 --markers="C:\Users\Deathlok\AppData\Local\Temp\Nadia 6-4-4-chapters.csv" -x b-adapt=2:rc-lookahead=50:bframes=6:deblock=1,1:psy-rd=0.40,0.00:aq-strength=0.6:me=umh:trellis=2:no-dct-decimate=1 --verbose=1</Query>
    <Description />
    <UsePictureFilters>false</UsePictureFilters>
    <PictureSettingsMode>None</PictureSettingsMode>
    <IsBuildIn>false</IsBuildIn>
    <IsDefault>false</IsDefault>
    <Task>
      <Title>0</Title>
      <Angle>0</Angle>
      <PointToPointMode>Chapters</PointToPointMode>
      <StartPoint>0</StartPoint>
      <EndPoint>0</EndPoint>
      <OutputFormat>Mp4</OutputFormat>
      <LargeFile>false</LargeFile>
      <OptimizeMP4>false</OptimizeMP4>
      <IPod5GSupport>false</IPod5GSupport>
      <Width xsi:nil="true" />
      <Height xsi:nil="true" />
      <MaxWidth>720</MaxWidth>
      <MaxHeight>480</MaxHeight>
      <Cropping>
        <Top>0</Top>
        <Bottom>0</Bottom>
        <Left>0</Left>
        <Right>0</Right>
      </Cropping>
      <HasCropping>true</HasCropping>
      <Anamorphic>Custom</Anamorphic>
      <DisplayWidth>640</DisplayWidth>
      <KeepDisplayAspect>true</KeepDisplayAspect>
      <PixelAspectX>0</PixelAspectX>
      <PixelAspectY>0</PixelAspectY>
      <Modulus xsi:nil="true" />
      <Deinterlace>Off</Deinterlace>
      <Decomb>Default</Decomb>
      <Detelecine>Default</Detelecine>
      <Denoise>Off</Denoise>
      <Deblock>0</Deblock>
      <Grayscale>false</Grayscale>
      <VideoEncodeRateType>ConstantQuality</VideoEncodeRateType>
      <VideoEncoder>X264</VideoEncoder>
      <FramerateMode>VFR</FramerateMode>
      <Quality>19</Quality>
      <VideoBitrate xsi:nil="true" />
      <TwoPass>false</TwoPass>
      <TurboFirstPass>false</TurboFirstPass>
      <Framerate xsi:nil="true" />
      <AudioTracks>
        <AudioTrack>
          <Bitrate>160</Bitrate>
          <DRC>0</DRC>
          <Encoder>Faac</Encoder>
          <Gain>0</Gain>
          <MixDown>DolbyProLogicII</MixDown>
          <SampleRate>0</SampleRate>
          <SampleRateDisplayValue>Auto</SampleRateDisplayValue>
          <ScannedTrack>
            <TrackNumber>0</TrackNumber>
            <SampleRate>0</SampleRate>
            <Bitrate>0</Bitrate>
          </ScannedTrack>
        </AudioTrack>
        <AudioTrack>
          <Bitrate>0</Bitrate>
          <DRC>0</DRC>
          <Encoder>Ac3Passthrough</Encoder>
          <Gain>0</Gain>
          <MixDown>Auto</MixDown>
          <SampleRate>0</SampleRate>
          <SampleRateDisplayValue>Auto</SampleRateDisplayValue>
          <ScannedTrack>
            <TrackNumber>0</TrackNumber>
            <SampleRate>0</SampleRate>
            <Bitrate>0</Bitrate>
          </ScannedTrack>
        </AudioTrack>
      </AudioTracks>
      <AllowedPassthruOptions>
        <AudioAllowAACPass>false</AudioAllowAACPass>
        <AudioAllowAC3Pass>false</AudioAllowAC3Pass>
        <AudioAllowDTSHDPass>false</AudioAllowDTSHDPass>
        <AudioAllowDTSPass>false</AudioAllowDTSPass>
        <AudioAllowMP3Pass>false</AudioAllowMP3Pass>
        <AudioEncoderFallback>Ac3</AudioEncoderFallback>
      </AllowedPassthruOptions>
      <SubtitleTracks />
      <IncludeChapterMarkers>true</IncludeChapterMarkers>
      <ChapterNames />
      <AdvancedEncoderOptions>b-adapt=2:rc-lookahead=50:bframes=6:deblock=1,1:psy-rd=0.40,0.00:aq-strength=0.6:me=umh:trellis=2:no-dct-decimate=1</AdvancedEncoderOptions>
      <x264Preset>None</x264Preset>
      <x264Profile>None</x264Profile>
      <X264Tune>None</X264Tune>
      <Verbosity>0</Verbosity>
      <DisableLibDvdNav>false</DisableLibDvdNav>
      <PreviewStartAt xsi:nil="true" />
      <PreviewDuration xsi:nil="true" />
    </Task>
    <AudioPassthruSettings>
      <AudioAllowAACPass>false</AudioAllowAACPass>
      <AudioAllowAC3Pass>false</AudioAllowAC3Pass>
      <AudioAllowDTSHDPass>false</AudioAllowDTSHDPass>
      <AudioAllowDTSPass>false</AudioAllowDTSPass>
      <AudioAllowMP3Pass>false</AudioAllowMP3Pass>
      <AudioEncoderFallback>Ac3</AudioEncoderFallback>
    </AudioPassthruSettings>
  </Preset>
</ArrayOfPreset>


Return to “Bugs”