Hi Nyall, I know there are some issues when an exception is thrown from a DLL compiled with a different runtime version (i.e. different compiler version) than the DLL/EXE trying to catch it.
https://stackoverflow.com/questions/5107948/throwing-c-exceptions-across-dll-boundaries Could it be the case between geos and qgis ? On 02/03/2018 10:33, Nyall Dawson wrote: > Hi all, > > While investigating Anita's "most annoying issue", > https://issues.qgis.org/issues/14752 I've tracked this down to certain > calls to geos functions crashing on Windows builds alone. > > The situation is that the geos exception handler, throwGEOSException > is correctly called, which triggers a "throw GEOSException" call. The > exception *should* be caught... indeed it's wrapped in suitable > try/catch blocks, and it works correctly on all other platforms. But > not on the msvc Windows builds. > > For some reason the msvc builds just ignore the catch and crash with > an unhandled exception. It's very odd, and I can't work out why it > works correctly for some GEOSExceptions yet not others. My searching > hasn't turned up any tricky issues with msvc exception handling > either... > > It's reproducable using the qgis_expressiontest unit test -- when > running on Windows this will crash with a call to > QgsGeos::lineLocatePoint, where an exception thrown within > GEOSProject_r is not correctly caught. > > Long story short - I'm out of ideas here, yet it's quite a serious > issue which has plagued QGIS since at least 2.14. > > Do we have any msvc gurus with any idea what could be the cause of this? > > Nyall > > > > > > > > > > > > > > > > > > > [1] > _______________________________________________ > QGIS-Developer mailing list > QGIS-Developer@lists.osgeo.org > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer > _______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer