Problem getting script handler parameters

Is there something wrong with this code, each time I run it, it causes SD to hang:

	set theParams to (variable name of handler parameters of script handler handlerName of theDoc)

MacOS 12.7.5 (21H1222) French localization
Script Debugger 8.0.7 (8A77)

This works here:

tell application "Script Debugger"
   set theDoc to document 2
   set allhandlerNames to the name of every script handler of theDoc
   set handlerName to some item of allhandlerNames
   set theParams to (variable name of handler parameters of script handler handlerName of theDoc)
end tell

After some investigations, I think I have isolated the problem:
SD is freezing when the parameters of an handler are values (numbers, strings, lists…) or when the parameters declaration contains double-quotes or parenthesis.

Here are some examples:

--> examples of handler syntax that will return the variable names
on |set the future|:wString paramA:wA paramB:wB
	display dialog wString & return & wA & return & wB
end |set the future|:paramA:paramB:

on testA:wString paramA:wA paramB:wB
	display dialog wString & return & wA & return & wB
end testA:paramA:paramB:

on testB:true paramA:false paramB:(missing value)
	display dialog wString & return & wA & return & wB
end testB:paramA:paramB:

on testC()
	display dialog "Hello"
end testC

on testD(wString, wA, wB)
	display dialog wString & return & wA & return & wB
end testD

on testE(true, false, missing value)
	display dialog wString & return & wA & return & wB
end testE


--> examples of handler syntax that will freeze SD8
to testM:""
	display dialog "Hello"
end testM:

on testN:{wString, wA, wB}
	display dialog wString & return & wA & return & wB
end testN:

on testO(wString, {wA, wB})
	display dialog wString & return & wA & return & wB
end testO

on testP(true, false, "")
	display dialog wString & return & wA & return & wB
end testP

on testQ(true, false, 1)
	display dialog wString & return & wA & return & wB
end testQ

[These handlers are not meant to be executed. They are simply used to test this command: get variable name of handler parameters of script handler theHandler of theDoc.]

Freezes here too. Application not responding in dock, force quit, no crash reporter on relaunch

→ Mac OS: 14.5 (23F79)
→ Script Debugger 8.0.7 (8A77)

Thank you Ed for confirming and for the time you spent on this.
I hope Mark can resolve this issue.

1 Like