Multi Commander Support Forum
Multi Commander => Support and Feedback => Topic started by: Ulfhednar on May 19, 2019, 13:39:52
-
MC v8.9 b2517 x64 on W10
Hope this is the right place for this...
I've had issues with crashing when running the internal zip command via a scripted button.
This always crashes MC (CTD) - I did send in the bug report incl the script used on a couple of earlier builds but it is still occurring.
// get & extract zips
@var $root = GetSourcePath();
@var $arrFiles = FindFiles( $root + "*.zip");
@var $count = arrayCount($arrFiles);
@var $zipFiles = "";
@var $zip;
@var $n1;
// Create ; separated list with all zip files to unpack
for( $n1 = 0; $n1 < $count ; $n1++ )
{
$zip = $arrFiles[ $n1];
$zipFiles += $zip;
$zipFiles += ";";
UnpackFile( $zip, $root, "*.*" , "OVERWRITEALL, USEEXISTINGQUEUE" );
}
MC.RunCmd ID="ExplorerPanel.41075"
The internal zip/rar handling allows me to click through to the contents OK it's just when I call that script.
I am wondering if this is related to MScript as some other scripts that always worked before now sometimes seem to take a while to process.
-
No, not the correct place, Nothing to do with the new things in the beta. So I moved it
Eh what are you trying to do ?
Unpack multiple zip ??
What part of the script crasches., Have you run it in the debugger
-
Sorry Mathias. Thanks for hiding it elsewhere ;) :D
This script/button has been used since c.2014 & has started misbehaving since beta 8.9.
The script crashes MC @
UnpackFile( $zip, $root, "*.*" , "OVERWRITEALL, USEEXISTINGQUEUE" );
For some reason I didn't run it in the debugger until now ::)
I noticed that removing the last line
MC.RunCmd ID="ExplorerPanel.41075"
makes no difference.
I'll have another look at it as I assume that you haven't had any other instances of this occurring.
-
Hi Ulfhednar
Thankfully it's not just me that is having problem with UnpackFile.
In fact I have the exact same problem you have. The same UnpackFile call and also was working before 8.9 and started crashing when I use it.
My code is basically the same:
@var $source_path = GetSourcePath();
@var $arr_selected_file_paths[] = GetSourceSelectedPaths();
@var $n;
@var $ext;
for( $n=0; $n<arrayCount($arr_selected_file_paths); $n++ )
{
$file_path = $arr_selected_file_paths[$n];
$ext = PathGetFileExtPart($file_path, 0);
if( StrIsEqualNoCase($ext, ".zip") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".7z") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".rar") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".lha") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".arj") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".cab") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".tar") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".gz") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".gzip") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".bz") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".bzip2") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".tbz") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
else if( StrIsEqualNoCase($ext, ".tbz2") )
{
UnpackFile($arr_selected_file_paths[$n], $source_path, "*.*", "OVERWRITEALL,USEEXISTINGQUEUE,NOWAIT", "");
}
}
-
I have had a few moments of scratching my head with the script so I too am glad to know I'm not alone pncdaspropagandas ;)
I just tried your script on a dir with varied files - zip, rar, 7z + epub & pdf.
The debugger lists the last file - a .pdf - as soon as it reads the directory, lists it as being the array (see pic) & then ends on the next step.
Why does it jump to the .pdf instead of the actual archives...? ???
On a dir with nothing but a single rar it ends with 0 instances found. (array size = 0) :-\
So something is definitely weird. ::)
-
Hi. It creates an array with selected files, then it verifies the extension of each file to filter compressed files only. Then for those files, it extracts them.
-
pncdaspropagandas I can see that is what it should do, so I am wondering how it avoids doing it & selects a pdf instead..... :-\ ::)
-
Using latest build 8.9 b2525 W10 x64 I'm still getting CTD if I run that script.
I tried with MSdebugger but no info is revealed. ::)
-
Still getting CTDs with that script so I decided to copy out the button script to a text-only editor & delete the button contents & save the new state with 'update'.
Copied the plain text back to the button, saved/updated & it's working again!
+ When copied from the text editor to the MSDebugger it also now works perfectly. :D
Some weird invisible corruption able to crash MC & MSdebug I guess! ::) :o
-
Still getting CTDs with that script so I decided to copy out the button script to a text-only editor & delete the button contents & save the new state with 'update'.
Copied the plain text back to the button, saved/updated & it's working again!
+ When copied from the text editor to the MSDebugger it also now works perfectly. :D
Some weird invisible corruption able to crash MC & MSdebug I guess! ::) :o
CTD?
Event in build 2531, There are some script unzip issue fixes there
-
Sorry Mathias I'm a bit slow coming back to reply.
CTD = Crash To Desktop
...& then crash reporter opens, I did send the reports in a few times but as I was experimenting/trying to debug with it I didn't send 0000s ;)
The MC updates didn't solve it, it was still happening with b2531, then I remembered that if the script had become corrupt, a plain text reformat of the script might solve it & it did. ;)