Revision: 8455
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8455&view=rev
Author:   mdboom
Date:     2010-06-22 16:30:24 +0000 (Tue, 22 Jun 2010)

Log Message:
-----------
Debian Bug#585442: python-matplotlib: crashes when calling axis() after imshow()
This allows the C++ exception raised when Agg rendering complexity is exceeded 
to percolate up correctly to a Python exception, rather than crashing the 
interpreter.
Fixes problem in last commit.

Modified Paths:
--------------
    trunk/matplotlib/agg24/include/agg_rasterizer_cells_aa.h

Modified: trunk/matplotlib/agg24/include/agg_rasterizer_cells_aa.h
===================================================================
--- trunk/matplotlib/agg24/include/agg_rasterizer_cells_aa.h    2010-06-22 
16:00:55 UTC (rev 8454)
+++ trunk/matplotlib/agg24/include/agg_rasterizer_cells_aa.h    2010-06-22 
16:30:24 UTC (rev 8455)
@@ -179,16 +179,15 @@
     template<class Cell>
     AGG_INLINE void rasterizer_cells_aa<Cell>::add_curr_cell()
     {
-        static Py::Exception e(
-            Py::OverflowError(
-                "Agg rendering complexity exceeded. Consider downsampling or 
decimating your data."));
-
-
         if(m_curr_cell.area | m_curr_cell.cover)
         {
             if((m_num_cells & cell_block_mask) == 0)
             {
                 if(m_num_blocks >= cell_block_limit) {
+                    static Py::Exception e(
+                        Py::OverflowError(
+                            "Agg rendering complexity exceeded. Consider 
downsampling or decimating your data."));
+
                     /* If this exception is thrown too often, one can
                        increase cell_block_limit */
                     throw e;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to