Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popeye 4.71 fails to write protocol file #198

Closed
thomas-maeder opened this issue Aug 14, 2015 · 9 comments
Closed

Popeye 4.71 fails to write protocol file #198

thomas-maeder opened this issue Aug 14, 2015 · 9 comments

Comments

@thomas-maeder
Copy link
Owner

Geoff Foster writes:

I got an error when trying to run the new Popeye (possibly a security issue?). In the input file I specified the following:

protocol xxx.txt

On running pywin32.exe (under Windows XP) I got the following message:

input-error:cannot open output-file
offending item: xxx.txt

Popeye solved the problem OK, but no output file was created.

Other users have confirmed the issue.

@thomas-maeder
Copy link
Owner Author

I have tried different things, but I have failed to reproduce the problem. So let's please narrow it down:

  • which executable(s) are affected? Only pywin32.exe, or also pywin64.exe? Also pywin32.exe on 64bit Windows?
  • which Windows versions are affected?
  • does the problem arise if you do
    • pywinNN.exe inputfile.txt, where inputfile.txt contains a protocol directive?
    • pywinNN.exe

begin
protocol myoutfile.txt
...

 * something different

@adrianstori
Copy link

If you can, test it with Fancy. Fancy deletes the protocol file before calling Popeye. The problem get solved, but no output file is created.

When I made Fancy call a .cmd file (instead of calling Popeye directly), which creates an empty output file first

type NUL >py.txt
pywin32.exe < py.in

all worked fine. (This on Vista.)

@thomas-maeder
Copy link
Owner Author

test it with Fancy

Well, I have installed Fancy for a friend recently. It cost me some more hair color and him a dinner. I am not going to do that again.

Also, when solving a problem, it helps to simplify the situation, not complicate it.

Does your description mean that pywin32.exe can overwrite an existing file, but not create a new one?

@adrianstori
Copy link

That in short appears to be the case (maybe a recent change in a C library that Popeye uses / perhaps an extra check is required - if the file doesn't exist, create it first; then write to it?!)... I'm not sure about the technical details, but Fancy creates an MS-DOS window itself in which it runs Popeye (which may differ from a regular, user-created one).

@adrianstori
Copy link

(By the way regarding "overwrite an existing file", I understand that the protocol file is never overwritten, it is always appended to. Cornel showed me recently this from the documentation:

  • protocol: The parameter to his command is interpreted as filename, and all
    further output of popeye on the screen is also placed in the given
    file. If the file exists already, the output of popeye is appended to
    the file. The file will not be deleted.

@tmsarg
Copy link

tmsarg commented Aug 14, 2015

Windows 10
Ok, Popeye 4.71 (pywin64.exe) works fine under Olive 0.13.6 (must be renamed pywin32.exe, but this is an Olive issue). Solution output start with "Popeye Windows-64Bit v4.71 (512 MB)"
Using FANCY, file py.in is generated correctly, an MS DOS window opens as usual, one can see variations there, but no py.txt file generated. Older versions have no problem with FANCY and Windows10.
The only difference I noticed, is : Right click on pywin64.exe, Properties, Security TAB, Advanced.
Older version (and Olive copy) inherited from C:\Fancy or C:
4.71 version inherited from C:\Fancy\popeye-4.71-windows
which is the sub-folder containing new versions pf Popeye, but NOT Fancy.exe.

@mikalai-sihnevich
Copy link

Process monitor utility shows that Popeye 4.71 tries to open/create output file with trailing char '0D' in filename and fails.
If input text file is created in Unix style (with LF character only as line break) everything works fine in Windows XP.

@thomas-maeder
Copy link
Owner Author

Process monitor utility shows that Popeye 4.71 tries to open/create output file with trailing char '0D' in filename and fails.

Wow! Thanks for that!

Now I am able to reproduce the problem.

@thomas-maeder
Copy link
Owner Author

Fixed for Popeye 4.73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants