I wrote: > > 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
and Mark Hammond replied: > 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? No, from a DOS prompt (cmd.exe). However, I get similar problems launching from Pythonwin interactively. > > ...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. Okay. This is probably especially true since my app doesn't handle any complex numbers (at least not in my code). I also can't find complex mentioned anywhere in the ADO COM lib (in gen_py) or in the _mysql.pyd C code (which I call directly instead of using the DBAPI wrapper). http://cvs.sourceforge.net/viewcvs.py/mysql-python/mysql/_mysqlmodule.c? rev=1.42&view=auto > 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. ...for which I'd need vc++, right? IIRC, I'd need at least version 7? Would "Visual Studio .NET Professional Edition 2003" be okay? I can get that cheap from TechSoup. ;) I'm willing to do the research if I can just get pointed in the right direction. Thanks for the help so far! Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32