Log in

View Full Version : SysInfo plugin v0.1.2.9


Pages : 1 2 3 [4] 5 6

StainlessS
28th April 2020, 19:57
P said how it contains mucho Nekopanda code, ie Neo author/forker.
here in brief mods [since previous issue]

# SI_CHECK.avs

SI_VER = 0.118 # Minimum required version of SysInfo

/*
Req SysInfo (c) Groucho2004, RT_Stats 1.43+.
*/

########### CONFIG ##############
ERR_LEVEL=0 # 0 = Everything : 1 == WARNINGS+ : 2 ERRORS ONLY
W=1280
H=720
#################################################################
Assert(FuncNameExists("RT_Stats"),"SI_Check: Need RT_Stats v1.43+")
Assert(RT_FunctionExist("SysInfoVersion") && SysInfoVersion>=SI_VER,"SI_Check: Need Groucho2004 SysInfo v"+String(SI_VER))
HasGScript=RT_FunctionExist("GScript")
IsPlus=(FindStr(VersionString,"AviSynth+")!=0||FindStr(VersionString," Neo")!=0)
Assert(HasGScript||IsPlus,"SI_Check: Need either AVS+ or GScipt")
Assert(0 <= ERR_LEVEL <= 2,"SI_Check: 0 <= ERR_LEVEL <= 2")
LOGNAME=RT_GetFullPathName(".\SysInfo_Check.Log")
RT_FileDelete(LOGNAME)
TOT_OK=0
TOT_NI=0
TOT_BAD=0
SubsString=""

#################################################################
Function FuncNameExists(String Fn) {Try{Eval(Fn+"()")B=True}catch(e){Assert(e.FindStr("syntax")==0,"FuncNameExists: Error in Function Name '"+Fn+"'") B=(e.FindStr("no function named")==0)}Return B}
Function IsAvs26() { VersionNumber>=2.6}
Function IsAvsNeo() { ex=false try{ex=FunctionExists("DumpFilterGraph")} catch(msg){} return ex }
Function IsAvsPlus() { FindStr(VersionString,"AviSynth+")!=0||FindStr(VersionString," Neo")!=0}
Function PlusBuildNumber() { V=VersionString Off=(!IsAvsPlus)?-1:FindStr(V,"(r") return (Off==0)?-1:V.MidStr(Off+2).Value.Int } # -1 not present. Avs+ & Neo, (More than 4 digits, Max 24 bit, ~16M)
Function AvsVersionNumberString() { s=VersionString ND="0123456789." s=s.MidStr(s.StrBrkChrLen(ND,True)+1) Return s.LeftStr(s.StrMatchChrLen(ND,True)) }
Function AvsPlusVersionNumber() { Return PlusBuildNumber } # Stub for AvsPlusBuildNumber(), suggest AvsPlusVersionNumber is deprecated.
Function IsAvs64Bit() { Return RT_GetSystemEnv("PROCESSOR_ARCHITECTURE").Findstr("64")!=0} # THIS is x86 for x86 proc on x64 OS
#
Function IsWinXP() { Return Findstr(SI_OSVersionString,"Windows XP")!=0}
Function IsWinVista() { Return Findstr(SI_OSVersionString,"Vista")!=0}
Function IsWin7() { Return Findstr(SI_OSVersionString,"Windows 7")!=0}
Function IsWin8() { S=SI_OSVersionString Return Findstr(S,"Windows 8 ")!=0||Findstr(S,"Windows 8.0 ")!=0}
Function IsWin81() { Return Findstr(SI_OSVersionString,"Windows 8.1")!=0}
Function IsWin10() { Return Findstr(SI_OSVersionString,"Windows 10")!=0}
#!
Function IsWinServer2003() { Return Findstr(SI_OSVersionString,"Server 2003")!=0}
Function IsWinServer2008() { S=SI_OSVersionString i=S.Findstr("Server 2008") Return i!=0&&(S.RT_Ord(i+11)==0||S.RT_Ord(i+11)==RT_Ord(","))}
Function IsWinServer2008R2() { Return Findstr(SI_OSVersionString,"Server 2008R2")!=0}
Function IsWinServer2012() { S=SI_OSVersionString i=S.Findstr("Server 2012") Return i!=0&&(S.RT_Ord(i+11)==0||S.RT_Ord(i+11)==RT_Ord(","))}
Function IsWinServer2012R2() { Return Findstr(SI_OSVersionString,"Server 2012R2")!=0}
#
Function HasMMX() { S=SI_CPUExtensions i=S.Findstr("MMX") Return i!=0&&(S.RT_Ord(i+3)==0||S.RT_Ord(i+3)==RT_Ord(","))}
Function HasSSE() { S=SI_CPUExtensions i=S.Findstr("SSE") Return i!=0&&(S.RT_Ord(i+3)==0||S.RT_Ord(i+3)==RT_Ord(","))}
Function HasSSE2() { Return Findstr(SI_CPUExtensions,"SSE2")!=0}
Function HasSSE3() { Return Findstr(SI_CPUExtensions,"SSE3")!=0}
Function HasSSE41() { Return Findstr(SI_CPUExtensions,"SSE4.1")!=0}
Function HasSSE42() { Return Findstr(SI_CPUExtensions,"SSE4.2")!=0}
Function HasAVX() { S=SI_CPUExtensions i=S.Findstr("AVX")Return i!=0&&(S.RT_Ord(i+3)==0||S.RT_Ord(i+3)==RT_Ord(","))}
Function HasAVX2() { Return Findstr(SI_CPUExtensions,"AVX2")!=0}
#!
Function HasAVX512() { Return Findstr(SI_CPUExtensions,"AVX512")!=0}
Function HasFMA3() { Return Findstr(SI_CPUExtensions,"FMA3")!=0}
Function HasFMA4() { Return Findstr(SI_CPUExtensions,"FMA4")!=0}
Function HasSSSE3() { Return Findstr(SI_CPUExtensions,"SSSE3")!=0}
#
Function OsBuildNumber() { S=SI_OSVersionString i=S.Findstr("Build ") Return (i==0)?-1:S.MidStr(i+6).Value.Int } # -1 not present.
Function OSServicePack() { S=SI_OSVersionString i=S.Findstr("Service Pack ") Return (i==0)?-1:S.MidStr(i+13).Value } # -1 not present.
#
Function VariableTypeName(val v) { Return v.IsClip?"clip":v.IsInt?"int":v.Isfloat?"float":v.IsString?"string":v.IsBool?"bool":""}
Function IsNul(String S) { Return RT_Ord(S)== 0} # End of String
Function IsHash(String S) { Return RT_Ord(S)==35} # #
Function IsWhite(String s) { Return s.RT_Ord==32||(s.RT_Ord>=8&&s.RT_Ord<=13) }
Function EatWhite(String s) { Return s.IsWhite?s.MidStr(2).EatWhite:s }
Function Strenc(string s,n) { Return s.RT_Ord==0?"":Chr(s.RT_Ord+n)+s.MidStr(2).strenc(n) }
#################################################################

