Log in

View Full Version : [bug?]: .avsi file called "avisynth_motion_menu.avsi" crashes AviSynth, VirtualDub...


danpos
6th September 2006, 02:28
@Avisynth developers

I did an .avsi file which I did call it as "avisynth_motion_menu.avsi" and put it into avisynth's plugins for autoload purpose. After that, AviSynth crashed out, also attacking VirtualDubMod (it didn't load avi files anymore, being reported a error on kernel32.dll). VirtualDub from Avery Lee did load avi files but not .avs file. MPC, Mplayer also crashed out when I tried out load any .avs script. With others aplications happened the same thing. Changing the name file fixed the issue. I'm using latest Avisynth stable release.

Is it a bug or "avisynth" is a reserved word?

JFYI. :)

Regards,

IanB
6th September 2006, 02:46
Changing the name to what?

There are no reserved filenames. The .avsi doesn't recursively load itself forever by chance. (really bad thing!)

:script:

danpos
6th September 2006, 03:13
@IanB

The problem isn't the name itself but the content of file. Whatever be the name which I gave to it, avisynth crashes with this file:

whatever.avsi:


################################
#Motion Menus by Matt Longbrake#
################################

# With help from Dividee
# These functions create a motion menu of any size and length.
# There are versions for 6, 4, and 2 clip menus.

# Usage: Import this script into your script with something like Import("menu.avs")
# Call the function with menu6, menu4, or menu2
# Arguments are:
# menu6(clip1,"clip1 caption",clip2,"clip2 caption",...,
#\ "Menu Title",width,height,length (in frames))
# Notes: Using 0 for width or height will return a 640x480 clip
# Using 0 for length will make the menu the same length as the first clip

function menu6(clip a, string txt1, clip b, string txt2, clip c, string txt3, clip d,
\ string txt4, clip e, string txt5, clip f, string txt6,
\ string title, int x, int y, int length) {
BlankClip(a, width=640, height=480)
Layer(a.BicubicResize(180,136),"add",256, 30,108).Subtitle(txt1, 38,260)
Layer(b.BicubicResize(180,136),"add",256,230,108).Subtitle(txt2,238,260)
Layer(c.BicubicResize(180,136),"add",256,430,108).Subtitle(txt3,438,260)
Layer(d.BicubicResize(180,136),"add",256, 30,284).Subtitle(txt4, 38,436)
Layer(e.BicubicResize(180,136),"add",256,230,284).Subtitle(txt5,238,436)
Layer(f.BicubicResize(180,136),"add",256,430,284).Subtitle(txt6,438,436)
Subtitle(title,38,64,size=36)
(x == 0) || (y == 0) ? last : BicubicResize(x,y)
length == 0 ? last : Trim(0,length-1)
}

function menu4(clip a, string txt1, clip b, string txt2, clip c, string txt3, clip d, string

txt4, string title, int x, int y, int length) {
BlankClip(a, width=640, height=480)
Layer(a.BicubicResize(180,136),"add",256,100,108).Subtitle(txt1,108,260)
Layer(b.BicubicResize(180,136),"add",256,360,108).Subtitle(txt2,368,260)
Layer(c.BicubicResize(180,136),"add",256,100,284).Subtitle(txt3,108,436)
Layer(d.BicubicResize(180,136),"add",256,360,284).Subtitle(txt4,368,436)
Subtitle(title,108,64,size=36)
(x == 0) || (y == 0) ? last : BicubicResize(x,y)
length == 0 ? last : Trim(0,length-1)
}

function menu2(clip a, string txt1, clip b, string txt2, string title, int x, int y, int

length) {
BlankClip(a, width=640, height=480)
Layer(a.BicubicResize(280,210),"add",256, 30,160).Subtitle(txt1, 38,386)
Layer(b.BicubicResize(280,210),"add",256,330,160).Subtitle(txt2,338,386)
Subtitle(title,38,96,size=36)
(x == 0) || (y == 0) ? last : BicubicResize(x,y)
length == 0 ? last : Trim(0,length-1)
}

The script that I did use is something like this:

c1=avisource("file1.avi",audio=false)
c2=avisource("file2.avi",audio=false)
c3=avisource("file3.avi",audio=false)
c4=avisource("file4.avi",audio=false)
c5=avisource("file5.avi",audio=false)
c6=avisource("file6.avi",audio=false)

menu6(c1,"subtitle 1",c2,"subtitle 2",c3,"subtitle 3",
\ c4,"subtitle 4",c5,"subtitle 5",c6,"subtitle 6",
\"Title name",720,576,250)

So, I guess that the code of avsi file is screwing avisynth up, but what's the error?

Thanks for your reaction.

Regards,

IanB
6th September 2006, 04:01
You can't debug .avsi auto load scripts. They have to be perfect.

Include the text of the Iscript in a normal script to debug it.

Consider using Import() instead of autoloading the script, your life will be much easier. :D

danpos
6th September 2006, 04:21
@IanB

OK, I got it! :)

Thanks for yours advices.

Regards,

IanB
6th September 2006, 04:26
function menu4(clip a, string txt1, clip b, string txt2, clip c, string txt3, clip d, string

txt4, string title, int x, int y, int length) {
....

function menu2(clip a, string txt1, clip b, string txt2, string title, int x, int y, int

length) {These look a little sus or did they paste into the post badly

danpos
6th September 2006, 04:45
@IanB

Yep, you're right. I did follow your advise and so I got success in track down the problem in this part of avsi file. Thanks! :) Anyway, I found out that a bad built avsi file will screw avisynht up in the way that it gets crazy!!:eek:

More one thing learned (ah, and the '\' usage too :D ).

Regards,