Bug in DS v4.24.0.3 Beta: DzSIReloadAction sets getScriptFileName() == ""
Praxis
Posts: 285
This bug was in DS v4.11.0.236 (see this thread: 333656/bug-since-ds-v4-11-0-236-dzsireloadaction-sets-getscriptfilename).
It was fixed in DS v4.15.0.25, August 2021
It does not exist in DS v4.21.0.5 Beta
It has re-appeared in DS v4.24.0.3 (or earlier?).
Support Ticket 481776 submitted 10-November-2025
It can be reproduced using the following code (also attached as test_01.dsa):
// test_01.dsa
// Script to illustrate a bug in DAZ Studio v4.24.0.3 Beta: DzSIReloadAction
// DzSIReloadAction can be triggered e.g. by menu: Script IDE Pane > File > Reload Script
print( App.longVersionString );
print( ' ' );
var sFileSpec = getScriptFileName();
print( sFileSpec );
print( ' ' );
if( sFileSpec == '' ) {
print( '### BUG ###: getScriptFileName() == '' );
} else {
print( 'OK' );
}
//
// In v4.21.0.5 Beta:
// Works OK, including after executing DzSIReloadAction
//
// In v4.24.0.3 Beta:
// Works OK, until after executing DzSIReloadAction
// then getScriptFileName() always == ''
print( ' ' );
In the v4.24.0.3 Script IDE Pane:
File > Open Script... // Open test_01.dsa
[Execute] // It works OK: getScriptFilename() != ""
File > Reload Script
[Execute] // BUG: getScriptFilename() == ""
File > Open Script... // Open test_01.dsa
[Execute] // BUG: getScriptFilename() == ""
File > Close Script
File > Open Script... // Open test_01.dsa
[Execute] // It works OK: getScriptFilename != ""
File > Reload Script
[Execute] // BUG: getScriptFilename() == ""


Comments
*** UPDATE 2026-Sep-04 ***
The problem happens only if the .dsa file uses CRLF (0x0D 0x0A) as End-Of-Line characters.
If the .dsa uses only LF characters as EOL then the problem disappears.
How bizzare.
I have reported this in Support Ticket # 504845
You can convert from CRLF to LF-only by loading the .dsa file into the Script IDE Pane and saving it back to disk.
The problem has nothing to do with any special Comment at the start of the file
This probably explains the wierd behaviour discussed in this forum thread:
https://www.daz3d.com/forums/discussion/508496/getscriptfilename-alternative