Bug 356156 - Krita crashes when resizing big image to mini by big factor (e.g. 320)
Summary: Krita crashes when resizing big image to mini by big factor (e.g. 320)
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (other bugs)
Version First Reported In: git master (please specify the git hash!)
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-01 12:35 UTC by Friedrich W. H. Kossebau
Modified: 2015-12-07 13:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Friedrich W. H. Kossebau 2015-12-01 12:35:09 UTC
See summary. It triggers a floating point exception.

Reproducible: Always

Steps to Reproduce:
1. Start Krita
2. Create big image (1600x1200)
3. Scale down image to size 5x4

Actual Results:  
Boom

Expected Results:  
No Boom. And small image :)

#0  0x00007ffff47ab174 in KisFixedPoint::operator/=(KisFixedPoint const&) (this=0x7fff98b59420, x=...)
    at /home/koder/Kode/kdegit/Calligra/krita/krita/image/kis_fixed_point_maths.h:110
#1  0x00007ffff47ac223 in boost::operator/(KisFixedPoint const&, KisFixedPoint const&) (lhs=..., rhs=...) at /usr/include/boost/operators.hpp:252
#2  0x00007ffff47ab4b2 in KisFilterWeightsBuffer::KisFilterWeightsBuffer(KisFilterStrategy*, double) (this=0x7fff98b596c0, filterStrategy=0x39698e0, realScale=0.0031250000000000002) at /home/koder/Kode/kdegit/Calligra/krita/krita/image/kis_filter_weights_buffer.h:185
#3  0x00007ffff47ac44b in KisTransformWorker::transformPass<KisSharedPtr<KisHLineIteratorNG> >(KisPaintDevice*, KisPaintDevice*, double, double, double, KisFilterStrategy*, int) (this=0x7fff98b59ad0, src=0x316c020, dst=0x316c020, floatscale=0.0031250000000000002, shear=0, dx=0, filterStrategy=0x39698e0, portion=50)
    at /home/koder/Kode/kdegit/Calligra/krita/krita/image/kis_transform_worker.cc:210
#4  0x00007ffff47a843f in KisTransformWorker::runPartial(QRect const&) (this=0x7fff98b59ad0, processRect=...)
    at /home/koder/Kode/kdegit/Calligra/krita/krita/image/kis_transform_worker.cc:356
#5  0x00007ffff47a769f in KisTransformWorker::run() (this=0x7fff98b59ad0) at /home/koder/Kode/kdegit/Calligra/krita/krita/image/kis_transform_worker.cc:237
#6  0x00007ffff467e744 in KisTransformProcessingVisitor::transformPaintDevice(KisSharedPtr<KisPaintDevice>, KisUndoAdapter*, KisProcessingVisitor::ProgressHelper const&) (this=0x7ee0440, device=..., adapter=0x7ee0720, helper=...) at /home/koder/Kode/kdegit/Calligra/krita/krita/image/processing/kis_transform_processing_visitor.cpp:185
#7  0x00007ffff467d636 in KisTransformProcessingVisitor::visit(KisPaintLayer*, KisUndoAdapter*) (this=0x7ee0440, layer=0x2b8c550, undoAdapter=0x7ee0720)
    at /home/koder/Kode/kdegit/Calligra/krita/krita/image/processing/kis_transform_processing_visitor.cpp:75
#8  0x00007ffff4776e1b in KisPaintLayer::accept(KisProcessingVisitor&, KisUndoAdapter*) (this=0x2b8c550, visitor=..., undoAdapter=0x7ee0720)
    at /home/koder/Kode/kdegit/Calligra/krita/krita/image/kis_paint_layer.cc:215
#9  0x00007ffff46788f5 in KisProcessingCommand::redo() (this=0x7ee06e0)
    at /home/koder/Kode/kdegit/Calligra/krita/krita/image/commands_new/kis_processing_command.cpp:35
#10 0x00007ffff46f3511 in KisStrokeStrategyUndoCommandBased::executeCommand(QSharedPointer<KUndo2Command>, bool) (this=0x4128f00, command=..., undo=false)
    at /home/koder/Kode/kdegit/Calligra/krita/krita/image/kis_stroke_strategy_undo_command_based.cpp:72
#11 0x00007ffff46f3a6f in KisStrokeStrategyUndoCommandBased::doStrokeCallback(KisStrokeJobData*) (this=0x4128f00, data=0x7ee0750)
    at /home/koder/Kode/kdegit/Calligra/krita/krita/image/kis_stroke_strategy_undo_command_based.cpp:117
#12 0x00007ffff46f4d06 in SimpleStrokeJobStrategy::run(KisStrokeJobData*) (this=0x4b6d020, data=0x7ee0750)
    at /home/koder/Kode/kdegit/Calligra/krita/krita/image/kis_simple_stroke_strategy.cpp:51
#13 0x00007ffff46fa212 in KisStrokeJob::run() (this=0x88b1110) at /home/koder/Kode/kdegit/Calligra/krita/krita/image/kis_stroke_job.h:44
#14 0x00007ffff485f088 in KisUpdateJobItem::run() (this=0x66ed110)
    at /home/koder/Kode/kdegit/Calligra/build.debug/krita/krita/image/../../../../krita/krita/image/kis_update_job_item.h:61
Comment 1 Halla Rempt 2015-12-01 17:27:16 UTC
Er, 1600x1200 isn't big :-). But I can confirm the issue, and I get the same stacktrace.
Comment 2 Halla Rempt 2015-12-07 13:54:51 UTC
Git commit 5a8ec77ea843f52b7e68238d2e4c095a62a03eea by Boudewijn Rempt.
Committed on 07/12/2015 at 13:54.
Pushed by rempt into branch 'calligra/2.9'.

M  +4    -0    krita/image/kis_filter_weights_buffer.h
M  +1    -0    krita/image/kis_fixed_point_maths.h

http://commits.kde.org/calligra/5a8ec77ea843f52b7e68238d2e4c095a62a03eea