http://bugs.winehq.org/show_bug.cgi?id=33494
Bug #: 33494 Summary: It's not possible to use tempfile module in python Product: Wine Version: 1.5.26 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: deveee@gmail.com Classification: Unclassified
Created attachment 44338 --> http://bugs.winehq.org/attachment.cgi?id=44338 backtrace
Not tested in real python. I used cx_freeze tool (also py2exe tested) and run compiled program under wine.
Just two simple lines:
#!/usr/bin/env python
import tempfile print tempfile.gettempdir()
And I get crash.
In attachments log from wine and compiled program.
Wine 1.5.24 and 1.4.1
http://bugs.winehq.org/show_bug.cgi?id=33494
--- Comment #1 from Deve deveee@gmail.com 2013-04-30 02:56:48 CDT --- http://deve.koliber.pl/wine/tempfile-test.zip
Example from above, compiled using cx_freeze.
https://bugs.winehq.org/show_bug.cgi?id=33494
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Deve from comment #1)
http://deve.koliber.pl/wine/tempfile-test.zip
Example from above, compiled using cx_freeze.
Running the above example in Windows 8 does nothing, what is the expected output?
X:>kalendarz.exe
X:>
https://bugs.winehq.org/show_bug.cgi?id=33494
--- Comment #3 from Deve deveee@gmail.com --- You are asking about it after 2 years... Sorry, I don't remember...
I'm not sure atm. if it should print something. It depends on which parameters I used when I created package.
Simply when I use: tempfile.gettempdir() it crashes wine. This function should get path to temporary directory (C:\Windows\Temp or something similar). Expected is not to crash.
https://bugs.winehq.org/show_bug.cgi?id=33494
--- Comment #4 from Bruno Jesus 00cpxxx@gmail.com --- Thanks for the reply. This is what I get in wine:
import tempfile
fixme:msvcrt:MSVCRT__wsopen_s : pmode 0x81b6 ignored
tempfile.gettempdir()
'c:\users\wine\temp'
So I think this was fixed since your first test. I will test in older wine versions later to check if I can reproduce the original problem.
https://bugs.winehq.org/show_bug.cgi?id=33494
--- Comment #5 from Bruno Jesus 00cpxxx@gmail.com --- I used PyInstaller to compile the 2 line python script to exe and unfortunately it works for me in wine 1.3.22, 1.4.1, 1.5.22 and 1.7.34.
I was not able to build the exe using cx_freeze and the example from comment 2 does not output anything, so can you please try to provide a reliable way to reproduce the issue?
https://bugs.winehq.org/show_bug.cgi?id=33494
--- Comment #6 from Deve deveee@gmail.com --- This example (exe file) crashes for me on wine 1.3.37, but works fine with wine 1.6.2 and 1.7.33.
deve@deve:/home/Dokumenty/tempfile-test$ wine kalendarz.exe c:\users\deve\temp fixme:msvcrt:__clean_type_info_names_internal (0x100554f0) stub fixme:msvcrt:__clean_type_info_names_internal (0x1e24c168) stub
https://bugs.winehq.org/show_bug.cgi?id=33494
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #7 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Deve from comment #6)
This example (exe file) crashes for me on wine 1.3.37, but works fine with wine 1.6.2 and 1.7.33.
Marking fixed then.
https://bugs.winehq.org/show_bug.cgi?id=33494
--- Comment #8 from Deve deveee@gmail.com --- This example probably didn't show anything on Windows because when you compile something as window application, then you don't get any output to console. It must be compiled as console application. On Linux it works slightly different and you still get output in terminal.
Anyway it was fixed somewhere in the past and that's important.
https://bugs.winehq.org/show_bug.cgi?id=33494
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.35.