[Fwd: Re: [ctypes-users] Application error with Report Manager on
exit]
Werner F. Bruhin
werner.bruhin at free.fr
Tue Feb 13 13:30:17 PST 2007
I am having the above problem with Report Manager. Suspected that it
had to do with ctypes but Thomas was so kind enough to have a look at it
and thinks that it has to do with wx (see end of this message).
I hope that someone could look into this who has the know how and time
to work with a wx debug build.
The problem does not happen using only Python code, but when the
following two lines are e.g. in a OnButton Event the error does happen.
rm = ReportMan(r"c:\temp\bruhin\sample4.rep")
rm.preview()
Werner
-------- Original Message --------
Subject: Re: [ctypes-users] Application error with Report Manager on exit
Date: Tue, 13 Feb 2007 20:45:01 +0100
From: Thomas Heller <theller at ctypes.org>
To: Werner F. Bruhin <werner.bruhin at free.fr>
References: <45CDF24C.9020600 at free.fr> <eqrs46$qkq$1 at sea.gmane.org>
<45D1A090.6070908 at free.fr>
Werner F. Bruhin schrieb:
> Thomas,
>
> I attached some files, so won't copy the list.
>
> Thomas Heller wrote:
>> Werner F. Bruhin schrieb:
>>
>>> I am using Report Manager 2.6j and its ReportMan.ocx ActiveX to run
>>> reports from within Python.
>>>
>>> All works well except when I view report settings in the Report Manager
>>> preview window, after that when I close the application I get a
>>> Application error, followed by a Runtime error 216.
>>>
>>> The developer of RM can't recreate this problem, on the RM list there is
>>> at list one other user seeing the same problem.
>>>
>>> I get this error with:
>>>
>>> Python 2.4.1 and ctypes 0.9.6, 0.9.9 and 1.0.1 and the same using Python
>>> 2.4.4.
>>>
>>> To run the reports I use reportman.py by Shawn L. Church.
>>>
>>> Can anyone give some pointers on how to isolate/fix this?
>>>
>>
>> The 'canonical' way to find the bug is probably to build a debug
>> version of Python and ctypes. Should not be too hard if you have MSVC 7.1,
>> but it can be a pain if you also have to compile other extensions that
>> you use (wxPython, pywin32, whatever); so it may be a good idea to make
>> a failing testcase as minimal as possible.
>>
> I am on Win XP and don't have the tools to build (nor the know how).
>> Is there a way for *me* to try to repro the bug?
>>
> Yes, and I would really appreciate if you could try.
>
> You will need:
> Report Manager: "reportman2_6j.exe" from the Report Manager site
> http://sourceforge.net/projects/reportman
>
> reportman.py needs to go into C:\Python24\Lib\site-packages
>
> testrepman3.py goes into any temp folder and copy also "biolife.cds" and
> "sample4.rep" from the Report Manager installation folder (under program files)
> to this temp folder. In testrepman3.py adjust "OnButton1Button" with the
> correct folder name.
>
> Run the script and click on Page Setup icon (with the two hands), click on the
> tabs and then OK, and close the script and you should see the error.
>
Werner, I have tried that and can confirm the error you get. However,
using this code:
from reportman import ReportMan
rm = ReportMan(r"c:\temp\bruhin\sample4.rep")
rm.preview()
the error does not occur. So, I get the impression that the problem is
not in reportman.py, or in ctypes, but instead somewhere in wx or the
wx activeX wrapper. Unfortunately, I don't have a debug build of wxPython,
so I cannot debug this further.
Hope that helps (but I'm afraid it will not).
Thomas
More information about the wxpython-users
mailing list