-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HistogramRGBParade script crash #360
Comments
Also poisondeathray report - I believe the crash is dimension related (width, height) |
Windows Logs/Application: 0xc0000374, Heap Corruption. Code: Faulting application name: VirtualDub64.exe, version: 2.0.0.0, time stamp: 0x5e73f48a Heap corruption may be detected by some check in ntdll.dll but the source of corruption may be in either AVS or calling application module ? |
Thanks, this kind of bug is probably easy to reproduce and resolve, I'm gonna check it soon. |
Yes - the size 256x256 with HistogramRGBParade(width=1.0) work now. Thank you. |
Script functions from http://avisynth.nl/images/Histograms_in_RGB_%26_CMY.avsi
Checked with 3.6.1 (release ?) and 3.7.3. test 7:
function HistogramRGBLevels( clip input, bool "range", float "factor" )
{
return HistogramRGBLevelsType( input, input.ConvertToRGB(), $800000, $008000, $000080, range, factor )
}
function HistogramCMYLevels( clip input, bool "range", float "factor" )
{
return HistogramRGBLevelsType( input, input.ConvertToRGB().Invert(), $008080, $800080, $808000, range, factor )
}
function HistogramRGBParade( clip input, float "width" )
{
return HistogramRGBParadeType( input, input.ConvertToRGB(), $800000, $008000, $000080, width )
}
#---
Generic levels form, not very useful as a standalone function
function HistogramRGBLevelsType( clip input, clip rgb, int color1, int color2, int color3, bool "range", float "factor" )
{
range = default(range,true)
ChannelHeight = 64
Gap = 8 # divisible by 4
}
Generic parade form, not very useful as a standalone function
function HistogramRGBParadeType( clip input, clip rgb, int color1, int color2, int color3, float "width" )
{
width = default(width,0.25)
Gap = 8 # divisible by 4
}
Used by functions above, not a standalone function
function HistogramChannel( clip input, string type, int color, string colorMode, int height, bool range, float "factor" )
{
input.Histogram(type, factor).Crop(input.Width(),0,0,height).Greyscale()
range ? last : Levels(128,1.0,255,0,255,false)
return Overlay(BlankClip(color=color), mode=colorMode)
}
Returns "input" converted to same colorspace as "ref"
function ConvertToMatch( clip input, clip ref )
{
return ref.IsYV12() ? input.IsYV12() ? input : input.ConvertToYV12() :
ref.IsRGB32() ? input.IsRGB32() ? input : input.ConvertToRGB32() :
ref.IsRGB24() ? input.IsRGB24() ? input : input.ConvertToRGB24() :
ref.IsYUY2() ? input.IsYUY2() ? input : input.ConvertToYUY2() :
ref.IsYV16() ? input.IsYV16() ? input : input.ConvertToYV16() :
ref.IsYV24() ? input.IsYV24() ? input : input.ConvertToYV24() :
ref.IsY8() ? input.IsY8() ? input : input.ConvertToY8() :
ref.IsYV411() ? input.IsYV411() ? input : input.ConvertToYV411() :
input
}
Convert value to multiple of 4 which is >= 16
function m4( float x ) { return (x < 16 ? 16 : int(round(x / 4.0) * 4)) }
BlankClip(length=1, width=256, height=256, pixel_type="Y8")
ConvertToRGB32()
HistogramRGBParade()
Crash both VirtualDub and AVSmeter. The debugger with VirtualDub shows output:
Exception thrown at 0x00007FFA5458CF19 in VirtualDub64.exe: Microsoft C++ exception: ReturnExprException at memory location 0x000000000079CFC0.
Exception thrown at 0x00007FFA5458CF19 in VirtualDub64.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFA5458CF19 in VirtualDub64.exe: Microsoft C++ exception: ReturnExprException at memory location 0x000000000079CFC0.
Exception thrown at 0x00007FFA5458CF19 in VirtualDub64.exe: Microsoft C++ exception: ReturnExprException at memory location 0x000000000079CFC0.
Exception thrown at 0x00007FFA5458CF19 in VirtualDub64.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFA5458CF19 in VirtualDub64.exe: Microsoft C++ exception: ReturnExprException at memory location 0x000000000079CFC0.
Exception thrown at 0x00007FFA5458CF19 in VirtualDub64.exe: Microsoft C++ exception: ReturnExprException at memory location 0x000000000079D230.
Exception thrown at 0x00007FFA5458CF19 in VirtualDub64.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFA5458CF19 in VirtualDub64.exe: Microsoft C++ exception: ReturnExprException at memory location 0x000000000079D230.
Exception thrown at 0x00007FFA5458CF19 in VirtualDub64.exe: Microsoft C++ exception: ReturnExprException at memory location 0x000000000079D230.
Exception thrown at 0x00007FFA5458CF19 in VirtualDub64.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFA5458CF19 in VirtualDub64.exe: Microsoft C++ exception: ReturnExprException at memory location 0x000000000079D230.
Exception thrown at 0x00007FFA5458CF19 in VirtualDub64.exe: Microsoft C++ exception: ReturnExprException at memory location 0x000000000079D230.
Exception thrown at 0x00007FFA5458CF19 in VirtualDub64.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFA5458CF19 in VirtualDub64.exe: Microsoft C++ exception: ReturnExprException at memory location 0x000000000079D230.
Critical error detected c0000374
VirtualDub64.exe has triggered a breakpoint.
The text was updated successfully, but these errors were encountered: