[gwenview] [Bug 481140] Gwenview crashes when cropping image

2025-05-02 Thread Pedro
https://bugs.kde.org/show_bug.cgi?id=481140

Pedro  changed:

   What|Removed |Added

  Latest Commit||https://invent.kde.org/grap
   ||hics/gwenview/-/commit/ee17
   ||9a5de052a2e0502285ff53a4255
   ||c5c9dd094
 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #16 from Pedro  ---
Git commit ee179a5de052a2e0502285ff53a4255c5c9dd094 by Pedro Hernandez.
Committed on 02/05/2025 at 02:48.
Pushed by merritt into branch 'master'.

Fix crash when crop area is smaller than handles

The crash occurs due to a failed assertion in `qBound()` that tests
`Q_ASSERT(!(max < min))`. This happens when computing the position
of the crop area middle handles (top center, bottom center, left
 center, right center) and they overlap with the corner handles.

The fix proposed is to check if there is enough room within the
respective axis (width or height) for a middle handle to be
repositioned when the crop area is not completely inside the
viewport. This preserves the existing functionality added in
commits `307816e2819f` and `e61ce1e2886c6`.

M  +10   -4lib/crop/croptool.cpp

https://invent.kde.org/graphics/gwenview/-/commit/ee179a5de052a2e0502285ff53a4255c5c9dd094

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2025-04-15 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=481140

--- Comment #15 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/graphics/gwenview/-/merge_requests/330

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2025-03-28 Thread Pedro
https://bugs.kde.org/show_bug.cgi?id=481140

Pedro  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #14 from Pedro  ---
*** Bug 499485 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2025-03-25 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=481140

Bug Janitor Service  changed:

   What|Removed |Added

 Status|CONFIRMED   |ASSIGNED

--- Comment #13 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/graphics/gwenview/-/merge_requests/329

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2025-03-11 Thread Pedro
https://bugs.kde.org/show_bug.cgi?id=481140

Pedro  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #12 from Pedro  ---
Created attachment 179328
  --> https://bugs.kde.org/attachment.cgi?id=179328&action=edit
Gimp. Crop tool handles when area is small.

The crash occurs when computing the position of the crop handles (the small
squares used to control the area to crop). When the area is small for the crop
handles, we'll see that assertion is not met because there is an overlap.
At first glance, I think this is a simple problem that might get tricky because
we need first to define what would be the behavior when the handles don't fit,
and after that we could determine the amount of work required. For instance,
currently, the size of the handles is fixed, 15 pixels and I looked at Gimp to
see how it handles this problem. What I found is that the handles are adaptive.
They have a default size that might change depending on the current zoom value
and the current crop area. They also move outside the crop area when there is
not enough room for all of them. We might try this approach but I think right
now Gwenview doesn't have some sort of padding for the images in case the
handles move outside the crop area.

More research is required. I'll try to give it a shot but we need to define
what will be the behavior of the crop handles.

I attached an image displaying an example in Gimp.

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2025-01-27 Thread TraceyC
https://bugs.kde.org/show_bug.cgi?id=481140

TraceyC  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #11 from TraceyC  ---
*** Bug 499002 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2024-12-01 Thread Malte S. Stretz
https://bugs.kde.org/show_bug.cgi?id=481140

Malte S. Stretz  changed:

   What|Removed |Added

 Status|REPORTED|CONFIRMED
 Ever confirmed|0   |1

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2024-12-01 Thread Malte S. Stretz
https://bugs.kde.org/show_bug.cgi?id=481140

Malte S. Stretz  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #10 from Malte S. Stretz  ---
Created attachment 176271
  --> https://bugs.kde.org/attachment.cgi?id=176271&action=edit
A nice picture to reproduce the issue with

I can reproduce this issue (Gwenview 24.08.3) with the attached image and when
I try to set width or height to a one-digit value.

