Author Topic: Re: MultiCommander v8.9 BETA  (Read 21895 times)

Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 503
    • View Profile
Re: MultiCommander v8.9 BETA
« 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.

Code: [Select]
// 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.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4271
    • View Profile
    • Multi Commander
Re: MultiCommander v8.9 BETA
« Reply #1 on: May 19, 2019, 14:47:01 »
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




Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 503
    • View Profile
Re: MultiCommander v8.9 BETA
« Reply #2 on: May 22, 2019, 14:32:56 »
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 @
Code: [Select]
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
Code: [Select]
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.

pncdaspropagandas

  • Contributor
  • Active Member
  • *****
  • Posts: 93
    • View Profile
Re: MultiCommander v8.9 BETA
« Reply #3 on: May 28, 2019, 20:51:45 »
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:

Code: [Select]
@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", "");
}
}

Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 503
    • View Profile
Re: MultiCommander v8.9 BETA
« Reply #4 on: May 30, 2019, 14:22:09 »
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.  ::)


pncdaspropagandas

  • Contributor
  • Active Member
  • *****
  • Posts: 93
    • View Profile
Re: MultiCommander v8.9 BETA
« Reply #5 on: June 02, 2019, 22:47:27 »
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.

Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 503
    • View Profile
Re: MultiCommander v8.9 BETA
« Reply #6 on: June 05, 2019, 12:57:10 »
pncdaspropagandas I can see that is what it should do, so I am wondering how it avoids doing it & selects a pdf instead.....  :-\ ::)

Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 503
    • View Profile
Re: MultiCommander v8.9 BETA
« Reply #7 on: July 16, 2019, 16:22:42 »
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.  ::)

Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 503
    • View Profile
Re: MultiCommander v8.9 BETA
« Reply #8 on: July 25, 2019, 15:34:01 »
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

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4271
    • View Profile
    • Multi Commander
Re: MultiCommander v8.9 BETA
« Reply #9 on: July 25, 2019, 16:41:52 »
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

Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 503
    • View Profile
Re: MultiCommander v8.9 BETA
« Reply #10 on: July 28, 2019, 13:43:23 »
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. ;)