MSW crash with <refcnt 0 at ...>

Mark Hammond mhammond at skippinet.com.au
Sun Jun 15 03:32:47 CEST 2003


Unfortunately, win32all-150 has that bug already applied. 
Unfortunately, I am a little stuck on what to do, as I don't have a 
database to test against.  Anyone listenening who has a debug build of 
win32all and an ODBC database to connect to should be able to provide me 
with alot more info (or even just a database I can connect to remotely).

Could you please open a bug in the pywin32 project at sourceforge?

Mark.

Frank Millman wrote:

> Mark Hammond <mhammond at skippinet.com.au> wrote in message news:<5JhGa.3746$GU5.51113 at news-server.bigpond.net.au>...
> 
>>Frank Millman wrote:
>>
>>>Can anyone explain what is going on? Thanks in advance.
>>
>>It smells like a reference count bug in the ODBC module.  What win32all 
>>version are you using?  I have no database to test against, but if you 
>>can reduce it down to the absolute minimum code needed to crash, I may 
>>still be able to find it.
>>
>>If you have an old win32all or ActivePython, please check the date - a 
>>quick check of the log for the ODBC module shows the following checkin:
>>
>>revision 1.5
>>date: 2001/06/18 06:57:21;  author: mhammond;  state: Exp;  lines: +7 -7
>>Patches from Alex Martelli that solves some crashes under error conditions.
>>
>>A later ODBC module may fix your problem.
>>
>>Mark.
> 
> 
> Thanks for the prompt reply, Mark.
> 
> I am not sure how to check the version of win32all, but the
> installation program is win32all-150.exe, so it looks as if it is
> version 1.5. I downloaded it late last year.
> 
> Here is a smaller version of my program that still crashes.
> 
> ######################################################
> 
> import odbc
> db = odbc.odbc('frank/Adminstrator')
> # c = db.cursor()    # [1]
> 
> def update():
>     c = db.cursor()  # [2]
>     try:
>         c.execute("insect into fmtest values ('F001','FGH
> Ltd','Frank','1234567')")
>         return ['success']
>     except:
>         return ['fail']
> 
> print update()
> 
> ######################################################
> 
> Note the deliberate spelling error "insect" intead of "insert". This
> is an easier way of ensuring that the insert fails.
> 
> Another clue - note the lines flagged [1] and [2]. The former declares
> the cursor outside the function, the latter declares it inside. If I
> run the program with line [1] active and line [2] commented out, the
> error does not occur.
> 
> Let me know if I can supply any further information.
> 
> Many thanks
> 
> Frank





More information about the Python-list mailing list