[QGIS-trac] Re: [Quantum GIS] #1878: remove setjmp/longjmp in grass plugin&provider and use exceptions instead

Quantum GIS qgis at qgis.org
Tue Jan 12 12:58:11 EST 2010


#1878: remove setjmp/longjmp in grass plugin&provider and use exceptions instead
-------------------------------------+--------------------------------------
        Reporter:  jef               |         Owner:  jef          
            Type:  patch             |        Status:  reopened     
        Priority:  minor: annoyance  |     Milestone:  Version 1.3.0
       Component:  GRASS             |       Version:  HEAD         
      Resolution:                    |      Keywords:               
Platform_version:                    |      Platform:  All          
        Must_fix:  No                |   Status_info:  0            
-------------------------------------+--------------------------------------
Changes (by rblazek):

  * status:  closed => reopened
  * resolution:  fixed =>

Comment:

 Replying to [comment:9 jef]:
 > applied in r11560

 Are you sure it works after
 http://trac.osgeo.org/grass/changeset?old_path=grass%2Ftrunk%2Flib%2Fgis%2Ferror.c&old=23438&new_path=grass%2Ftrunk%2Flib%2Fgis%2Ferror.c&new=23439?
 For me exceptions cannot be caught after that change. The installed
 routine in QGIS is called, but then it terminates. It seems, that a
 function in a library in C cannot be interrupted by calling a function in
 C++ which throws an exception. Wasn't used setjmp/longjmp to solve it?

 {{{
 #5  0x0066f452 in std::terminate() () from /usr/lib/libstdc++.so.6
 #6  0x0066f591 in __cxa_throw () from /usr/lib/libstdc++.so.6
 #7  0x05d6eed7 in QgsGrass::openMapset(QString, QString, QString) ()
    from /home/radim/apps/lib/libqgisgrass.so.1.5.0
 #8  0x07c842e4 in ?? () from /usr/lib/grass64/lib/libgrass_gis.so
 #9  0x07c848f2 in G_fatal_error () from
 /usr/lib/grass64/lib/libgrass_gis.so
 #10 0x01fea6d5 in ?? () from /usr/lib/grass64/lib/libgrass_vect.so
 #11 0x01feb225 in Vect__open_old () from
 /usr/lib/grass64/lib/libgrass_vect.so
 #12 0x01feb77c in Vect_open_old_head () from
 /usr/lib/grass64/lib/libgrass_vect.so
 #13 0x037ea4a1 in QgsGrassSelect::vectorLayers(QString, QString, QString,
 QString) ()
    from /home/radim/apps/lib/qgis/libgrassplugin.so
 }}}

 I dont understand how it can come to QgsGrass::openMapset however.

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/1878#comment:10>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list