[gdal-dev] Bus error on gdal.Open

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[gdal-dev] Bus error on gdal.Open

Grégory Bataille
Hi everyone,

I have the strangest issue and I don't know how to address it.
I'm running on a mac. I have gdal 2.2.0 installed on the system.
I have a python 3.5.2 virtualenv (same behavior in 3.6.1)
inside I have a number of libraries, including django and the GDAL bindings.

If from this virtualenv I open a ipython console and try to gdal.Open a TIFF, all works well.
If I open a django console (django manage.py shell) in this virtualenv and try to perform the same operation, I get
TIFFReadDirectory: Warning, Unknown field with tag 42112 (0xa480) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 42113 (0xa481) encountered.
[1]    15947 bus error  python manage.py shell

This happens also if I go through the django.contrib.gis.gdal module that django embarks (that is a subpart, old? of gdal bindings)

This does not seem to happen on my production Linux install.

I have no idea how to investigate this. I don't know what django could do at startup that could have this kind of adverse effect.
(if there are django knowledgeable people, I get the same error when launching the code through celery)

According to the django code, launching a django shell should basically be equivalent to launching a ipython

Any idea what I can try to do?

Thanks

---
Gregory Bataille

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bus error on gdal.Open

Even Rouault-2

On mardi 25 juillet 2017 11:00:36 CEST Grégory Bataille wrote:

> Hi everyone,

>

> I have the strangest issue and I don't know how to address it.

> I'm running on a *mac*. I have *gdal 2.2.0* installed on the system.

> I have a python 3.5.2 *virtualenv* (same behavior in 3.6.1)

> inside I have a number of libraries, including django and the *GDAL

> bindings*.

>

> If from this virtualenv I open a *ipython* console and try to gdal.Open a

> TIFF, *all works well*.

> If I open a *django console* (django manage.py shell) in this virtualenv

> and try to perform the same operation, I get

>

> > TIFFReadDirectory: Warning, Unknown field with tag 42112 (0xa480)

> > encountered.

> > TIFFReadDirectory: Warning, Unknown field with tag 42113 (0xa481)

> > encountered.

 

This is weird. Those are the TIFFTAG_GDAL_METADATA and TIFFTAG_GDAL_NODATA tags that are defined by the GDAL GTiff driver. So if you open something with GDALOpen() that shouldn't happen normally

 

I'm wondering if in your whole system you don't have several libtiff versions mixed together. How is your GDAL configured ? If it uses internal libtiff and libgeotiff, make sure to ./configure --with-rename-internal-libtiff-symbols and --with-rename-internal-libgeotiff-symbols so that the internal libtiff and libgeotiff in GDAL do not collide with other.

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bus error on gdal.Open

Grégory Bataille
that's the part where I'm not sure. For simplicity sake, I'm sourcing the GDAL install from osgeo4mac

It's super practical. And since I'm not big on C compiling (and setup of compilation), that's helpful. But then I don't know what it does.

Also, those 2 lines are warning. I don't know if they are the one causing the bus error and the subsequent crash of the console.

But you are right that I seem to have several libtiff
4.0.8
4.0.7_3
4.0.7_2
4.0.7_1
4.0.7

I tried to remove gdal, and the python bindings and reinstall from scratch again, but same result.

What I really can't understand is that ipython and ipython launched through django, in the same virtualenv, give different results


---
Gregory Bataille

On Tue, Jul 25, 2017 at 11:37 AM, Even Rouault <[hidden email]> wrote:

On mardi 25 juillet 2017 11:00:36 CEST Grégory Bataille wrote:

> Hi everyone,

>

> I have the strangest issue and I don't know how to address it.

> I'm running on a *mac*. I have *gdal 2.2.0* installed on the system.

> I have a python 3.5.2 *virtualenv* (same behavior in 3.6.1)

> inside I have a number of libraries, including django and the *GDAL

> bindings*.

>

> If from this virtualenv I open a *ipython* console and try to gdal.Open a

> TIFF, *all works well*.

> If I open a *django console* (django manage.py shell) in this virtualenv

> and try to perform the same operation, I get

>

> > TIFFReadDirectory: Warning, Unknown field with tag 42112 (0xa480)

> > encountered.

> > TIFFReadDirectory: Warning, Unknown field with tag 42113 (0xa481)

> > encountered.

 

This is weird. Those are the TIFFTAG_GDAL_METADATA and TIFFTAG_GDAL_NODATA tags that are defined by the GDAL GTiff driver. So if you open something with GDALOpen() that shouldn't happen normally

 

I'm wondering if in your whole system you don't have several libtiff versions mixed together. How is your GDAL configured ? If it uses internal libtiff and libgeotiff, make sure to ./configure --with-rename-internal-libtiff-symbols and --with-rename-internal-libgeotiff-symbols so that the internal libtiff and libgeotiff in GDAL do not collide with other.

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com



_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Loading...