Thread: [pywin32-bugs] [ pywin32-Bugs-754796 ] Reference count bug in ODBC
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2003-06-15 08:04:16
|
Bugs item #754796, was opened at 2003-06-15 08:04 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=754796&group_id=78018 Category: win32 Group: None Status: Open Resolution: None Priority: 5 Submitted By: Frank Millman (chagford) Assigned to: Nobody/Anonymous (nobody) Summary: Reference count bug in ODBC Initial Comment: The following code crashes - import odbc db = odbc.odbc('frank/Adminstrator') def update(): c = db.cursor() try: c.execute("insect into fmtest values ('rubbish')") return ['success'] except: return ['fail'] print update() The update routine tries to insert a record into the database. If it fails (it will in the example as the command is invalid), MSW pops up a box with the message "Python.exe has generated errors and will be closed by Windows", and the dos box displays the message "<refcnt 0 at ....>". The error only occurs if the return type is a list, and if the function returns from the "except" clause. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=754796&group_id=78018 |
From: SourceForge.net <no...@so...> - 2003-10-10 10:02:59
|
Bugs item #754796, was opened at 2003-06-15 10:04 Message generated for change (Comment added) made by gfe You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=754796&group_id=78018 Category: win32 Group: None Status: Open Resolution: None Priority: 5 Submitted By: Frank Millman (chagford) Assigned to: Nobody/Anonymous (nobody) Summary: Reference count bug in ODBC Initial Comment: The following code crashes - import odbc db = odbc.odbc('frank/Adminstrator') def update(): c = db.cursor() try: c.execute("insect into fmtest values ('rubbish')") return ['success'] except: return ['fail'] print update() The update routine tries to insert a record into the database. If it fails (it will in the example as the command is invalid), MSW pops up a box with the message "Python.exe has generated errors and will be closed by Windows", and the dos box displays the message "<refcnt 0 at ....>". The error only occurs if the return type is a list, and if the function returns from the "except" clause. ---------------------------------------------------------------------- Comment By: Martin Gfeller (gfe) Date: 2003-10-10 12:02 Message: Logged In: YES user_id=884167 This can be reproduced more easily: import odbc conn = odbc.odbc("MSSTEST") curs = conn.cursor() curs.description Using PyWin 151 on PythonWin 2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] on win32 on Windows 2000. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=754796&group_id=78018 |
From: SourceForge.net <no...@so...> - 2003-10-19 06:35:43
|
Bugs item #754796, was opened at 2003-06-15 18:04 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=754796&group_id=78018 Category: win32 Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Frank Millman (chagford) Assigned to: Nobody/Anonymous (nobody) Summary: Reference count bug in ODBC Initial Comment: The following code crashes - import odbc db = odbc.odbc('frank/Adminstrator') def update(): c = db.cursor() try: c.execute("insect into fmtest values ('rubbish')") return ['success'] except: return ['fail'] print update() The update routine tries to insert a record into the database. If it fails (it will in the example as the command is invalid), MSW pops up a box with the message "Python.exe has generated errors and will be closed by Windows", and the dos box displays the message "<refcnt 0 at ....>". The error only occurs if the return type is a list, and if the function returns from the "except" clause. ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2003-10-18 16:08 Message: Logged In: YES user_id=14198 Thanks to Roger Upole for the fix. Checking in odbc.cpp; new revision: 1.8; previous revision: 1.7 ---------------------------------------------------------------------- Comment By: Martin Gfeller (gfe) Date: 2003-10-10 20:02 Message: Logged In: YES user_id=884167 This can be reproduced more easily: import odbc conn = odbc.odbc("MSSTEST") curs = conn.cursor() curs.description Using PyWin 151 on PythonWin 2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] on win32 on Windows 2000. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=754796&group_id=78018 |