CMPS="""
AI_AvsFileVersion @ ?
AI_AvsPlusBuildNumber @ PlusBuildNumber
AI_AvsProductVersion @ ?
AI_GScriptExists @ RT_FunctionExist("GScript")
AI_IsAvs26 @ IsAvs26
AI_IsAvsNeo @ IsAvsNeo
AI_IsAvsPlus @ IsAvsPlus
SI_AvailableSystemMemory @ ?
SI_CPUExtensions @ ?
SI_CPUName @ ?
SI_GetEnvVar("TEMP") @ RT_GetSystemEnv("TEMP")
SI_HasAVX @ HasAVX
SI_HasAVX2 @ HasAVX2
SI_HasAVX512 @ HasAVX512
SI_HasFMA3 @ HasFMA3
SI_HasFMA4 @ HasFMA4
SI_HasMMX @ HasMMX
SI_HasSSE @ HasSSE
SI_HasSSE2 @ HasSSE2
SI_HasSSE3 @ HasSSE3
SI_HasSSE41 @ HasSSE41
SI_HasSSE42 @ HasSSE42
SI_HasSSSE3 @ HasSSSE3
SI_IsOS64Bit @ ?
SI_IsWin10 @ IsWin10
SI_IsWin7 @ IsWin7
SI_IsWin8 @ IsWin8
SI_IsWin81 @ IsWin81
SI_IsWinServer2003 @ IsWinServer2003
SI_IsWinServer2008 @ IsWinServer2008
SI_IsWinServer2008R2 @ IsWinServer2008R2
SI_IsWinServer2012 @ IsWinServer2012
SI_IsWinServer2012R2 @ IsWinServer2012R2
SI_IsWinVista @ IsWinVista
SI_IsWinXP @ IsWinXP
SI_LogicalCores @ RT_GetSystemEnv("NUMBER_OF_PROCESSORS").Value.Int
SI_ModulePath @ ?
SI_NumberOfCPUs @ ?
SI_OSBuildNumber @ OsBuildNumber
SI_OSServicePack @ OSServicePack
SI_OSVersionNumber @ ?
SI_OSVersionString @ ?
SI_PhysicalCores @ ?
SI_ProcessBitness @ IsAvs64Bit?64:32
SI_ProcessName @ RT_GetProcessName(False)
SI_ScreenBitsPerPixel @ ?
SI_ScreenResX @ ?
SI_ScreenResY @ ?
SI_TotalSystemMemory @ ?
SysInfoVersion @ ?
"""

GSTRING = """
Lines = CMPS.RT_TxtQueryLines
for(i=0,Lines-1) {
testLine=CMPS.RT_TxtGetLine(Line=i).EatWhite.RevStr.EatWhite.RevStr
if(!testLine.IsNul && !testLine.IsHash) {
testS=testLine
HashLoc=testS.RT_FindStr("#")
testS=HashLoc>0?testS.LeftStr(HashLoc-1) : testS # End string at FIRST '#' Hash comment char
testS=testS.RevStr.EatWhite.RevStr # trim end White
AtLoc=testS.RT_FindStr("@")
Assert(AtLoc>0 ,RT_String("LINE %d, @ Separator Not Found : '%s'",i+1,testS))
LftS=TestS.LeftStr(AtLoc-1).RevStr.EatWhite.RevStr
Assert(LftS!="",RT_String("LINE %d, LHS SI string Not Found : '%s'",i+1,testS))
RgtS=TestS.MidStr(AtLoc+1).EatWhite
Assert(RgtS!="",RT_String("LINE %d, RHS Synthesized Func Not Found : '%s'",i+1,testS))
LftResult = Eval(LftS)
LogStr=""
if(RgtS=="?") {
LogStr=RT_String("WARN: Synthesized Func Not Implemented: %s = '%s'",LftS,String(LftResult))
ERR=2
TOT_NI=TOT_NI+1
} Else {
RgtResult = Eval(RgtS)
mxlen=Max(LftS.StrLen,RgtS.StrLen)
if(LftResult.VariableTypeName==RgtResult.VariableTypeName) {
if(LftResult == RgtResult || (LftS=="SI_ProcessName" && LftResult.RT_FileNameSplit(12)==RgtResult)) {
LogStr=RT_String("OK: SAME RESULT\n %-*s = '%s'\n %-*s = '%s'",mxlen,LftS,String(LftResult),mxlen,RgtS,String(RgtResult))
ERR=1
TOT_OK=TOT_OK+1
} else {
LogStr=RT_String("*BAD*: NON Matched\n %-*s = '%s'\n %-*s = '%s'",mxlen,LftS,String(LftResult),mxlen,RgtS,String(RgtResult))
ERR=3
TOT_BAD=TOT_BAD+1
}
} Else {
LogStr=RT_String("*ERR*: Incompatible Result Types\n %-*s = '%s'\n %-*s = '%s'",mxlen,LftS,String(LftResult),mxlen,RgtS,String(RgtResult))
ERR=4
TOT_BAD=TOT_BAD+1
}
}
RT_DebugF("%s",LogStr,name="SI_CHECK: ")
if(ERR>ERR_LEVEL) {
SubsString=RT_String("%s\n%s",SubsString,LogStr)
}
}
}
HaveSubs=SubsString!=""
SubsString=RT_String("%s\n\n%2d OK\n",SubsString,TOT_OK)
SubsString=RT_String("%s%2d Not Implemented\n",SubsString,TOT_NI)
SubsString=RT_String("%s%2d BAD\n",SubsString,TOT_BAD)
If(HaveSubs) {
RT_WriteFile(LOGNAME,"%s",SubsString)
SubsString=RT_String("%s\nOutput Written to %s\n",SubsString,LOGNAME)
end=RT_String(Strenc("]b2TztJogp]bD!&d!312:!]bFHspvdip3115]b.",-1),137)
SubsString=RT_String("%s%s%*s\n",SubsString,RT_StrPad("",H/20,Chr(10)),(W/10+end.StrLen)/2,end)
}
"""

(HasGScript) ? GSCript(GSTRING) : Eval(GSTRING)

#################################################################
LINES=RT_TxtQueryLines(SubsString)
L=LINES*20+H
Global Glb_S=SubsString # NEO fix
BlankClip(Width=W,Height=H,Length=L).ScriptClip("""RT_Subtitle("%s",Glb_S,x=10,y=height-current_frame,expx=true,expy=true)""")
return Last

Groucho2004
28th April 2020, 20:01
P said how it contains mucho Nekopanda code, ie Neo author/forker.Ah, OK. I can accommodate for that.

Groucho2004
29th April 2020, 11:18
v0.1.1.8

Changed the logic for AI_IsAvsNeo. If Neo-specific functions are found in AVS+, it will return true in addition to AI_IsAvsPlus being true
Let Avisynth handle errors for SI_GetEnvVar

StainlessS
29th April 2020, 12:31
Groucho, think there has been misunderstanding.


Checker works ok on new version Avs+, does not detect Avs Neo even though 'neo' is in the version string, ie "AviSynth+_3.5.2_(r3218,_neo,_i386)"
P must be watching. [We do check on " Neo" for AVS NEO, and is "_neo" in new version string.]

All I meant there was that new Pinterf avs version did not erroneously fire an IsAvsNeo() even though there is an 'neo' substring in the VersionString.
Also meant that Pinterf maybe has deliberately avoided causing problem for the IsAvsNeo() function.

