[Digikam-devel] [Bug 285849] digikam crashes when resizing the crop area
Rudolf Leitgeb
Rudolf.Leitgeb at gmx.at
Mon Nov 21 07:57:19 GMT 2011
https://bugs.kde.org/show_bug.cgi?id=285849
--- Comment #6 from Rudolf Leitgeb <Rudolf Leitgeb gmx at> 2011-11-21 07:57:19 ---
Since the bug reported by me seems to be a NULL pointer dereference, valgrind
may not be the tool of choice. Looking at the offending code in
core/libs/dimg/filters/levels/histogramwidget.cpp you see some risky logic
before finally a pointer is dereferenced.
I replaced the original code:
currentHistogram()->calculateInThread();
with the snippet:
ImageHistogram* Histogram = currentHistogram();
if (Histogram == NULL) {
qDebug("Triggered histogram crash!");
qDebug("Dumping class state:");
// Current selection information.
HistogramPainter* histogramPainter;
qDebug("sixteenBits: %1d", d->sixteenBits);
qDebug("guideVisible: %1d", d->guideVisible);
qDebug("statisticsVisible: %1d", d->statisticsVisible);
qDebug("inSelected: %1d", d->inSelected);
qDebug("selectMode: %1d", d->selectMode);
qDebug("showProgress: %1d", d->showProgress);
qDebug("renderingType: %d", d->renderingType);
qDebug("range: %d", d->range);
qDebug("state: %d", (int)(d->state));
qDebug("channelType: %d", (int)(d->channelType));
qDebug("scaleType: %d", (int)(d->scaleType));
qDebug("imageHistogram: %p", d->imageHistogram);
qDebug("selectionHistogram: %p", d->selectionHistogram);
qDebug("xmin: %f", d->xmin);
qDebug("xminOrg: %f", d->xminOrg);
qDebug("xmax: %f", d->xmax);
qDebug("animationState: %d", d->animationState);
qDebug("animation: %p", d->animation);
qDebug("histogramPainter: %p", d->histogramPainter);
qDebug("arguments:");
qDebug("i_idata: %p, i_w: %ud, i_h: %ud", i_data, i_w, i_h);
qDebug("i_sixteenBits: %1d", i_sixteenBits);
qDebug("s_idata: %p, s_w: %ud, s_h: %ud", s_data, s_w, s_h);
qDebug("showProgress: %1d", showProgress);
} else {
currentHistogram()->calculateInThread();
}
If the bug triggers, I'll (should) get a full dump of the status of the object.
In a short editing session it has not triggered yet but I expect that to happen
sooner or later. Please let me know in advance if you would like to see other
variables or states in this dump, too.
Cheers,
Rudi
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Digikam-devel
mailing list