Operating System: KDE neon 6.2
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.8.0-49-generic (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-6300U CPU @ 2.40GHz
Memory: 7,6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 520
Manufacturer: LENOVO
Product Name: 20F5S1H800
System Version: ThinkPad X260

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2024-08-31 Thread Oded Arbel
https://bugs.kde.org/show_bug.cgi?id=481140

--- Comment #9 from Oded Arbel  ---
(In reply to fin-w from comment #7)
> @Oded, what about you?

Yep, still happens on Neon unstable - running gwenview
4:24.08.0+p24.04+vstable+git20240822.0503-0 -- with the repro I posted in
comment #5.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 6.1.80
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.8.0-41-generic (64-bit)
Graphics Platform: Wayland
Processors: 20 × 12th Gen Intel® Core™ i7-12700H
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa Intel® Graphics

Stack trace:

... crash handling stuff trimmed ...
#9  0x75c1862c7a23 in qt_assert (assertion=assertion@entry=0x75c188991e07
"!(max < min)", file=file@entry=0x75c18898e510
"/usr/include/x86_64-linux-gnu/qt6/QtCore/qminmax.h", line=line@entry=46)
at
/usr/src/qt6-base-6.7.2-0zneon+24.04+noble+unstable+build1/src/corelib/global/qassert.cpp:68
#10 0x75c188899a73 in qBound(int const&, int const&, int const&)
[clone .part.0] [clone .lto_priv.0] (max=, val=,
min=) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qminmax.h:46
#11 0x75c18889a627 in qBound (max=, val=, min=) at
/usr/src/gwenview-4:24.08.0+p24.04+vstable+git20240822.0503-0/lib/document/document.cpp:397
#12 Gwenview::CropToolPrivate::handleViewportRect (this=0x5fcb98ffbbd0,
handle=...) at
/usr/src/gwenview-4:24.08.0+p24.04+vstable+git20240822.0503-0/lib/crop/croptool.cpp:101
#13 0x75c1888b6751 in Gwenview::CropTool::paint (this=0x5fcb9af913d0,
painter=0x7ffd5cabe970) at
/usr/src/gwenview-4:24.08.0+p24.04+vstable+git20240822.0503-0/lib/crop/croptool.cpp:277
... internal Qt event dispatching ...

I can attach the full stack trace, if you want, or any other relevant stuff -
including building patched versions.

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2024-08-30 Thread Greg Lepore
https://bugs.kde.org/show_bug.cgi?id=481140

--- Comment #8 from Greg Lepore  ---
Yes, I am still seeing this bug.

QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setOpacity: Painter not active
QPainter::end: Painter not active, aborted
qt.qpa.wayland: eglSwapBuffers failed with 0x300d, surface: 0x0
ASSERT: "!(max < min)" in file
/usr/include/x86_64-linux-gnu/qt6/QtCore/qminmax.h, line 46
Aborted (core dumped)


Operating System: KDE neon 6.0
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.8.0-40-generic (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 2600 Six-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NV168

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2024-08-30 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=481140

--- Comment #7 from [email protected] ---
@Oded, what about you?

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2024-08-30 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=481140

[email protected] changed:

   What|Removed |Added

 Ever confirmed|1   |0
 Status|CONFIRMED   |REPORTED

--- Comment #6 from [email protected] ---
This still seems fixed for me. @Greg, are you still having problems? What
system / versions are you using?

For me:
SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × 12th Gen Intel® Core™ i5-1240P
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: LENOVO
System Version: ThinkPad T14s Gen 3

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2024-07-29 Thread Oded Arbel
https://bugs.kde.org/show_bug.cgi?id=481140

Oded Arbel  changed:

   What|Removed |Added

 CC||[email protected]
Version|Other (add details in bug   |24.05.2
   |description)|

--- Comment #5 from Oded Arbel  ---
I believe I have the same issue. Gwenview 24.05.2 on Plasma 6.1.3. Steps:

1. Open an image with Gwenview (could be anything)
2. Hit SHIFT+C to start cropping, or choose from the menu.
3. Make sure "advanced settings" is checked in the crop tool.
4. In the Aspect Ratio field type "20:" (or any number 10 or larger)
5. Type "1"

Observed result:
Gwenview immediately closes.

When running from the terminal, the following text appears at the end of the
debug log:

ASSERT: "!(max < min)" in file
/usr/include/x86_64-linux-gnu/qt6/QtCore/qminmax.h, line 46
Aborted

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2024-03-15 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=481140

--- Comment #4 from [email protected] ---
Interesting... I just updated to Plasma 6.0.2 and the problem is still fixed
for me on Arch. I wonder if it's unique to KDE neon.

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2024-03-15 Thread Greg Lepore
https://bugs.kde.org/show_bug.cgi?id=481140

Greg Lepore  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #3 from Greg Lepore  ---
I'm seeing this on KDE Neon:

Operating System: KDE neon 6.0
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.5.0-25-generic (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 2600 Six-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NV168

Gwenview
Version 24.02.0

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2024-03-12 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=481140

[email protected] changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|REPORTED|CONFIRMED

--- Comment #2 from [email protected] ---
Reporting as confirmed because of the duplicate bug.

I can't check on Neon any more, but for me, this issue is fixed in Gwenview
24.02.0 on this machine:

Operating System: Arch Linux 
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.9-arch1-1 (64-bit)
Graphics Platform: Wayland

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2024-03-11 Thread popov895
https://bugs.kde.org/show_bug.cgi?id=481140

popov895  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #1 from popov895  ---
*** Bug 482269 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2024-02-09 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=481140

Bug Janitor Service  changed:

   What|Removed |Added

   Keywords||qt6

-- 
You are receiving this mail because:
You are watching all bug changes.

[gwenview] [Bug 481140] Gwenview crashes when cropping image

2024-02-09 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=481140

Bug Janitor Service  changed:

   What|Removed |Added

   Severity|normal  |crash

-- 
You are receiving this mail because:
You are watching all bug changes.