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

Crash when calling QgsRasterHistogram.histogramVector #29700

Closed
qgib opened this issue Apr 18, 2019 · 8 comments · Fixed by #30139
Closed

Crash when calling QgsRasterHistogram.histogramVector #29700

qgib opened this issue Apr 18, 2019 · 8 comments · Fixed by #30139
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption High Priority Rasters Related to general raster layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Apr 18, 2019

Author Name: Anita Graser (@anitagraser)
Original Redmine Issue: 21885
Affected QGIS version: 3.7(master)
Redmine category:rasters


User Feedback

To reproduce, load a raster layer and run:

l = iface.activeLayer()
p = l.dataProvider()
p.initHistogram(QgsRasterHistogram(),1,100)
h=p.histogram(1)
h.histogramVector

Report Details

Crash ID: 83fbcfe1e268fc8a14c5f21189006505dfb05fea

Stack Trace

PyObject_GenericGetAttrWithDict :
PyObject_GetAttr :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :
PyImport_Import :
PyImport_Import :
PyMethodDef_RawFastCallKeywords :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyEval_EvalCodeWithName :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyMethodDef_RawFastCallKeywords :
PyEval_EvalFrameDefault :
PyFunction_FastCallDict :
PyMethodDef_RawFastCallDict :
PyObject_Call :
PyInit_sip :
PyInit_Qsci :
QWidget::event :
QFrame::event :
QAbstractScrollArea::event :
PyInit_Qsci :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processKeyEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
CallWindowProcW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.6.1-Noosa
QGIS code revision: 2468226
Compiled against Qt: 5.11.2
Running against Qt: 5.11.2
Compiled against GDAL: 2.4.1
Running against GDAL: 2.4.1

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.17134

@qgib
Copy link
Contributor Author

qgib commented Apr 18, 2019

Author Name: Giovanni Manghi (@gioman)


  • priority_id was changed from Normal to High

@qgib
Copy link
Contributor Author

qgib commented Apr 19, 2019

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Rasters Related to general raster layer handling (not specific data formats) Crash/Data Corruption labels May 25, 2019
@elpaso
Copy link
Contributor

elpaso commented May 30, 2019

@anitagraser I think that you should keep a reference to QgsRasterHistogram

rh = QgsRasterHistogram()
p.initHistogram(rh, 1, 100)

does it still crash?

@elpaso elpaso self-assigned this May 30, 2019
@anitagraser
Copy link
Member

anitagraser commented May 30, 2019

Unfortunately, that doesn't seem to help. (Tested in 3.4.8-Madeira and master)

histogram_crash

@elpaso
Copy link
Contributor

elpaso commented May 30, 2019

@anitagraser I cannot reproduce on master, I'm going to test 3.4 now

elpaso added a commit to elpaso/QGIS that referenced this issue May 30, 2019
@elpaso
Copy link
Contributor

elpaso commented May 30, 2019

@anitagraser I may have found the issue.

@elpaso elpaso closed this as completed Jun 7, 2019
@anitagraser
Copy link
Member

anitagraser commented Jun 7, 2019

I'm afraid there's still the same crash as shown in the GIF above in QGIS code revision: 4662bb9

@elpaso
Copy link
Contributor

elpaso commented Jun 9, 2019

@anitagraser thanks for checking, the a.m. revision does not contain the patch: I'm working on the forward porting to master now and adding a test for it.

elpaso added a commit to elpaso/QGIS that referenced this issue Jun 9, 2019
Fwd port of PR qgis#30033
Fixes qgis#29700

With a new test for the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption High Priority Rasters Related to general raster layer handling (not specific data formats)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants