| Summary: | Crash when clicking on an empty layer with the lazy brush tool | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | Halla Rempt <halla> |
| Component: | General | Assignee: | Krita Bugs <krita-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | Keywords: | drkonqi |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/krita/f352cc1d4367542ad55d61636927e90c56e92b7d | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
Halla Rempt
2017-12-27 13:31:15 UTC
Fixed by now. Git commit f352cc1d4367542ad55d61636927e90c56e92b7d by Dmitry Kazakov. Committed on 04/01/2018 at 17:20. Pushed by dkazakov into branch 'master'. Refactor KisSequentialIterator to use java-style iteration This patch touches quite a lot of stuff throughout the entire Krita, please report any crashes you get because of that! Technical details: The sequential iterator (alongside the hline and vline) iterators had an inherent problem: when called with an empty rect it just crashed with SIGSEGV (hlive and vline iterators just have a hack to read/write at least one pixel when called with an empty rect). This problem happens because of the structure of API we use: we call nextPixel() **after** the first cycle of iteration, that is we will read/write at least one pixel even when the requested rect is empty(!). Now the iterator inserts one "virtual" pixel before every iteration that allows the user to call nextPixel() **before** the the first iteration and stop the cycle in case the check fails. See example code snippets in kis_sequential_iterator.h CC:kimageshop@kde.org M +2 -2 benchmarks/kis_bcontrast_benchmark.cpp M +2 -2 benchmarks/kis_blur_benchmark.cpp M +2 -2 benchmarks/kis_level_filter_benchmark.cpp M +2 -2 libs/global/kis_acs_pixel_cache_renderer.h M +4 -4 libs/image/filter/kis_color_transformation_filter.cc M +6 -6 libs/image/kis_edge_detection_kernel.cpp M +2 -2 libs/image/kis_gradient_painter.cc M +2 -2 libs/image/kis_grid_interpolation_tools.h M +7 -5 libs/image/kis_histogram.cc M +4 -4 libs/image/kis_marker_painter.cpp M +6 -5 libs/image/kis_paint_device.cc M +8 -6 libs/image/kis_paint_device_data.h M +6 -6 libs/image/kis_painter.cc M +6 -6 libs/image/kis_pixel_selection.cpp M +65 -12 libs/image/kis_sequential_iterator.h M +4 -4 libs/image/krita_utils.cpp M +6 -6 libs/image/layerstyles/kis_layer_style_filter_environment.cpp M +4 -4 libs/image/layerstyles/kis_ls_bevel_emboss_filter.cpp M +4 -6 libs/image/layerstyles/kis_ls_satin_filter.cpp M +22 -22 libs/image/layerstyles/kis_ls_utils.cpp M +26 -24 libs/image/lazybrush/KisWatershedWorker.cpp M +6 -6 libs/image/lazybrush/kis_lazy_fill_tools.cpp M +2 -2 libs/image/lazybrush/kis_multiway_cut.cpp M +14 -14 libs/image/tests/kis_iterator_benchmark.cpp M +53 -8 libs/image/tests/kis_iterators_ng_test.cpp M +2 -2 libs/image/tests/kis_lazy_brush_test.cpp M +2 -2 libs/image/tests/kis_paint_device_test.cpp M +2 -2 libs/image/tests/kis_paint_layer_test.cpp M +4 -4 libs/image/tests/kis_painter_test.cpp M +2 -2 libs/image/tests/kis_projection_test.cpp M +18 -18 libs/libkis/Channel.cpp M +2 -2 libs/ui/canvas/kis_display_color_converter.cpp M +2 -2 libs/ui/flake/kis_shape_selection.cpp M +4 -4 libs/ui/kis_node_manager.cpp M +2 -2 libs/ui/kis_png_converter.cpp M +2 -2 libs/ui/tool/kis_tool_utils.cpp M +1 -1 plugins/dockers/channeldocker/channelmodel.cpp M +8 -6 plugins/dockers/histogram/histogramdockerwidget.cpp M +2 -2 plugins/filters/colors/kis_color_to_alpha.cpp M +4 -4 plugins/filters/colors/kis_minmax_filters.cpp M +6 -4 plugins/filters/colorsfilters/colorsfilters.cpp M +2 -2 plugins/filters/embossfilter/kis_emboss_filter.cpp M +2 -2 plugins/filters/fastcolortransfer/fastcolortransfer.cpp M +2 -2 plugins/filters/fastcolortransfer/kis_wdg_fastcolortransfer.cpp M +2 -2 plugins/filters/gradientmap/krita_filter_gradient_map.cpp M +2 -2 plugins/filters/noisefilter/noisefilter.cpp M +2 -2 plugins/filters/oilpaintfilter/kis_oilpaint_filter.cpp M +4 -4 plugins/filters/pixelizefilter/kis_pixelize_filter.cpp M +2 -2 plugins/filters/randompickfilter/randompickfilter.cpp M +2 -2 plugins/filters/threshold/threshold.cpp M +2 -2 plugins/filters/wavefilter/wavefilter.cpp M +2 -2 plugins/impex/csv/csv_saver.cpp M +2 -2 plugins/impex/heightmap/kis_heightmap_export.cpp M +2 -2 plugins/impex/psd/psd_pixel_utils.cpp M +2 -2 plugins/paintops/defaultpaintops/duplicate/kis_duplicateop.cpp M +2 -3 plugins/paintops/libpaintop/kis_bidirectional_mixing_option.cpp https://commits.kde.org/krita/f352cc1d4367542ad55d61636927e90c56e92b7d |