Menu

#158 Resizers crash Avisynth on certain sizes and clip formats

v2.5x
closed
Filters (75)
5
2005-09-07
2005-09-06
gzarkadas
No

Several resize statements (with all resizers, ie
BilinearResize, BicubicResize LanczosResize,
Lanczos4Resize) crash Avisynth, under certain
combinations of clip format and requested dimensions.

The combinations are:

Clip format: YUY2
Requested width: odd (ie <> 2k)

Clip format: YV12
Requested width: not a multiple of 4 (ie <> 4k)

Clip format: YV12
Requested height: odd (ie <> 2k)

The message box "Unrecognised exception" appears for a
fraction of a second (just enough to read this message
or less; in the later case only a part of the dialog
borders may show but this is probably an eye impression
due to the very small times involved) and then the
video rendering application (VirtualDub 1.5.10 (build
18289 / release) in our case silently goes away.

NOTE:
Didn't have interlaced sources to test them also, but
from the documentation I suspect that for interlaced
video the following combinations will also produce an
error:

Clip format: YUY2
Requested height: odd (ie <> 2k)

Clip format: YV12
Requested height: not a multiple of 4 (ie <> 4k)

Discussion

  • gzarkadas

    gzarkadas - 2005-09-06

    Logged In: YES
    user_id=1301375

    # Several resize statements below (all commented out) crash
    Avisynth
    # The message box "Unrecognised exception" appears for a
    fraction of a second
    # (just enough to read this message or less; in the later
    case only a part of the dialog borders may show
    # but this is probably an eye impression due to the very
    small times involved)
    # and then the video rendering application (VirtualDub
    1.5.10 (build 18289 / release) in our case) silently dies.

    # YV12 clip (mpeg4) 360 x 288 pixels [(90x4) x (72x4)],
    progressive, 24fps
    ci_v = DirectShowSource("c:\shared\cvs\docs\media\circle.avi")
    # YUY2 clip
    ci_y = ci_v.ConvertToYUY2()
    # RGB clip
    ci_r = ci_v.ConvertToRGB()

    # RGB

    bl1 = ci_r.BilinearResize(359, 287) # ok
    bl1a = ci_r.BilinearResize(358, 287) # ok
    bl1b = ci_r.BilinearResize(359, 286) # ok
    bl2 = ci_r.BilinearResize(358, 286) # ok

    bc1 = ci_r.BicubicResize(359, 287) # ok
    bc1a = ci_r.BicubicResize(358, 287) # ok
    bc1b = ci_r.BicubicResize(359, 286) # ok
    bc2 = ci_r.BicubicResize(358, 286) # ok

    lz1 = ci_r.LanczosResize(359, 287) # ok
    lz1a = ci_r.LanczosResize(358, 287) # ok
    lz1b = ci_r.LanczosResize(359, 286) # ok
    lz2 = ci_r.LanczosResize(358, 286) # ok

    l41 = ci_r.Lanczos4Resize(359, 287) # ok
    l41a = ci_r.Lanczos4Resize(358, 287) # ok
    l41b = ci_r.Lanczos4Resize(359, 286) # ok
    l42 = ci_r.Lanczos4Resize(358, 286) # ok

    # YUY2

    # bl3 = ci_y.BilinearResize(359, 287) # this crashes
    Avisynth (w odd)
    bl3a = ci_y.BilinearResize(358, 287) # ok: w a multiple of 2
    # bl3b = ci_y.BilinearResize(359, 286) # this crashes
    Avisynth (w odd)
    bl4 = ci_y.BilinearResize(358, 286) # ok: w a multiple of 2

    # bc3 = ci_y.BicubicResize(359, 287) # this crashes
    Avisynth (w odd)
    bc3a = ci_y.BicubicResize(358, 287) # ok: w a multiple of 2
    # bc3b = ci_y.BicubicResize(359, 286) # this crashes
    Avisynth (w odd)
    bc4 = ci_y.BicubicResize(358, 286) # ok: w a multiple of 2

    # lz3 = ci_y.LanczosResize(359, 287) # this crashes
    Avisynth (w odd)
    lz3a = ci_y.LanczosResize(358, 287) # ok: w a multiple of 2
    # lz3b = ci_y.LanczosResize(359, 286) # this crashes
    Avisynth (w odd)
    lz4 = ci_y.LanczosResize(358, 286) # ok: w a multiple of 2

    # l43 = ci_y.Lanczos4Resize(359, 287) # this crashes
    Avisynth (w odd)
    l43a = ci_y.Lanczos4Resize(358, 287) # ok: w a multiple of 2
    # l43b = ci_y.Lanczos4Resize(359, 286) # this crashes
    Avisynth (w odd)
    l44 = ci_y.Lanczos4Resize(358, 286) # ok: w a multiple of 2

    # YV12

    # bl5 = ci_v.BilinearResize(359, 287) # this crashes
    Avisynth (w,h odd)
    # bl5a = ci_v.BilinearResize(356, 287) # this crashes
    Avisynth (h odd)
    # bl6 = ci_v.BilinearResize(358, 286) # this crashes
    Avisynth (w not a multiple of 4)
    bl6a = ci_v.BilinearResize(356, 286) # ok: w a multiple of 4
    # bl6b = ci_v.BilinearResize(358, 284) # this crashes
    Avisynth (w not a multiple of 4)
    bl7 = ci_v.BilinearResize(356, 284) # ok: w a multiple of 4

    # bc5 = ci_v.BicubicResize(359, 287) # this crashes
    Avisynth (w,h odd)
    # bc6 = ci_v.BicubicResize(358, 286) # this crashes
    Avisynth (w not a multiple of 4)
    bc6a = ci_v.BicubicResize(356, 286) # ok: w a multiple of 4
    # bc6b = ci_v.BicubicResize(358, 284) # this crashes
    Avisynth (w not a multiple of 4)
    bc7 = ci_v.BicubicResize(356, 284) # ok: w a multiple of 4

    # lz5 = ci_v.LanczosResize(359, 287) # this crashes
    Avisynth (w,h odd)
    # lz6 = ci_v.LanczosResize(358, 286) # this crashes
    Avisynth (w not a multiple of 4)
    lz6a = ci_v.LanczosResize(356, 286) # ok: w a multiple of 4
    # lz6b = ci_v.LanczosResize(358, 284) # this crashes
    Avisynth (w not a multiple of 4)
    lz7 = ci_v.LanczosResize(356, 284) # ok: w a multiple of 4

    # l45 = ci_v.Lanczos4Resize(359, 287) # this crashes
    Avisynth (w,h odd)
    # l46 = ci_v.Lanczos4Resize(358, 286) # this crashes
    Avisynth (w not a multiple of 4)
    l46a = ci_v.Lanczos4Resize(356, 286) # ok: w a multiple of 4
    # l46b = ci_v.Lanczos4Resize(358, 284) # this crashes
    Avisynth (w not a multiple of 4)
    l47 = ci_v.Lanczos4Resize(356, 284) # ok: w a multiple of 4

    return BlankClip.SubTitle("All went well")

     
  • gzarkadas

    gzarkadas - 2005-09-06
    • priority: 5 --> 7
     
  • Wilbert Dijkhof

    Wilbert Dijkhof - 2005-09-07

    Logged In: YES
    user_id=591008

    Which avs version did you use? Btw, i know that also v2.56
    rc1 has such problems (ie not giving the right error
    exceptions), but VDub/VDubMod shouldn't close itself.

     
  • Ian Brabham

    Ian Brabham - 2005-09-07

    Logged In: YES
    user_id=673887

    message box "Unrecognised exception"

    Implies 2.5.5 or an early 2.5.6. All recent 2.5.6 now
    explicitly decodes what was Unrecognised exceptions.

    My copy of the current 256RC1 handles this correctly.

    IanB

     
  • Ian Brabham

    Ian Brabham - 2005-09-07

    Logged In: YES
    user_id=673887

    message box "Unrecognised exception"

    Implies 2.5.5 or an early 2.5.6. All recent 2.5.6 now
    explicitly decodes what was Unrecognised exceptions.

    My copy of the current 256RC1 handles this correctly.

    IanB

     
  • gzarkadas

    gzarkadas - 2005-09-07

    Logged In: YES
    user_id=1301375

    Version 2.55
    File version of avisynth.dll is 2,5,5,0

     
  • Ian Brabham

    Ian Brabham - 2005-09-07
    • priority: 7 --> 5
    • status: open --> closed
     
  • Ian Brabham

    Ian Brabham - 2005-09-07
    • assigned_to: nobody --> ianb1957
     
  • Ian Brabham

    Ian Brabham - 2005-09-07

    Logged In: YES
    user_id=673887

    Known bug in 2.55. Compiler bug cause Error Report code to
    GPF

    Try 2.5.6 RC1

     
  • gzarkadas

    gzarkadas - 2005-09-08

    Logged In: YES
    user_id=1301375

    Still though, I have the feeling that instead of throwing an
    "Unrecognised exception" it would be better to explicitly
    check input size and clip colorspace and inform the user
    that it passed incompatible parameters to the resize function.
    Note: I haven't checked 2.5.6 RC1 (I prefer to work with
    production versions only), so if it does check the
    parameters simply ignore this comment.

     
  • Ian Brabham

    Ian Brabham - 2005-09-13

    Logged In: YES
    user_id=673887

    This is exactly what the code is written to do, unfortunatly
    due to compiler bugs while trying to report the script error a
    GPF happens and while trying to report the GPF another
    GPF happens hence only the last generic handler survives
    and you get the "Unrecognised exception".

    Please check the changelist for the latest CVS version for
    any bug you find having been already fixed. Report them only
    if they still occur in the newest version.

    2.5.6 is about to be the production version, I suggest you test
    all your favourite bugs NOW! and report them so the final
    release has them fixed.

     

Log in to post a comment.