Re: [Qgis-developer] Access violation - no RTTI data
Nyall Dawson wrote > Wouldn't that cause a ton of other errors though? It's used pretty > heavily all throughout QGIS, and there's many other sip classes > relying on it... That was my thought. I've certainly never come across the error before, and since the plugin basically queries the hell out of symbol layers, I do find it a little hard to believe that the cause could be such a widespread issue. I'll have a dig around in the code, and see if I can find a counterexample. I certainly use renderer.symbolLayer(n) elsewhere. - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Access-violation-no-RTTI-data-tp5290830p5290990.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Access violation - no RTTI data
Matthias Kuhn-2 wrote > The good news: This can be fixed, I've just fixed it in master [1]. > Please let me know if you need this backported and where to (so you can > test). Brilliant - many thanks. I'd argue for a backport to LTR. I claim compatibility back to 2.8, but I'm perfectly happy to drop that, and say the plugin is only compatible with LTR+. But I'll also try the dev nightly (although it occurs to me that I need to ask about dev nightlies now we have master and master2). - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Access-violation-no-RTTI-data-tp5290830p5290989.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Access violation - no RTTI data
Hi Jürgen, On 10/17/2016 10:50 AM, Jürgen E. Fischer wrote: > Hi Matthias, > > On Mon, 17. Oct 2016 at 10:36:58 +0200, Matthias Kuhn wrote: >> I had the same thoughts. And no final explanation. > > Or it's simply a bogus pointer that doesn't point at anything with RTTI > (anymore)? True. The samples from Tom didn't look like this to me. Or is this some variant of bug #777? Matthias ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Access violation - no RTTI data
Hi Matthias, On Mon, 17. Oct 2016 at 10:36:58 +0200, Matthias Kuhn wrote: > I had the same thoughts. And no final explanation. Or it's simply a bogus pointer that doesn't point at anything with RTTI (anymore)? Jürgen -- Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31 Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50 Software Engineer D-26506 Norden http://www.norbit.de QGIS release manager (PSC) GermanyIRC: jef on FreeNode pgpI0eTmf8lon.pgp Description: PGP signature ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Access violation - no RTTI data
On 10/17/2016 10:28 AM, Nyall Dawson wrote: > On 17 October 2016 at 18:24, Matthias Kuhn wrote: >> Hi Tom, >> >> RTTI is some low-level C++ functionality to determine an objects type >> (roughly equivalent to `type(myobject)` in python). It can be enabled >> and disabled during compilation. Apparently it was disabled on your QGIS >> build. > > Wouldn't that cause a ton of other errors though? It's used pretty > heavily all throughout QGIS, and there's many other sip classes > relying on it... > > Nyall I had the same thoughts. And no final explanation. Maybe it's something related to how sip bindings are compiled that they have no access to RTTI. Plus I think it should be enabled on most systems so issues don't surface too often. But I think removing RTTI dependency where issues surface cannot hurt (apart from some performance impacts due to string comparison here but I guess this code here shouldn't be used so heavily that this will ever make something feel slow.) Matthias ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Access violation - no RTTI data
On 17 October 2016 at 18:24, Matthias Kuhn wrote: > Hi Tom, > > RTTI is some low-level C++ functionality to determine an objects type > (roughly equivalent to `type(myobject)` in python). It can be enabled > and disabled during compilation. Apparently it was disabled on your QGIS > build. Wouldn't that cause a ton of other errors though? It's used pretty heavily all throughout QGIS, and there's many other sip classes relying on it... Nyall > > The bad news: QGIS uses this information to determine which type of > symbollayer is in use. > > The good news: This can be fixed, I've just fixed it in master [1]. > Please let me know if you need this backported and where to (so you can > test). > > Matthias > > [1] > https://github.com/qgis/QGIS/commit/8fa3127c66220ad338ea9a1b367b0d78c56c9067 > > On 10/16/2016 01:14 PM, Tom Chadwin wrote: >> So RTTI is info about object data types at runtime? Is the print unable to >> determine the symbollayer or symbollayerlist (or whatever the latter is) >> type? Why? >> >> Obviously, my aim is not to print, but to use the data. However, the error >> occurred before I used print to investigate the problem. >> >> Can anyone help? >> >> >> >> - >> Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon >> -- >> View this message in context: >> http://osgeo-org.1560.x6.nabble.com/Access-violation-no-RTTI-data-tp5290830p5290885.html >> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. >> ___ >> Qgis-developer mailing list >> Qgis-developer@lists.osgeo.org >> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer >> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer >> > ___ > Qgis-developer mailing list > Qgis-developer@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Access violation - no RTTI data
Hi Tom, RTTI is some low-level C++ functionality to determine an objects type (roughly equivalent to `type(myobject)` in python). It can be enabled and disabled during compilation. Apparently it was disabled on your QGIS build. The bad news: QGIS uses this information to determine which type of symbollayer is in use. The good news: This can be fixed, I've just fixed it in master [1]. Please let me know if you need this backported and where to (so you can test). Matthias [1] https://github.com/qgis/QGIS/commit/8fa3127c66220ad338ea9a1b367b0d78c56c9067 On 10/16/2016 01:14 PM, Tom Chadwin wrote: > So RTTI is info about object data types at runtime? Is the print unable to > determine the symbollayer or symbollayerlist (or whatever the latter is) > type? Why? > > Obviously, my aim is not to print, but to use the data. However, the error > occurred before I used print to investigate the problem. > > Can anyone help? > > > > - > Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/Access-violation-no-RTTI-data-tp5290830p5290885.html > Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. > ___ > Qgis-developer mailing list > Qgis-developer@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer > ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Access violation - no RTTI data
So RTTI is info about object data types at runtime? Is the print unable to determine the symbollayer or symbollayerlist (or whatever the latter is) type? Why? Obviously, my aim is not to print, but to use the data. However, the error occurred before I used print to investigate the problem. Can anyone help? - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Access-violation-no-RTTI-data-tp5290830p5290885.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Access violation - no RTTI data
OK, I didn't have the code which causes it quite right: if isinstance(layer.rendererV2(), QgsCategorizedSymbolRendererV2): symbol = layer.rendererV2().categories()[0].symbol() print symbol.symbolLayerCount() Outputs 1 However: if isinstance(layer.rendererV2(), QgsCategorizedSymbolRendererV2): symbol = layer.rendererV2().categories()[0].symbol() print symbol.symbolLayers() and: if isinstance(layer.rendererV2(), QgsCategorizedSymbolRendererV2): symbol = layer.rendererV2().categories()[0].symbol() print symbol.symbolLayer(0) both cause the RTTI error and QGIS to hang. - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Access-violation-no-RTTI-data-tp5290830p5290834.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Access violation - no RTTI data
Sure: if isinstance(layer.rendererV2(), QgsCategorizedSymbolRendererV2): symbol = layer.rendererV2().categories()[0].symbol() It's here: https://github.com/tomchadwin/qgis2web/blob/leafletRefactor/leafletScriptStrings.py#L376 To recreate: 1. Install the qgis2web leafletRefactor branch from Github 2. Open a point layer 3. Select a categorized renderer 4. Use an SVG marker instead of a simple marker 5. Start qgis2web 6. Click "Leaflet" to switch to Leaflet output That triggers the error for me. Brief searching suggests something to do with losing a reference to the canvas or ToC, or something. I'm on Win7 x64, 64-bit QGIS from OSGeo4W installer, 2.16.3 (also tried with an elderly master2 - 0497e4a). Any help gratefully received - I'm not experienced at debugging lower-level issues than Python errors... Thanks Tom - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Access-violation-no-RTTI-data-tp5290830p5290833.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Access violation - no RTTI data
2016-10-15 13:05 GMT+02:00 Tom Chadwin : > What on earth does that mean when running a Python plugin? > ... referenced to what ? Can you send us an example of your code ? Thank you geo > > Thanks > > Tom > > > > - > Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon > -- > View this message in context: http://osgeo-org.1560.x6. > nabble.com/Access-violation-no-RTTI-data-tp5290830.html > Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. > ___ > Qgis-developer mailing list > Qgis-developer@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer