Issue1083793
Created on 2004-12-12 09:25 by axel_kaiser, last changed 2004-12-17 12:12 by axel_kaiser.
| File name |
Uploaded |
Description |
Edit |
Remove |
|
drwtsn32.log
|
axel_kaiser,
2004-12-15 20:58
|
Dr. Watson log file |
|
|
|
crash.zip
|
axel_kaiser,
2004-12-16 13:56
|
Zip with two demo files for the crash |
|
|
|
msg23661 - (view) |
Author: Axel Kaiser (axel_kaiser) |
Date: 2004-12-12 09:25 |
|
The new Python 2.4 crashes when starting some of my
programs. This happens under win xp as well as under
win nt. The crashes are reproduceble, but I didn't
succeed in finding the exact place where it happens.
In the attachment you find a Dr. Watson logfile. I hope
it helps. Otherwise I think I will be able to help with
more information.
Thanks in advance
Axel Kaiser
Germany
|
|
msg23662 - (view) |
Author: Raymond Hettinger (rhettinger) |
Date: 2004-12-12 09:56 |
|
Logged In: YES
user_id=80475
The attachment didn't make it.
Be sure to check the upload box or it won't make it.
|
|
msg23663 - (view) |
Author: salyee (salyee) |
Date: 2004-12-15 06:17 |
|
Logged In: YES
user_id=1178573
I have the same or similar problem.
While python24.dll(Python 2.4 for Windows) uses msvcr71.dll
for CRT, host C++ program embeding Python 2.4 as a script
engine, in my project, is compiled by VC++ 6.0 (msvcrt.dll).
So, the following code snip makes a crash.
FILE* fp = fopen("somecode.py", "rt"); // uses msvcrt.dll
PyRun_SimpleFile(fp, "somecode.py); // uses msvcr71.dll
inside. Cause of a crash.
In my case, I must use VC++ 6.0 and I want clients of my
program to install Python 2.4 from www.python.org.
How do I solve this problem ?
|
|
msg23664 - (view) |
Author: Wolfgang Langner (tds333) |
Date: 2004-12-15 15:16 |
|
Logged In: YES
user_id=600792
The FILE pointer is specific to your c-lib.
Different versions of the ms c-lib have incompatible
implementations of this structure.
To work arround such problems use python to get the right FILE*
Example (not tested):
/* use pythons std c library to produce a FILE object
to avoid mess with different c libs in debug or release mode
and different versions used to compile python
*/
PyObject* pyFile = PyFile_FromString(fileName, "r");
FILE* const file = PyFile_AsFile(pyFile);
assert(0 != file);
const int succ = PyRun_SimpleFile(file, fileName);
// now remove py file object
Py_XDECREF(pyFile);
|
|
msg23665 - (view) |
Author: Raymond Hettinger (rhettinger) |
Date: 2004-12-15 18:02 |
|
Logged In: YES
user_id=80475
Any objections to marking this as Invalid and closing the bug?
|
|
msg23666 - (view) |
Author: Axel Kaiser (axel_kaiser) |
Date: 2004-12-15 20:58 |
|
Logged In: YES
user_id=1176563
Sorry, the attachment was not appended. By the way, the
problem occurs without any external modules/libraries. It
just juses python-source. The problem might be connected
with the use of module array.
|
|
msg23667 - (view) |
Author: Martin v. Löwis (loewis) |
Date: 2004-12-15 22:39 |
|
Logged In: YES
user_id=21627
Can you create a small test case that demonstrates the problem?
|
|
msg23668 - (view) |
Author: Axel Kaiser (axel_kaiser) |
Date: 2004-12-16 13:56 |
|
Logged In: YES
user_id=1176563
Okay, I finally was able to produce a small example. When I
start python from the commandline with
file "Lebenserwartung.py" python crashes. It doesn't crash
when I remove the coding-line (1st line) of
file "Sterbetafeln.py".
(The example can't run properly due to missing files, but
these don't influence the crashes)
Best regards, Axel
|
|
msg23669 - (view) |
Author: Walter Dörwald (doerwalter) |
Date: 2004-12-16 14:34 |
|
Logged In: YES
user_id=89016
This sounds like it might be related to bug
http://www.python.org/sf/1076985. Can you retry your
scripts with the patch from
http://www.python.org/sf/1076985? What happens if you
replace the "cp1252" in the encoding header with "iso-8859-
1"?
A quick workaround might be to wrap the long source lines in
Sterbetafeln.py.
|
|
msg23670 - (view) |
Author: Axel Kaiser (axel_kaiser) |
Date: 2004-12-17 12:12 |
|
Logged In: YES
user_id=1176563
That's it!!! I applied the patch to codecs.py and now it works
without crash!
Thanks a lot!
Let's close this thread.
|
|
| Date |
User |
Action |
Args |
| 2004-12-12 09:25:26 | axel_kaiser | create | |
|