[QGIS-Developer] Custom processing script instabilities

Luigi Pirelli luipir at gmail.com
Fri Jun 25 00:14:43 PDT 2021


strange that a library call exit, so I would inspect if the lib faces a
raise condition. I would check the code outside qgis checking if it
terminates for some reason.

Luigi Pirelli

**************************************************************************************************
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* GitHub: https://github.com/luipir
* Book: Mastering QGIS3 - 3rd Edition
<https://www.packtpub.com/eu/application-development/mastering-geospatial-development-qgis-3x-third-edition>
* Hire a team: http://www.qcooperative.net
**************************************************************************************************


On Thu, 24 Jun 2021 at 23:05, Alexis R.L. <alroyliz0 at gmail.com> wrote:

> Greetings Luigi,
>
> There were no interaction, I used glob to gather all the images in a
> folder, used Image.Open and then used _getexif(). But returning before this
> part was the only way to get a stable first run.
>
> Sadly I can share the code (work and IP).
>
> The rest of it looped through datapoints and correlated the images to the
> points using the exif timestamp and the geolocalisation.
>
> Alex
>
> Le jeu. 24 juin 2021 à 16:34, Luigi Pirelli <luipir at gmail.com> a écrit :
>
>> hard to say something without reading the code... btw generally you do
>> not have to interact with main GUi from a processing alg that by default
>> run in a separated thread => this can cause crash if you do not use
>> standard processing libs (e.g. feedback) to send message to the user.
>> No idea if this could be the source of the problem., IMHO sharing the
>> code would help and also help to verify if it can be replicable.
>>
>> regards
>>
>> Luigi Pirelli
>>
>>
>> **************************************************************************************************
>> * LinkedIn: https://www.linkedin.com/in/luigipirelli
>> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
>> * GitHub: https://github.com/luipir
>> * Book: Mastering QGIS3 - 3rd Edition
>> <https://www.packtpub.com/eu/application-development/mastering-geospatial-development-qgis-3x-third-edition>
>> * Hire a team: http://www.qcooperative.net
>>
>> **************************************************************************************************
>>
>>
>> On Thu, 24 Jun 2021 at 21:51, Alexis R.L. <alroyliz0 at gmail.com> wrote:
>>
>>> Greetings,
>>>
>>> I have one custom script that uses PIL to get the exif tag, and when I
>>> execute the script for the first time, the processing window vanishes and
>>> qgis stall and then crashes.
>>>
>>> To get it to run properly I had to set the return before opening the
>>> files with PIL to run a neutered version and then subsequent runs were
>>> flawless during that qgis instance.
>>>
>>> I ended up using a standalone exif reader, though slower , but there are
>>> no more crashes.
>>>
>>> Has anyone else had similar issues and is anyone aware of a way to
>>> prevent such crashes or handle them more gracefully, as no trace is left
>>> currently.
>>>
>>> Thanks and have a nice day,
>>>
>>> Alex
>>> _______________________________________________
>>> QGIS-Developer mailing list
>>> QGIS-Developer at lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210625/fcd0affd/attachment-0001.html>


More information about the QGIS-Developer mailing list