Oracle & Python trouble

Gerhard Häring gerhard.haering at opus-gmbh.net
Tue Jan 21 12:30:49 EST 2003


Fred Bartlett <vepxistqaosani at netscape.net> wrote:
> Hello!
> 
> I'm using Python to access an Oracle DB with the cx_Oracle module.
> But Windows 2000 (yeah, yeah, I know ...) doesn't like my script:
> [...]
> The first time through the "for tablename" loop, it works; the second time,
> it crashes with a Win2k error message:
> 
>   python.exe - Application Error
>   The instructions at <address> referenced memory at "0x00000000". The
>   memory could not be "written".
> 
> This looks very much like a problem with a rogue null pointer; but where
> could it be hiding?

Without a C compiler (read: M$VC) and cx_Oracle compiled in debug mode
(easiest against the debug build of Python; python setup.py build --debug)
or, alternatively, the temporary addition of a bunch of logging statements
in the cx_Oracle source you likely won't find out.

It's IMO very unlikely that this problem is Windows-specific, so if you
don't have access to the necessary development environment for MS operating
systems, you could maybe just build DCOracle in debug mode on Linux/Unix
and do something like:

#v+
$ ulimit -c unlimited
$ python my_script.py
$ gdb /path/to/python
gdb> core core
gdb> bt              # <-- this will show the backtrace
#v-

nothing-a-few-hundred-printfs-couldn't-fix-ly yours,

Gerhard
-- 
Gerhard Häring
OPUS GmbH München
Tel.: +49 89 - 889 49 7 - 32
http://www.opus-gmbh.net/




More information about the Python-list mailing list