Right now, I dont think there is "a snowballs chance in hell" that Avs Neo is gonna be revived, I'm betting that Nekopanda is now using Avs+ 3.x.

I'm not sure that we actually need an IsAvsNeo() [although it might be used in some scripts].

If we do continue to use IsAvsNeo(), then maybe it should flag presence of eg DumpFilterGraph() and Arrays.

Anybody any thoughts ? [@ Groucho/Pinterf/Real.Finder/NekoPanda, or other] ?

So, Groucho, dont jump the gun but may need change AI_IsAvsNeo() again.

Lets see what (if anything) anybody has to say.

EDIT:
I'm suggesting something like this to re-purpose IsAvsNeo and sysinfo AI_IsAvsNeo to flag presence of DumpFilterGraph() and Arrays. [I think avsNeo had Arrays, not sure]

Function IsAvsNeo() { ex=false try{ex=FunctionExists("DumpFilterGraph")} catch(msg){} return ex }

Groucho2004
29th April 2020, 12:48
If we do continue to use IsAvsNeo(), then maybe it should flag presence of eg DumpFilterGraph()That's exactly what I did:
AVSValue AI_IsAvsNeo(AVSValue args, void* user_data, IScriptEnvironment* env)
{
return (env->FunctionExists("DumpFilterGraph")) ? true : false;
}

StainlessS
29th April 2020, 12:59
That's exactly what I did:
OK, I'm doing same but still if anybody any problems with re-purposing, then say.

Ill Update the SI_CHECK.AVS in post #151.

EDIT: DONE.

Groucho2004
29th April 2020, 13:15
DONE.Thank you.

I have a proposition for the FDA and manufacturers of disinfectants/Purell/etc. to NOT warn people about ingesting and/or injecting bleach/disinfectants into their bodies. Let natural selection run its course, future generations will benefit from it.

pinterf
29th April 2020, 13:28
EDIT:
I'm suggesting something like this to re-purpose IsAvsNeo and sysinfo AI_IsAvsNeo to flag presence of DumpFilterGraph() and Arrays. [I think avsNeo had Arrays, not sure]

Function IsAvsNeo() { ex=false try{ex=FunctionExists("DumpFilterGraph")} catch(msg){} return ex }

Avs Neo did not use arrays. I experienced with array four years ago but it did not go live in Avisynth+.

I started including only MT fixes from Neo branch, but there were many, sparsed over the years. Nekopanda version was also hugely changing between the fixes, "functions", cache improvements, filter graph, CUDA, etc. finally I had to pull almost every new features from it.

But at the end of the code refresh, arrays and runtime functions did not work, so I had to reintroduce arrays and bring it back to my code (the obstacle was the new "function" object feature).

Then came a partial interface merge, then changing runtime function to the classic - compatible - behaviour, while keeping Neo features as well.

This Avisynth version - because many of his extensions became integral part of avs+ - is probably breaking "classic Nekopanda avs+" interface.

For example frame properties are completely different in present avs+ (and came from VapourSynth).

Nekopanda CUDA versions has their own filter set using Avs+ Neo's own interface. They are surely not compatible with this release. I have not enabled CUDA in the code - it (the source code sync) is not even 100% complete, since as I said I only wanted to get the mt fixes originally. Nor have I time to test and rewrite/rebuild their plugins.

StainlessS
29th April 2020, 14:20
OK, then hows bout IsAvsNeo now just means avs+ version 3.5.2+ (with DumpFilterGraph() and Arrays) and we forget that NekoPanda AvsNeo ever existed ?

EDIT: moving to script edits to below
New

Function IsAvsNeo() { Return AI_IsAvsNeo } # DumpFilterGraph() and Arrays [source Groucho Sysinfo based on existance of DumpFilterGraph ]
Function IsAvsPlus() { Return AI_IsAvsPlus} # Any version AVSPlus

Old

Function IsAvsPlus() { Return AI_IsAvsPlus||AI_IsAvsNeo } # Remove from IsAvsPlus()


EDIT:
Of course as new scripts get written edited, then target is to directly use AI_IsAvsNeo and AI_IsAvsPlus from SysInfo, and eventually drop IsAvsPlus/IsAvsNeo altogether.

pinterf
29th April 2020, 14:30
Based on IsAvsNeo you could introduce an IsVapourSynth flag as well since frame properties came from Myrsloik's world.
And probably IsActingSpecificallyUponThisAndThatFeatureBitRequiresTwoPintsOfLager() :)

StainlessS
29th April 2020, 14:35
I just dont want scripts to f*** U* because IsAvsNeo is removed altogether if any scripts still use it.

I wrote at least one script that altered behaviour because of AvsNeo.

IsAvsNeo could just mean eg Arrays are available if required.

EDIT: Re-purpose it to mean this one "AviSynth+_3.5.2_(r3218,_neo,_i386)"

real.finder
29th April 2020, 14:57
OK, then hows bout IsAvsNeo now just means avs+ version 3.5.2+ (with DumpFilterGraph() and Arrays) and we forget that NekoPanda AvsNeo ever existed ?


I think this is a bad thing

for arrays, didn't this help? http://avisynth.nl/index.php/Internal_functions#FunctionExists

also PlusBuildNumber/AvsPlusVersionNumber like I did with my scripts

real.finder
29th April 2020, 15:03
ok, I think I got what is the problem

my old
function IsAvsNeo()
{
FindStr(VersionString, "AviSynth Neo") != 0
}

should be ok

StainlessS
29th April 2020, 15:03
So what do you suggest that we do with IsAvsNeo() ?
[we cant just forget it existed, we dont want to emulate problems down to devs dropping YUY2 for YV16 and scripts dont work now for either YUY2 nor YV16].

EDIT:

I have a proposition for the FDA and manufacturers of disinfectants/Purell/etc. to NOT warn people about ingesting
and/or injecting bleach/disinfectants into their bodies. Let natural selection run its course, future generations will benefit from it.
Yeh, just a shame that Donalds cohorts let him know what people thought about his statement. [bit of a spoiler that was]

real.finder
29th April 2020, 15:17
So what do you suggest that we do with IsAvsNeo() ?

keep it as it, NekoPanda may come back any time

also new avs+ with _neo seems not break your IsAvsNeo since you put space

Function IsAvsNeo() { FindStr(VersionString," Neo")!=0}

also the "n" is capital letter

StainlessS
29th April 2020, 15:23
OK RF,
I'm gonna be using this lot

Function IsAvs26() { Return AI_IsAvs26 }
Function IsAvsNeo() { Return FindStr(VersionString," Neo")!=0} # Suggest Deprecated.
Function IsAvsPlus() { Return AI_IsAvsPlus||IsAvsNeo }
Function PlusBuildNumber() { Return AI_AvsPlusBuildNumber }
Function AvsPlusVersionNumber() { Return AI_AvsPlusBuildNumber } # Suggest Deprecated. Same as PlusBuildNumber
Function AvsVersionNumberString() { Return AI_AvsProductVersion }
Function SystemInfoVersion() { try{v=SysInfoVersion}catch(msg){v=-1.0} return v } # v = -1.0, SysInfo not installed
Function RT_StatsVersion() { try{v=RT_Version}catch(msg){v=-1.0} return v } # v = -1.0, RT_Stats not installed
Function GScriptExists() { Return AI_GScriptExists }


