Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit code -1073741819 (0xC0000005) #142

Closed
Neavrys opened this issue Mar 14, 2017 · 8 comments
Closed

Exit code -1073741819 (0xC0000005) #142

Neavrys opened this issue Mar 14, 2017 · 8 comments

Comments

@Neavrys
Copy link

Neavrys commented Mar 14, 2017

Hi all,
In django console, a simple code as :

from rasterstats import zonal_stats, point_query
stats = zonal_stats('Good Raster/wetlands.json', 'Good Raster/tempRaster.tif')

I received :
Process finished with exit code -1073741819 (0xC0000005)
(Python Crash)

Here is the files, (geojson and raster):
https://www.dropbox.com/sh/gacm4iu00aama4v/AADUm0RD0LYD_0fUV6Mxo3QFa?dl=0

Version :
Windows 10 pro 64 bit
PyCharm 2016.3.2
Python 2.7.12
Django 1.10.4
gdal 2.1.3
numpy 1.12.0+mkl
rasterio 0.36.0
rasterstats 0.12

Update:
The entire Zonal Statistics project, with OGR, OSR, Gdal, numpy, geojson that I code myself, work good but too dam slow. I need a efficient Zonal Statistic with geojson and a raster. This lib could save me but a critical error occurred when I use it without any other code or import.

Work in a virtual environment created by Pycharm.
All in 32 bit

Update2
error django console

When ran into Shell from terminal, I got some error details.

FATAL: CPLMalloc(): Out of memory allocating 516 bytes.
Python crash

error shell terminal

Alex

@sgoodm
Copy link
Contributor

sgoodm commented Mar 14, 2017

ran a quick test on ubuntu 14.04 64 bit and it works fine

the json from dropbox is wrapped in quotes, make sure to remove them before trying to run

@Neavrys
Copy link
Author

Neavrys commented Mar 14, 2017

@sgoodm
json from dropbox corrected.
Even with removing wrapped in quotes. It's still bug.

@perrygeo
Copy link
Owner

I can't reproduce this either, on OSX or linux.

Can you step through this in a debugger to identify the place it fails?

@Neavrys
Copy link
Author

Neavrys commented Mar 14, 2017

@perrygeo
Can't pass main.py at line 28

1.step into:
can't pass main.py at line 142

2.step into:
can't pass io.py at line 241

3.step into:
can't pass rasterio__init__.py at line 201

4.step into:
Pass thought def parse_path() in vfs.py

5.Return to :
rasterio__init__.py at line 201
can't pass rasterio__init__.py at line 201

6.step into:
Pass thought def vsi_path() in vfs.py

7.Return to :
rasterio__init__.py at line 201
can't pass rasterio__init__.py at line 201

8.step into:
Pass thought def getLogger() in logging_init_.py

9.Return to :
rasterio__init__.py at line 201
can't pass rasterio__init__.py at line 201

10.step into:
Pass thought def log() in logging_init_.py

11.Return to :
rasterio__init__.py at line 201
can't pass rasterio__init__.py at line 201
Crash when step into...

Is't it a library conflict?

@perrygeo
Copy link
Owner

@Neavrys thanks for diving into the details! Looks like you narrowed down the crash to a Rasterio call., likely some issues with its underlying C libraries. What happens if you try this rasterio code:

import rasterio
with rasterio.open('tempRaster.tif') as src:
    src.read()

@Neavrys
Copy link
Author

Neavrys commented Mar 15, 2017

@perrygeo

With the code you mention, I received in the geodjango console:
Process finished with exit code -1073741819 (0xC0000005)

The Shell from terminal won't give error details, just python crash.

With debug:
can't pass rasterio__init__.py at line 201, just like # 3. in my previous post.

@Neavrys
Copy link
Author

Neavrys commented Mar 15, 2017

Is it my problem ?
I think so...
[Rasterio-issues-219] (rasterio/rasterio#219)

@perrygeo
Copy link
Owner

It appears to be a problem with your Rasterio installation. I don't know much about installing rasterio and GDAL on 32-bit windows so I personally can't help with details. I'd encourage you to open a new ticket in the Rasterio repo so we can get more eyes on the issue.

Another option is Anaconda. I usually suggest installing rasterstats via conda-forge. It's not always an option but conda has the only complete solution to the dll problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants