Bugs item #1083793, was opened at 2004-12-12 10:25 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1083793&group_id=5470
Category: Python Interpreter Core Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Axel Kaiser (axel_kaiser) Assigned to: Nobody/Anonymous (nobody) Summary: Python 2.4 crashes Initial Comment: 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 ---------------------------------------------------------------------- >Comment By: Martin v. Löwis (loewis) Date: 2004-12-15 23:39 Message: Logged In: YES user_id=21627 Can you create a small test case that demonstrates the problem? ---------------------------------------------------------------------- Comment By: Axel Kaiser (axel_kaiser) Date: 2004-12-15 21:58 Message: 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. ---------------------------------------------------------------------- Comment By: Raymond Hettinger (rhettinger) Date: 2004-12-15 19:02 Message: Logged In: YES user_id=80475 Any objections to marking this as Invalid and closing the bug? ---------------------------------------------------------------------- Comment By: Wolfgang Langner (tds33) Date: 2004-12-15 16:16 Message: 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); ---------------------------------------------------------------------- Comment By: salyee (salyee) Date: 2004-12-15 07:17 Message: 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 ? ---------------------------------------------------------------------- Comment By: Raymond Hettinger (rhettinger) Date: 2004-12-12 10:56 Message: 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. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1083793&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com