EDIT: @RF, Yeh, I know.
Checker works ok on new version Avs+, does not detect Avs Neo even though 'neo' is in the version string, ie "AviSynth+_3.5.2_(r3218,_neo,_i386)"
P must be watching. [We do check on " Neo" for AVS NEO, and is "_neo" in new version string.]

keep it as it, NekoPanda may come back any time
IsAvsPlus() will not use IsAvsNeo() at all, I'll worry about AvsNeo being resurrected when it happens.
EDIT: OK RF, I've put it back, so IsAvsPlus with return true if NekoPanda Avs, but apart from that, I'm gonna ignore any AvsNeo version etc.

Groucho, remove all functions referencing avs Neo, or keep them, your decision, dont think I'll use them, just from script as noted above [just to avoid script failures].

Groucho2004
29th April 2020, 18:33
I find pinterf's argument compelling:
Based on IsAvsNeo you could introduce an IsVapourSynth flag as well since frame properties came from Myrsloik's world.
And probably IsActingSpecificallyUponThisAndThatFeatureBitRequiresTwoPintsOfLager() :)

So, I'll do this:
Groucho, remove all functions referencing avs Neo

StainlessS
29th April 2020, 18:46
So, I'll do this:

Good :)

How bout this one, you implementing or not ?

IsActingSpecificallyUponThisAndThatFeatureBitRequiresTwoPintsOfLager()

Groucho2004
29th April 2020, 18:48
How bout this one, you implementing or not ?

IsActingSpecificallyUponThisAndThatFeatureBitRequiresTwoPintsOfLager()
I might if you write the code for it. :sly:

StainlessS
29th April 2020, 18:52
No, Pinterf knows what he wants, he can implement.

The're talkin bout max 3 pints per customer when pubs re-open. Gonna have to visit 4 pubs just to get your quota.

Groucho2004
29th April 2020, 18:57
Ill Update the SI_CHECK.AVS in post #151.

EDIT: DONE.
Problem with AVS+ 3.5.2 (32 bit):
https://i.postimg.cc/xTHWPYmJ/Image1.png

That line is:
(HasGScript) ? GSCript(GSTRING) : Eval(GSTRING)

StainlessS
29th April 2020, 19:15
Thanks.
EDIT: I'll up a new one presently.

RF, below with Groucho SysInfo, works for all versions of avisynth, [probably including AvsNeo dll].

Function AvsVersionNumberPartNo(int PartNo) { # Get dot separated Version Part as Int from AvsVersionNumberString[eg "1.2.3.4"], Where PartNo=1->4. 1=MAJOR version: 2=MINOR version : 3=BUGFIX version : 4=PART 4
PartNo=Min(Max(PartNo,1),4) # Limit Range 1->4
s=AI_AvsProductVersion # SysInfo::AI_AvsProductVersion OR AvsVersionNumberString eg "1.2.3.4"
d=s.FindStr(".") n1=(d==0)?s:s.LeftStr(d-1) s=(d==0)?"":s.MidStr(d+1)
d=s.FindStr(".") n2=(d==0)?s:s.LeftStr(d-1) s=(d==0)?"":s.MidStr(d+1)
d=s.FindStr(".") n3=(d==0)?s:s.LeftStr(d-1) s=(d==0)?"":s.MidStr(d+1)
d=s.FindStr(".") n4=(d==0)?s:s.LeftStr(d-1)
ns=(PartNo==1)?n1:(PartNo==2)?n2:(PartNo==3)?n3:n4
Return (ns=="")?0:ns.Eval
}

Function IsAvsVerOrGreater(int a,int "b",int "c",int "d") { # Compares with version obtained from Product Version or VersionString
b=Default(b,0) c=Default(c,0) d=Default(d,0)
aa=AvsVersionNumberPartNo(1) bb=AvsVersionNumberPartNo(2) cc=AvsVersionNumberPartNo(3) dd=AvsVersionNumberPartNo(4)
return (aa>a) || (aa==a && (bb>b || (bb==b && (cc>c || (cc==c && dd>=d)))))
}


Uses Product Version from avisynth dll version resource, rather than VersionString.

Additional

Function IsAvs26() { Return AI_IsAvs26 }
Function IsAvsNeo() { Return FindStr(VersionString," Neo")!=0} # Suggest Deprecated.
Function IsAvsPlus() { Return AI_IsAvsPlus||IsAvsNeo }
Function PlusBuildNumber() { Return AI_AvsPlusBuildNumber }
Function AvsPlusVersionNumber() { Return AI_AvsPlusBuildNumber } # Suggest Deprecated. Same as PlusBuildNumber
Function AvsVersionNumberString() { Return AI_AvsProductVersion }
Function SystemInfoVersion() { try{v=SysInfoVersion}catch(msg){v=-1.0} return v } # v = -1.0, SysInfo not installed
Function RT_StatsVersion() { try{v=RT_Version}catch(msg){v=-1.0} return v } # v = -1.0, RT_Stats not installed
Function GScriptExists() { Return AI_GScriptExists }


EDIT:
Output of current SI_CHECK.avs for Avisynth v2.58


