{{{
/Users/vasilty/Documents/Projects/django/tests/runtests.py(483)<module>()
-> options.exclude_tags,
/Users/vasilty/Documents/Projects/django/tests/runtests.py(277)django_tests()
-> extra_tests=extra_tests,
/Users/vasilty/Documents/Projects/django/django/test/runner.py(596)run_tests()
-> result = self.run_suite(suite)
/Users/vasilty/Documents/Projects/django/django/test/runner.py(561)run_suite()
-> return runner.run(suite)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/unittest/runner.py(176)run()
-> test(result)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/unittest/suite.py(84)__call__()
-> return self.run(*args, **kwds)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/unittest/suite.py(122)run()
-> test(result)
/Users/vasilty/Documents/Projects/django/django/test/testcases.py(211)__call__()
-> super(SimpleTestCase, self).__call__(result)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/unittest/case.py(648)__call__()
-> return self.run(*args, **kwds)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/unittest/case.py(596)run()
-> self.setUp()
>
/Users/vasilty/Documents/Projects/django/tests/gis_tests/gdal_tests/test_raster.py(312)setUp()
-> self.rs_path = os.path.join(os.path.dirname(upath(__file__)),
'../data/rasters/raster.tif')
}}}
TIFFReadDirectory: Warning, Unknown field with tag 42113 (0xa481)
encountered.
Segmentation fault: 11
--
Ticket URL: <https://code.djangoproject.com/ticket/27399>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_docs: => 0
* needs_better_patch: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:1>
Comment (by Tim Graham):
Do you have any details about why Django might be at fault? We don't ship
any C code, so segfaults are generally not caused by Django.
--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:2>
Comment (by Markus Holtermann):
Even if we don't ship C code, either our documentation lacks some details
on supported GDAL / GIS versions (that's beyond my knowledge) or we should
check for that. Either way, I don't think Django's test should segfault
regardless.
--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:3>
Comment (by Tim Graham):
What are the relevant GIS library versions? Did you reproduce the issue,
Markus?
--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:4>
Comment (by Saulius Žemaitaitis):
I can still reproduce it on master
(24c9cce1c9fb0dfe14e42de1ec2a2a209a64dd80).
OSX 10.11.6
Library versions (installed from Homebrew):
{{{
gdal 1.11.5_1
geos 3.5.0
libgeotiff 1.4.1_2
liblwgeom 2.1.5_3
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:5>
Comment (by Saulius Žemaitaitis):
The problem seems to be due to the way Pillow and GDAL interact. Pillow
wheel ships its own version of libtiff while GDAL library uses the system
one. This apparently causes the segfault. I don't have the skills to
narrow it down further.
Workaround is to install Pillow from source on OSX:
{{{
pip install --no-binary Pillow -r tests/requirements/py3.txt
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:6>
Comment (by winsent):
Look at this example. Install only pillow and Django without GDAL python
binding. This code raise exeption after pillow installed.
{{{
GEOTIF_PATH=/ta/dem.tif
virtualenv --python=python3 test
cd test
source bin/activate
pip install django==1.11.9 pillow
python -c "from django.contrib.gis.gdal import GDALRaster;
print(GDALRaster('$GEOTIF_PATH'))"
django-admin startproject testtest
cd testtest
django-admin startapp testtesttest
echo "\n\nINSTALLED_APPS += ['testtesttest']" >> testtest/settings.py
mkdir -p testtesttest/management/commands
touch testtesttest/management/__init__.py
testtesttest/management/commands/__init__.py
echo "from django.core.management.base import BaseCommand
class Command(BaseCommand):
def handle(self, *args, **options):
from django.contrib.gis.gdal import GDALRaster
print(GDALRaster('$GEOTIF_PATH'))
" > testtesttest/management/commands/gdal_test.py
python manage.py gdal_test
pip uninstall -y pillow
python manage.py gdal_test
}}}
Result:
{{{
TIFFReadDirectory: Warning, Unknown field with tag 42113 (0xa481)
encountered.
[1] 53998 bus error python manage.py gdal_test
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:7>
* status: new => closed
* resolution: => invalid
* stage: Accepted => Unreviewed
Comment:
Django 1.11 and GDAL 1.11 are no longer supported. Closing unless someone
can provide a clear path to reproduce this issue on supported versions.
--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:8>
* resolution: invalid => needsinfo
--
Ticket URL: <https://code.djangoproject.com/ticket/27399#comment:9>