[python-win32] Dr. Watson woes with ADO, mysql
Mark Hammond
mhammond at skippinet.com.au
Mon Jan 10 23:33:30 CET 2005
> I've spent the last year writing an ORM in Python which I'm reasonably
> pleased with. But I have a recent problem: I can't seem to migrate
> tables from Microsoft Access (using ADO) to MySQL (using MySQLdb)
> without a crash. But, don't let the context fool you: when it
> crashes, I
> don't think I'm doing *anything* with the ADO connection, and
> I actually
> get the same crash when using Postgres instead of MySQL.
>
> I'm not a Windows guru by any means, but I have noticed a pattern:
> throughout my (many, naive) code changes to try to avoid the
> crash, the
> same functions keep popping up in drwtsn32.log:
>
> function: PyComplex_AsCComplex
> function: NtWaitForSingleObject (multiple times)
> function: NtWaitForMultipleObjects
> function: ZwReplyWaitReceivePortEx
> function: NtDelayExecution
> function: ScrollDC
All except the first and last are quite usual. I'm not sure where ScrollDC
has come from - are you using this from a GUI?
>
> ...where PyComplex_AsCComplex is the first one listed, and (if I'm
> reading MSDN correctly) is therefore the function "where the fault
> occurred".
>
> So the question is, what's the next step in tracking down the bug?
> PyComplex_AsCComplex is a pretty simple function. Or am I way off-base
> and should be looking elsewhere?
If a GUI is involved, you should try and make sure you are living within its
thread constraints. Its possible to cause a crash by mixing threading up in
a GUI.
PyComplex_AsCComplex does indeed look simple, but my guess is that given the
trouble you are having reproducing, there is a subtle reference-count bug
somewhere, and quite possibly relating to complex numbers. Given the nature
of such bugs, the place where the crash occurs is generally *not* the place
with the bug.
Unfortunately, we are piling speculation on speculation. Personally I would
get a debug build running, so a decent stack-trace is available, but I
understand that may not be an option.
Good luck,
Mark.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 2744 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-win32/attachments/20050111/44cb347d/winmail-0001.bin
More information about the Python-win32
mailing list