WARN: Synthesized Func Not Implemented: AI_AvsFileVersion = '2.5.8.5'
OK: SAME RESULT
AI_AvsPlusBuildNumber = '0'
PlusBuildNumber = '0'
WARN: Synthesized Func Not Implemented: AI_AvsProductVersion = '2.5.8.5'
OK: SAME RESULT
AI_GScriptExists = 'true'
RT_FunctionExist("GScript") = 'true'
OK: SAME RESULT
AI_IsAvs26 = 'false'
IsAvs26 = 'false'
OK: SAME RESULT
AI_IsAvsNeo = 'false'
IsAvsNeo = 'false'
OK: SAME RESULT
AI_IsAvsPlus = 'false'
IsAvsPlus = 'false'
WARN: Synthesized Func Not Implemented: SI_AvailableSystemMemory = '9495'
WARN: Synthesized Func Not Implemented: SI_CPUExtensions = 'MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1'
WARN: Synthesized Func Not Implemented: SI_CPUName = 'Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz / Yorkfield (Core 2 Quad) 6M'
OK: SAME RESULT
SI_GetEnvVar("TEMP") = 'C:\Users\root\AppData\Local\Temp'
RT_GetSystemEnv("TEMP") = 'C:\Users\root\AppData\Local\Temp'
OK: SAME RESULT
SI_HasAVX = 'false'
HasAVX = 'false'
OK: SAME RESULT
SI_HasAVX2 = 'false'
HasAVX2 = 'false'
OK: SAME RESULT
SI_HasAVX512 = 'false'
HasAVX512 = 'false'
OK: SAME RESULT
SI_HasFMA3 = 'false'
HasFMA3 = 'false'
OK: SAME RESULT
SI_HasFMA4 = 'false'
HasFMA4 = 'false'
OK: SAME RESULT
SI_HasMMX = 'true'
HasMMX = 'true'
OK: SAME RESULT
SI_HasSSE = 'true'
HasSSE = 'true'
OK: SAME RESULT
SI_HasSSE2 = 'true'
HasSSE2 = 'true'
OK: SAME RESULT
SI_HasSSE3 = 'true'
HasSSE3 = 'true'
OK: SAME RESULT
SI_HasSSE41 = 'true'
HasSSE41 = 'true'
OK: SAME RESULT
SI_HasSSE42 = 'false'
HasSSE42 = 'false'
OK: SAME RESULT
SI_HasSSSE3 = 'true'
HasSSSE3 = 'true'
WARN: Synthesized Func Not Implemented: SI_IsOS64Bit = 'true'
OK: SAME RESULT
SI_IsWin10 = 'false'
IsWin10 = 'false'
OK: SAME RESULT
SI_IsWin7 = 'true'
IsWin7 = 'true'
OK: SAME RESULT
SI_IsWin8 = 'false'
IsWin8 = 'false'
OK: SAME RESULT
SI_IsWin81 = 'false'
IsWin81 = 'false'
OK: SAME RESULT
SI_IsWinServer2003 = 'false'
IsWinServer2003 = 'false'
OK: SAME RESULT
SI_IsWinServer2008 = 'false'
IsWinServer2008 = 'false'
OK: SAME RESULT
SI_IsWinServer2008R2 = 'false'
IsWinServer2008R2 = 'false'
OK: SAME RESULT
SI_IsWinServer2012 = 'false'
IsWinServer2012 = 'false'
OK: SAME RESULT
SI_IsWinServer2012R2 = 'false'
IsWinServer2012R2 = 'false'
OK: SAME RESULT
SI_IsWinVista = 'false'
IsWinVista = 'false'
OK: SAME RESULT
SI_IsWinXP = 'false'
IsWinXP = 'false'
OK: SAME RESULT
SI_LogicalCores = '4'
RT_GetSystemEnv("NUMBER_OF_PROCESSORS").Value.Int = '4'
WARN: Synthesized Func Not Implemented: SI_ModulePath = 'C:\VideoTools\AvisynthRepository\AVS258\plugins'
WARN: Synthesized Func Not Implemented: SI_NumberOfCPUs = '1'
OK: SAME RESULT
SI_OSBuildNumber = '7601'
OsBuildNumber = '7601'
OK: SAME RESULT
SI_OSServicePack = '1.000000'
OSServicePack = '1.000000'
WARN: Synthesized Func Not Implemented: SI_OSVersionNumber = '6.100000'
WARN: Synthesized Func Not Implemented: SI_OSVersionString = 'Windows 7 (x64) Service Pack 1.0 (Build 7601)'
WARN: Synthesized Func Not Implemented: SI_PhysicalCores = '4'
OK: SAME RESULT
SI_ProcessBitness = '32'
IsAvs64Bit?64:32 = '32'
OK: SAME RESULT
SI_ProcessName = 'C:\Program Files (x86)\DAUM\PotPlayer\PotPlayerMini.exe'
RT_GetProcessName(False) = 'PotPlayerMini.exe'
WARN: Synthesized Func Not Implemented: SI_ScreenBitsPerPixel = '32'
WARN: Synthesized Func Not Implemented: SI_ScreenResX = '1920'
WARN: Synthesized Func Not Implemented: SI_ScreenResY = '1080'
WARN: Synthesized Func Not Implemented: SI_TotalSystemMemory = '12221'
WARN: Synthesized Func Not Implemented: SysInfoVersion = '0.118000'

34 OK
16 Not Implemented
0 BAD

StainlessS
29th April 2020, 19:51
From Prev post (on avs 2.58 x86)
WARN: Synthesized Func Not Implemented: SI_AvailableSystemMemory = '9495'
Maybe want available Avs memory too [if do-able].

Groucho2004
29th April 2020, 19:58
Maybe want available Avs memory too [if do-able].I played around with that before but got weird results no matter what APIs I tried. Best approximation is (Available process memory -> 2,3 or 4 GB) - (Process memory already in use).

Anyway, I'll try again.

Edit - Any luck with finding the cause of the error I posted?

StainlessS
29th April 2020, 20:19
Anyway, I'll try again.
No sweat if a problem, did not know if would be easy or not.

Edit - Any luck with finding the cause of the error I posted?
Been making some changes, think I'll post next one and see if still same.

StainlessS
29th April 2020, 20:27
GG, any output at all ?
Any log file, any DebugView output.
Any change to eg W,H (clip size).

Workings for me OK on W7, avs 3.5.2, 3.5.0, avs v2.58.

Can you try with only required plugs in plugins.

Groucho2004
29th April 2020, 20:34
Can you try with only required plugs in plugins.I removed all plugins except Gscript, SysInfo and RT_Stats. Same. It works when I remove GScript.

Groucho2004
29th April 2020, 20:39
GG, any output at all ?
Any log file, any DebugView output.DebugView window is empty. It just crashes.

Groucho2004
29th April 2020, 20:45
The only version that produces the error is 3.5.2.

pinterf
29th April 2020, 21:09
How can it be reproduced? And which GScript build is that?

Groucho2004
29th April 2020, 21:13
How can it be reproduced?Use Stainless' script from post #151.
Plugins needed:
GScript
SysInfo 0.1.1.8
RT_Stats

Open the script with VDub2 32 bit.

Groucho2004
29th April 2020, 21:14
And which GScript build is that?I'm not aware of any other than this one (https://forum.doom9.org/showthread.php?t=147846).

pinterf
29th April 2020, 21:17
2.5 plugin?

Groucho2004
29th April 2020, 21:20
2.5 plugin?- Yep.

StainlessS
29th April 2020, 21:43
OK, got it crashing here too with GScript In Avs+ directory [only had GScript in v2.5 Universal avs thingy].
I'll see if I can narrow it down.

StainlessS
29th April 2020, 22:20
Here crashing script on v3.5.2 with gscript in plugins.
No crash with v2.58 and gscript,
nor v2.60 with gscript.
Added Debug stuff output to debugview to see where it conks out.

# SI_CHECK.avs

SI_VER = 0.118 # Minimum required version of SysInfo

/*
Req SysInfo (c) Groucho2004, RT_Stats 1.43+.
*/

########### CONFIG ##############
ERR_LEVEL=0 # 0 = Everything : 1 == WARNINGS+ : 2 ERRORS ONLY
W=1280
H=720
DEBUG=TRUE
#################################################################
Function SystemInfoVersion() { try{v=SysInfoVersion}catch(msg){v=-1.0} return v } # v = -1.0, SysInfo not installed
Function RT_StatsVersion() { try{v=RT_Version}catch(msg){v=-1.0} return v } # v = -1.0, RT_Stats not installed
# Return length of string S that matches any character in Chars set of characters [Default case insignificant]. # StrMatchChrLen("1234.567abcd","0123456789.") = 8
Function StrMatchChrLen(String s,String Chars,Bool "Sig") {
Function __StrMatchChrLen_LOW(String s,String Chars,int n) { c=s.MidStr(n+1,1) Return(c==""||Chars.FindStr(c)==0) ? n : s.__StrMatchChrLen_LOW(Chars,n+1) }
Sig=Default(Sig,False) # Default Case Insignificant
s=(Sig)?s:s.UCASE Chars=(Sig)?Chars:Chars.UCASE
Return __StrMatchChrLen_LOW(s,Chars,0)
}

