First of all, thanks for taking the time to reply.

With that callstack, a WAG says its a shell extension causing problems. The things in the callstack is really beyond my knowledge. IDK what an overlay exactly is.

from the GetSyncTransferStatus part, my guess is that it's part of some cloud storage software, that overlays an indicator to file icons to specify wether they are in sync or not. The pc I'm testing has actually 3 of them: Google Drive, Dropbox and Skydrive.
I'm suspecting Skydrive is to blame, as disabling the other two didn't change anything. Can't disable skydrive, though, as it's an integral part of windows 8.1.

Your original post code.
.
my $struct = pack "LLLpLLLpLpLppLIppLLpILL", ( 88,.
..snip..
is wrong. I found https://metacpan.org/source/JENDA/Win32-FileOp-0.16.02/FileOp.pm#L1217 but that is different from your pack() struct above. .

That was my first test, as at first I thought the script crashed due to changes to the struct in the windows API. That way I could get a simpler windows that crashed less frequently (I now think that possibly that window has a lower chance of displaying folders that are involved in the icon overlay thing). But probably the problem lies, as you said, in something external, as I get the same crash using other modules (Win32::GUI, Tk, and Tkx).
The question, however, is: why does it crash within perl only? After all, those common dialogs are used everywhere.

Looking through Win32::FileOp, nothing looks 64 bit compatible in it. " $Flags = unpack("L", substr $struct, 52, 4);" that is garbage on Win64.
Right, but I'm using 32bit perl.

Use RT bug tracker, dont send private emails to CPAN/maintainers authors. Its like asking for tech support in random blog posts. I see nothing I can associate with you at rt://Win32::FileOp.

Woops, my mistake. In my defense, I thought that that was the whole point for putting someone's mail in the perldoc.

FileOp never calls CommDlgExtendedError. It is commented out. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms646928%28v=vs.85%29.aspx and https://metacpan.org/source/JENDA/Win32-FileOp-0.16.02/FileOp.pm#L1266. Getting that error code and the bool retval of if ($fun->Call($struct)) { should be your first diagnostic.

indeed, that was the first thing I tried. But on the first call to SaveAsDialog the script runs fine; the bool retval is 1 and CommDlgExtendedError gives 0. On the second run I get nothing, as the script crashes on $fun->Call($struct) and I cannot get any value out of it.

What is your Windows 8 Perl, 32 bit or x64? You didn't mention what the retval of Win32::FileOp::SaveAsDialog/console output is of your sample script in your OP.

I'm using 32bit perl

The retval of SaveAsDialog, the first time, is the correct filename, as expected. The second time, it crashes before I can get anything

Thanks a lot for your efforts


In reply to Re^4: Win32::FileOp issues by davide_c
in thread Win32::FileOp issues by davide_c

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.