[vtkusers] python exceptions patch needed for vtk 5.6
c.p.botha at tudelft.nl
Fri May 28 18:43:37 EDT 2010
Dear Florian and David,
On 28 May 2010 21:07, Florian Bruckner <e0425375 at gmail.com> wrote:
> is there a reason why the patch was not merged into the official vtk release?
> i'm just wondering because that patch is fairly old and for me this seems to be a very good solution for a general problem.
The patch has a permanent home here:
Of course I think it's a good patch. :) It does the following:
1. Turns all VTK errors into Python exceptions.
2. Carefully releases the GIL during all calls into VTK (grabbing it
back for observers) so that you can successfully explicitly
multi-thread VTK pipelines from Python.
3. Tries to trap bad_alloc.
I've been working on this for years, but due to Windows unreachable
code warnings that I have not been able to solve, I've never committed
this to VTK (it works, just gives many warnings during compilation).
My own binaries all have this patch integrated (DeVIDE  and VTK
The current version is for 5.4.2, I'd like to update for 5.6 as soon
as I can figure out how to check out a clean 5.6 with git (until very
recently there was no tag yet, I see that it's there now!
I'm also considering to make a wiki page on devide.googlecode.com that
documents the patch.
> On Fri, May 28, 2010 at 4:07 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>> Hi Florian,
>> I haven't seen mention of the patch here on the list, and I know
>> that it isn't in VTK 5.6 or in VTK devel. For my own apps, I use
>> VTK observers to catch reader errors.
>> On Fri, May 28, 2010 at 12:52 AM, Florian Bruckner <e0425375 at gmail.com> wrote:
>> > hi,
>> > I just figured out the problem that no python exceptions are raised if
>> > my reader produces an error. I use vtk-5.6.
>> > after searching the net and the mailing list I found that there are some
>> > patches available
>> > (turn-vtk-errors-into-python-exceptions-and-catch-bad-malloc patch)
>> > which should solve this problem. Unfortunately I could neither find such
>> > a patch for vtk-5.6 nor any actual posts about this topic.
>> > So should this patch allready be included in the new vtk-5.6? or where
>> > can I get it otherwise? are there any reasons why the patch is not
>> > included in the official release? or is there another work around that
>> > is proposed for this kind of problems?
>> > thanks
>> > FloB
> Powered by www.kitware.com
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
dr. charl p. botha :: http://graphics.tudelft.nl/CharlBotha
work: cpbotha at medvis.org personal: cpbotha at cpbotha.net
See our latest papers on shape spaces, brain connectivity, shoulder
segmentation, human motion analysis, voxel classification and eye fat
More information about the vtkusers