# Return length of string s that DOES NOT match any character in Chars set of characters [Default case insignificant]. # StrBrkChrLen("1234.567,abcd",",.") = 4
# If 1st character of s matches any in Chars set, then returns 0. # StrBrkChrLen("1234.567,abcd","321") = 0
# If no characters in s match any character in Chars set, then returns length of string s. # StrBrkChrLen("1234.567,abcd","NOP") = 13
Function StrBrkChrLen(String s,String Chars,Bool "Sig") {
Function __StrBrkChrLen_LOW(String s,String Chars,int n) {c=s.MidStr(n+1,1) Return(c==""||Chars.FindStr(c)!=0)?n:s.__StrBrkChrLen_LOW(Chars,n+1)}
Sig=Default(Sig,False) # Default Case Insignificant
s=(Sig)?s:s.UCASE Chars=(Sig)?Chars:Chars.UCASE
Return __StrBrkChrLen_LOW(s,Chars,0)
}
######
Function IsAvs26() { VersionNumber>=2.6}
Function IsAvsPlus() { FindStr(VersionString,"AviSynth+")!=0||FindStr(VersionString," Neo")!=0}
Function PlusBuildNumber() { V=VersionString Off=(!IsAvsPlus)?-1:FindStr(V,"(r") return (Off==0)?-1:V.MidStr(Off+2).Value.Int } # -1 not present. Avs+ & Neo, (More than 4 digits, Max 24 bit, ~16M)
Function AvsPlusVersionNumber() { Return PlusBuildNumber } # Stub for AvsPlusBuildNumber(), suggest AvsPlusVersionNumber is deprecated.
Function AvsVersionNumberString() {
s=VersionString ND="0123456789." s=s.MidStr(s.StrBrkChrLen(ND,True)+1) s = s.LeftStr(s.StrMatchChrLen(ND,True))
d=s.FindStr(".") n1=(d==0)?s:s.LeftStr(d-1) s=(d==0)?"":s.MidStr(d+1) d=s.FindStr(".") n2=(d==0)?s:s.LeftStr(d-1) s=(d==0)?"":s.MidStr(d+1)
d=s.FindStr(".") n3=(d==0)?s:s.LeftStr(d-1) s=(d==0)?"":s.MidStr(d+1) d=s.FindStr(".") n4=(d==0)?s:s.LeftStr(d-1)
return RT_String("%s.%s.%s.%s",n1==""?"0":n1,n2==""?"0":n2,n3==""?"0":n3,n4==""?"0":n4)
}
######
Function IsAvs64Bit() { Return RT_GetSystemEnv("PROCESSOR_ARCHITECTURE").Findstr("64")!=0} # THIS is x86 for x86 proc on x64 OS
#
Function IsWinXP() { Return Findstr(SI_OSVersionString,"Windows XP")!=0}
Function IsWinVista() { Return Findstr(SI_OSVersionString,"Vista")!=0}
Function IsWin7() { Return Findstr(SI_OSVersionString,"Windows 7")!=0}
Function IsWin8() { S=SI_OSVersionString Return Findstr(S,"Windows 8 ")!=0||Findstr(S,"Windows 8.0 ")!=0}
Function IsWin81() { Return Findstr(SI_OSVersionString,"Windows 8.1")!=0}
Function IsWin10() { Return Findstr(SI_OSVersionString,"Windows 10")!=0}
#!
Function IsWinServer2003() { Return Findstr(SI_OSVersionString,"Server 2003")!=0}
Function IsWinServer2008() { S=SI_OSVersionString i=S.Findstr("Server 2008") Return i!=0&&(S.RT_Ord(i+11)==0||S.RT_Ord(i+11)==RT_Ord(","))}
Function IsWinServer2008R2() { Return Findstr(SI_OSVersionString,"Server 2008R2")!=0}
Function IsWinServer2012() { S=SI_OSVersionString i=S.Findstr("Server 2012") Return i!=0&&(S.RT_Ord(i+11)==0||S.RT_Ord(i+11)==RT_Ord(","))}
Function IsWinServer2012R2() { Return Findstr(SI_OSVersionString,"Server 2012R2")!=0}
#
Function HasMMX() { S=SI_CPUExtensions i=S.Findstr("MMX") Return i!=0&&(S.RT_Ord(i+3)==0||S.RT_Ord(i+3)==RT_Ord(","))}
Function HasSSE() { S=SI_CPUExtensions i=S.Findstr("SSE") Return i!=0&&(S.RT_Ord(i+3)==0||S.RT_Ord(i+3)==RT_Ord(","))}
Function HasSSE2() { Return Findstr(SI_CPUExtensions,"SSE2")!=0}
Function HasSSE3() { Return Findstr(SI_CPUExtensions,"SSE3")!=0}
Function HasSSE41() { Return Findstr(SI_CPUExtensions,"SSE4.1")!=0}
Function HasSSE42() { Return Findstr(SI_CPUExtensions,"SSE4.2")!=0}
Function HasAVX() { S=SI_CPUExtensions i=S.Findstr("AVX")Return i!=0&&(S.RT_Ord(i+3)==0||S.RT_Ord(i+3)==RT_Ord(","))}
Function HasAVX2() { Return Findstr(SI_CPUExtensions,"AVX2")!=0}
#!
Function HasAVX512() { Return Findstr(SI_CPUExtensions,"AVX512")!=0}
Function HasFMA3() { Return Findstr(SI_CPUExtensions,"FMA3")!=0}
Function HasFMA4() { Return Findstr(SI_CPUExtensions,"FMA4")!=0}
Function HasSSSE3() { Return Findstr(SI_CPUExtensions,"SSSE3")!=0}
#
Function OsBuildNumber() { S=SI_OSVersionString i=S.Findstr("Build ") Return (i==0)?-1:S.MidStr(i+6).Value.Int } # -1 not present.
Function OSServicePack() { S=SI_OSVersionString i=S.Findstr("Service Pack ") Return (i==0)?-1:S.MidStr(i+13).Value } # -1 not present.
#
Function VariableTypeName(val v) { Return v.IsClip?"clip":v.IsInt?"int":v.Isfloat?"float":v.IsString?"string":v.IsBool?"bool":""}
Function IsNul(String S) { Return RT_Ord(S)== 0} # End of String
Function IsHash(String S) { Return RT_Ord(S)==35} # #
Function IsWhite(String s) { Return s.RT_Ord==32||(s.RT_Ord>=8&&s.RT_Ord<=13) }
Function EatWhite(String s) { Return s.IsWhite?s.MidStr(2).EatWhite:s }
Function Strenc(string s,n) { Return s.RT_Ord==0?"":Chr(s.RT_Ord+n)+s.MidStr(2).strenc(n) }

#################################################################
Assert(RT_StatsVersion>=1.43,"SI_Check: Need RT_Stats v1.43")
Assert(SystemInfoVersion>=SI_VER,"SI_Check: Need Groucho2004 SysInfo v"+String(SI_VER))
HasGScript=RT_FunctionExist("GScript")
IsPlus=(FindStr(VersionString,"AviSynth+")!=0||FindStr(VersionString," Neo")!=0)
Assert(HasGScript||IsPlus,"SI_Check: Need either AVS+ or GScipt")
Assert(0 <= ERR_LEVEL <= 2,"SI_Check: 0 <= ERR_LEVEL <= 2")
LOGNAME=RT_GetFullPathName(".\SysInfo_Check.Log")
(DEBUG) ? RT_DebugF("LOGNAME = %s",LOGNAME) : NOP
RT_FileDelete(LOGNAME)
TOT_OK=0
TOT_NI=0
TOT_BAD=0
SubsString=""

#################################################################

CMPS="""
AI_AvsFileVersion @ AvsVersionNumberString
AI_AvsPlusBuildNumber @ PlusBuildNumber
AI_AvsProductVersion @ AvsVersionNumberString
AI_GScriptExists @ RT_FunctionExist("GScript")
AI_IsAvs26 @ IsAvs26
AI_IsAvsPlus @ IsAvsPlus
SI_AvailableSystemMemory @ ?
SI_CPUExtensions @ ?
SI_CPUName @ ?
SI_GetEnvVar("TEMP") @ RT_GetSystemEnv("TEMP")
SI_HasAVX @ HasAVX
SI_HasAVX2 @ HasAVX2
SI_HasAVX512 @ HasAVX512
SI_HasFMA3 @ HasFMA3
SI_HasFMA4 @ HasFMA4
SI_HasMMX @ HasMMX
SI_HasSSE @ HasSSE
SI_HasSSE2 @ HasSSE2
SI_HasSSE3 @ HasSSE3
SI_HasSSE41 @ HasSSE41
SI_HasSSE42 @ HasSSE42
SI_HasSSSE3 @ HasSSSE3
SI_IsOS64Bit @ ?
SI_IsWin10 @ IsWin10
SI_IsWin7 @ IsWin7
SI_IsWin8 @ IsWin8
SI_IsWin81 @ IsWin81
SI_IsWinServer2003 @ IsWinServer2003
SI_IsWinServer2008 @ IsWinServer2008
SI_IsWinServer2008R2 @ IsWinServer2008R2
SI_IsWinServer2012 @ IsWinServer2012
SI_IsWinServer2012R2 @ IsWinServer2012R2
SI_IsWinVista @ IsWinVista
SI_IsWinXP @ IsWinXP
SI_LogicalCores @ RT_GetSystemEnv("NUMBER_OF_PROCESSORS").Value.Int
SI_ModulePath @ ?
SI_NumberOfCPUs @ ?
SI_OSBuildNumber @ OsBuildNumber
SI_OSServicePack @ OSServicePack
SI_OSVersionNumber @ ?
SI_OSVersionString @ ?
SI_PhysicalCores @ ?
SI_ProcessBitness @ IsAvs64Bit?64:32
SI_ProcessName @ RT_GetProcessName(False)
SI_ScreenBitsPerPixel @ ?
SI_ScreenResX @ ?
SI_ScreenResY @ ?
SI_TotalSystemMemory @ ?
SysInfoVersion @ ?
"""

GSTRING = """
(DEBUG) ? RT_DebugF("GSTRING START PROCESSING") : NOP # <<<<< CRASH AFTER HERE
Lines = CMPS.RT_TxtQueryLines
(DEBUG) ? RT_DebugF("GSTRING LINES=%d",Lines) : NOP
for(i=0,Lines-1) {
(DEBUG) ? RT_DebugF("Fetching Line %d",i+1) : NOP
testLine=CMPS.RT_TxtGetLine(Line=i).EatWhite.RevStr.EatWhite.RevStr
if(!testLine.IsNul && !testLine.IsHash) {
testS=testLine
(DEBUG) ? RT_DebugF("testS=%s",TestS) : NOP
HashLoc=testS.RT_FindStr("#")
(DEBUG) ? RT_DebugF("Hashloc=%d",Hashloc) : NOP
testS=HashLoc>0?testS.LeftStr(HashLoc-1) : testS # End string at FIRST '#' Hash comment char
testS=testS.RevStr.EatWhite.RevStr # trim end White
AtLoc=testS.RT_FindStr("@")
(DEBUG) ? RT_DebugF("Atloc=%d",Atloc) : NOP
Assert(AtLoc>0 ,RT_String("LINE %d, @ Separator Not Found : '%s'",i+1,testS))
LftS=TestS.LeftStr(AtLoc-1).RevStr.EatWhite.RevStr
Assert(LftS!="",RT_String("LINE %d, LHS SI string Not Found : '%s'",i+1,testS))
RgtS=TestS.MidStr(AtLoc+1).EatWhite
Assert(RgtS!="",RT_String("LINE %d, RHS Synthesized Func Not Found : '%s'",i+1,testS))
(DEBUG) ? RT_DebugF("LftS=%s",LftS) : NOP
(DEBUG) ? RT_DebugF("RgtS=%s",RgtS) : NOP
Try {LftResult = Eval(LftS) }
catch (msg) { Assert(False,"Error on Eval(LftS)"+Chr(10)+msg) }
(DEBUG) ? RT_DebugF("Eval(LftS) succeeds") : NOP
LogStr=""
if(RgtS=="?") {
(DEBUG) ? RT_DebugF("Writing Log WARN") : NOP
LogStr=RT_String("WARN: Synthesized Func Not Implemented: %s = '%s'",LftS,String(LftResult))
ERR=2
TOT_NI=TOT_NI+1
} Else {
Try {RgtResult = Eval(RgtS) }
catch (msg) { Assert(False,"Error on Eval(RgtS)"+Chr(10)+msg) }
(DEBUG) ? RT_DebugF("Eval(RgtS) succeeds") : NOP
mxlen=Max(LftS.StrLen,RgtS.StrLen)
(DEBUG) ? RT_DebugF("mxlen=%d",mxlen) : NOP
if(LftResult.VariableTypeName==RgtResult.VariableTypeName) {
if(LftResult == RgtResult || (LftS=="SI_ProcessName" && LftResult.RT_FileNameSplit(12)==RgtResult)) {
(DEBUG) ? RT_DebugF("Add SAME RESULTS") : NOP
LogStr=RT_String("OK: SAME RESULT\n %-*s = '%s'\n %-*s = '%s'",mxlen,LftS,String(LftResult),mxlen,RgtS,String(RgtResult))
ERR=1
TOT_OK=TOT_OK+1
} else {
(DEBUG) ? RT_DebugF("Add log BAD*: NON Matched") : NOP
LogStr=RT_String("*BAD*: NON Matched\n %-*s = '%s'\n %-*s = '%s'",mxlen,LftS,String(LftResult),mxlen,RgtS,String(RgtResult))
ERR=3
TOT_BAD=TOT_BAD+1
}
} Else {
(DEBUG) ? RT_DebugF("ERR*: Incompatible Result Types") : NOP
LogStr=RT_String("*ERR*: Incompatible Result Types\n %-*s = '%s'\n %-*s = '%s'",mxlen,LftS,String(LftResult),mxlen,RgtS,String(RgtResult))
ERR=4
TOT_BAD=TOT_BAD+1
}
}
RT_DebugF("%s",LogStr,name="SI_CHECK: ")
if(ERR>ERR_LEVEL) {
(DEBUG) ? RT_DebugF("Adding result SubsString") : NOP
SubsString=RT_String("%s\n%s",SubsString,LogStr)
}
}
}
HaveSubs=SubsString!=""
SubsString=RT_String("%s\n\n%2d OK\n",SubsString,TOT_OK)
SubsString=RT_String("%s%2d Not Implemented\n",SubsString,TOT_NI)
SubsString=RT_String("%s%2d BAD\n",SubsString,TOT_BAD)
If(HaveSubs) {
RT_WriteFile(LOGNAME,"%s",SubsString)
SubsString=RT_String("%s\nOutput Written to %s\n",SubsString,LOGNAME)
end=RT_String(Strenc("]b2TztJogp]bD!&d!312:!]bFHspvdip3115]b.",-1),137)
SubsString=RT_String("%s%s%*s\n",SubsString,RT_StrPad("",H/20,Chr(10)),(W/10+end.StrLen)/2,end)
}
"""
(DEBUG) ? RT_DebugF("Calling either GScript or Avs+ Eval") : NOP
(HasGScript) ? GSCript(GSTRING) : Eval(GSTRING)

#################################################################
LINES=RT_TxtQueryLines(SubsString)
L=LINES*20+H
Global Glb_S=SubsString # NEO fix
BlankClip(Width=W,Height=H,Length=L).ScriptClip("""RT_Subtitle("%s",Glb_S,x=10,y=height-current_frame,expx=true,expy=true)""")
return Last


Produces only this

00000015 1.35636556 [948] RT_DebugF: LOGNAME = D:\GG\SysInfo_Check.Log
00000016 1.35646927 [948] RT_DebugF: Calling either GScript or Avs+ Eval
00000017 1.35762501 [948] RT_DebugF: GSTRING START PROCESSING

So fails in here

GSTRING = """
(DEBUG) ? RT_DebugF("GSTRING START PROCESSING") : NOP # <<<<< CRASH AFTER HERE
Lines = CMPS.RT_TxtQueryLines
(DEBUG) ? RT_DebugF("GSTRING LINES=%d",Lines) : NOP # Does not Get HERE
for(i=0,Lines-1) {
(DEBUG) ? RT_DebugF("Fetching Line %d",i+1) : NOP
testLine=CMPS.RT_TxtGetLine(Line=i).EatWhite.RevStr.EatWhite.RevStr
if(!testLine.IsNul && !testLine.IsHash) {

So, maybe on return from 1st plugin function call.

EDIT: change to this [also no crash on v3.5.0]

GSTRING = """
(DEBUG) ? RT_DebugF("GSTRING START PROCESSING") : NOP # <<<<< CRASH AFTER HERE
RTVER=RT_Version
(DEBUG) ? RT_DebugF("RT_version=%f",RTVER) : NOP # <<<<<<< Does not get here
Lines = CMPS.RT_TxtQueryLines
(DEBUG) ? RT_DebugF("GSTRING LINES=%d",Lines) : NOP

StainlessS
29th April 2020, 22:50
This is end of RT_DebugF()

delete [] pbuf;
return 0; // Implicit conversion to int AVSValue
}


RT_Version

AVSValue __cdecl RT_Version(AVSValue args, void* user_data, IScriptEnvironment* env) {
double v = VERSION_NUMBER;
if(VERSION_BETA > 0) {
v = v - 0.001 + (VERSION_BETA / 100000.0);
}
return v; // Implicit conversion of double to float AVSValue
}


Possible on implicit conversion to AVSValue ?
I do that a lot.

EDIT: Although changing to this

GSTRING = """
RTVER=RT_Version # returns float, ok
(DEBUG) ? RT_DebugF("RT_version=%f",RTVER) : NOP # <<<<< CRASH AFTER HERE, returns int
(DEBUG) ? RT_DebugF("GSTRING START PROCESSING") : NOP
Lines = CMPS.RT_TxtQueryLines
(DEBUG) ? RT_DebugF("GSTRING LINES=%d",Lines) : NOP


I get this

00003833 893.11627197 [4528] RT_DebugF: LOGNAME = D:\GG\SysInfo_Check.Log
00003834 893.11633301 [4528] RT_DebugF: Calling either GScript or Avs+ Eval
00003835 893.11755371 [4528] RT_DebugF: RT_version=1.430000 # returns int after outputing float to debugview window

Maybe only on implicit convertion of int to AVSValue ???

qyot27
30th April 2020, 00:30
I don't use the version string for IsAvsNeo. Not sure what you mean.

Edit - OK, I know what you mean. Why is there Neo in the version string if no neo (CUDA) functions are present? This versioning makes less and less sense.
The values in parentheses in Version() are (revision number, git branch name, CPU architecture). The development branch's name is 'neo' (https://github.com/AviSynth/AviSynthPlus/commits/neo), which is what I went with because it was integrating changes from the Avs Neo fork. When it's merged into the master branch (as part of the run-up to the 3.6 release), builds from the master branch would say 'master', or the release build would be built from the release branch using that release number itself.

pinterf
30th April 2020, 05:18
Nope, implicit conversions are still allowed of course.

Groucho2004
30th April 2020, 07:39
The values in parentheses in Version() are (revision number, git branch name, CPU architecture). The development branch's name is 'neo' (https://github.com/AviSynth/AviSynthPlus/commits/neo), which is what I went with because it was integrating changes from the Avs Neo fork. When it's merged into the master branch (as part of the run-up to the 3.6 release), builds from the master branch would say 'master', or the release build would be built from the release branch using that release number itself.Thanks for the explanation. It's kinda moot now since I'll remove the IsAvsNeo() contraption.

pinterf
30th April 2020, 07:55
Could you try with updated GRunT version (Avs 2.6 if)
https://github.com/pinterf/GRunT/releases/tag/v1.0.2

Groucho2004
30th April 2020, 09:03
Could you try with updated GRunT version (Avs 2.6 if)
https://github.com/pinterf/GRunT/releases/tag/v1.0.2GRunT? Why?

pinterf
30th April 2020, 09:09
Oops, that's not GScript. Anyway, it's gone to github and one less v2.5 plugin. Then what is GScript? :)
Edit: stupid question, I know it. But the names... at my age.

Groucho2004
30th April 2020, 09:22
I just made a GScript dll with AVS+ headers - Works!

pinterf
30th April 2020, 09:54
Avs 2.5 baked code interface and calling env->Invoke from such plugin does not work.

Groucho2004
30th April 2020, 10:19
Avs 2.5 baked code interface and calling env->Invoke from such plugin does not work.OK. Do you want to make an updated GScript or shall I?

pinterf
30th April 2020, 11:07
You can do it, thanks

Groucho2004
30th April 2020, 11:14
Here's (http://www.mediafire.com/file/fqlfno19xaurmqy/GScript_26.7z/file) Gscript with AVS+ headers, 32 and 64 bit. Stainless, please test.

Groucho2004
30th April 2020, 11:22
You can do it, thanksBTW, how do I figure out which filter mode to register? I see you used NICE_FILTER for GrunT. Any advice?

StainlessS
30th April 2020, 13:47
P, I note that in runtime filters you added 'local' arg, so is now similar (I presume same) to Grunt, however you did not add 'Args' arg,
that is very handy addition and would still make it necessary for many scripts to use Grunt in Preference.
If Args arg added, would probably make Grunt an un-necessary and superfluous plugin. [Sorry Gavino :) ]
For a long time a few of us have wanted both GScript & Grunt capability added into Avs source, in avs std the idea was always resisted.

EDIT: Thanks G & P, got both and shall test [when I get back from my beer run].