Bug 494067 - Crash in openCV with vertically-rotated 1440p secondary screen left of a 4k screen at 225% scale
Summary: Crash in openCV with vertically-rotated 1440p secondary screen left of a 4k s...
Status: RESOLVED DUPLICATE of bug 503682
Alias: None
Product: Spectacle
Classification: Applications
Component: General (other bugs)
Version First Reported In: git-master
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
: 496507 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-10-03 20:54 UTC by Nate Graham
Modified: 2025-05-23 10:53 UTC (History)
2 users (show)

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


Attachments
Screen arrangement photo (because Spectacle is broken lol) (324.87 KB, image/jpeg)
2024-10-03 20:54 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2024-10-03 20:54:36 UTC
Created attachment 174383 [details]
Screen arrangement photo (because Spectacle is broken lol)

Everything KDE from git master on top of Fedora 40 KDE. Qt 6.7.2, Kernel 6.10.11. 10th gen Intel HD630 iGPU.


STEPS TO REPRODUCE
1. Have a 4K screen. Make it primary and set it to 225% scale.
2. Have a 1440p screen. Make it secondary and rotate it so it's vertical (any vertical orientation). Scale factor does not matter.
3. Launch Spectacle
4. Click "Rectangular Region"


OBSERVED RESULT
Spectacle crashes 100% of the time with this exact backtrace:

#0  __pthread_kill_implementation
    (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007fb6c7ca86d3 in __pthread_kill_internal (threadid=<optimized out>, signo=6)
    at pthread_kill.c:78
#2  0x00007fb6c7c4fc4e in __GI_raise (sig=6) at ../sysdeps/posix/raise.c:26
#3  0x00007fb6cc9e35ab in KCrash::defaultCrashHandler (sig=6)
    at /home/nate/kde/src/kcrash/src/kcrash.cpp:596
#4  0x00007fb6c7c4fd00 in <signal handler called> () at /lib64/libc.so.6
#5  __pthread_kill_implementation
    (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#6  0x00007fb6c7ca86d3 in __pthread_kill_internal (threadid=<optimized out>, signo=6)
    at pthread_kill.c:78
#7  0x00007fb6c7c4fc4e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#8  0x00007fb6c7c37902 in __GI_abort () at abort.c:79
#9  0x00007fb6c7ea5da9 in __gnu_cxx::__verbose_terminate_handler ()
    at ../../../../libstdc++-v3/libsupc++/vterminate.cc:95
#10 0x00007fb6c7eb7c4c in __cxxabiv1::__terminate (handler=<optimized out>)
    at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:48
#11 0x00007fb6c7ea5951 in std::terminate () at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:58
#12 0x00007fb6c7eb7ed8 in __cxxabiv1::__cxa_throw
    (obj=<optimized out>, tinfo=0x7fb6c979e520 <typeinfo for cv::Exception>, dest=0x7fb6c9657dc0 <cv::Exception::~Exception()>) at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:98
#13 0x00007fb6c945f595 in cv::error (exc=...)
    at /usr/src/debug/opencv-4.9.0-3.fc40.x86_64/modules/core/src/system.cpp:1307
#14 0x00007fb6c965a2d5 in cv::error
    (_code=_code@entry=-215, _err="0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows", _func=_func@entry=0x7fb6c971420d "Mat", _file=_file@entry=0x7fb6c96d4b50 "/builddir/build/BUILD/opencv-4.9.0/modules/core/src/matrix.cpp", _line=_line@entry=808) at /usr/src/debug/opencv-4.9.0-3.fc40.x86_64/modules/core/src/system.cpp:1319
#15 0x00007fb6c95624aa in cv::Mat::Mat (this=this@entry=0x7ffd95925570, m=..., roi=...)
    at /usr/src/debug/opencv-4.9.0-3.fc40.x86_64/modules/core/src/matrix.cpp:808
#16 0x00000000004ba5ca in cv::Mat::operator() (this=0x7ffd959254b0, roi=...)
    at /usr/include/opencv4/opencv2/core/mat.inl.hpp:639
#17 combinedImage (images=...)
    at /home/nate/kde/src/spectacle/src/Platforms/ImagePlatformKWin.cpp:123
#18 0x00000000004ce023 in ImagePlatformKWin::trackSource<void (ImagePlatform::*)(QImage const&)>(ScreenShotSourceMeta2*, void (ImagePlatform::*)(QImage const&))::{lambda(QList<ResultVariant> const&)#1}::operator()(QList<ResultVariant> const&) const (__closure=0x2d5f7160, results=<optimized out>)
    at /home/nate/kde/src/spectacle/src/Platforms/ImagePlatformKWin.cpp:488
#19 0x00007fb6c83fc8f2 in QtPrivate::QSlotObjectBase::call
    (this=0x2d5f7150, r=<optimized out>, a=0x7ffd95925810)
    at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/kernel/qobjectdefs_impl.h:469
#20 doActivate<false> (sender=0x2d5d97d0, signal_index=3, argv=0x7ffd95925810)
    at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/kernel/qobject.cpp:4086
#21 0x00007fb6c83f2bc7 in QMetaObject::activate
    (sender=<optimized out>, m=m@entry=0x55b4e0 <ScreenShotSourceMeta2::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffd95925810)
    at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/kernel/qobject.cpp:4146
#22 0x00000000004bbd6c in ScreenShotSourceMeta2::finished (this=<optimized out>, _t1=<optimized out>)
    at /home/nate/kde/build/spectacle/src/spectacle_autogen/include/moc_ImagePlatformKWin.cpp:699
#23 operator() (__closure=0x2d38bc40, result=<optimized out>)
    at /home/nate/kde/src/spectacle/src/Platforms/ImagePlatformKWin.cpp:362
#24 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<const ResultVariant&>, void, ScreenShotSourceMeta2::ScreenShotSourceMeta2(QVector<ScreenShotSource2*>&)::<lambda(const ResultVariant&)> >::call (f=..., arg=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:137
#25 QtPrivate::FunctorCallable<ScreenShotSourceMeta2::ScreenShotSourceMeta2(QVector<ScreenShotSource2*>&)::<lambda(const ResultVariant&)>, const ResultVariant&>::call<QtPrivate::List<ResultVariant const&>, void> (f=..., arg=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:345
#26 QtPrivate::QCallableObject<ScreenShotSourceMeta2::ScreenShotSourceMeta2(QVector<ScreenShotSource2*>&)::<lambda(const ResultVariant&)>, QtPrivate::List<const ResultVariant&>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *)
    (which=<optimized out>, this_=0x2d38bc30, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:555
#27 0x00007fb6c83eddcb in QObject::event (this=0x2d5d97d0, e=0x7fb62c0019c0)
    at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/kernel/qobject.cpp:1452
#28 0x00007fb6ca58b218 in QApplicationPrivate::notify_helper
    (this=<optimized out>, receiver=0x2d5d97d0, e=0x7fb62c0019c0)
    at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/widgets/kernel/qapplication.cpp:3287
#29 0x00007fb6c8396e88 in QCoreApplication::notifyInternal2
    (receiver=0x2d5d97d0, event=0x7fb62c0019c0)
    at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1142
#30 0x00007fb6c83970ed in QCoreApplication::sendEvent
    (receiver=<optimized out>, event=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1583
#31 0x00007fb6c839ac51 in QCoreApplicationPrivate::sendPostedEvents
    (receiver=0x0, event_type=0, data=0x2ce08a30)
    at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1940
#32 0x00007fb6c839aefd in QCoreApplication::sendPostedEvents
    (receiver=<optimized out>, event_type=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/kernel/qcoreapplication.cpp:1797
#33 0x00007fb6c86859ef in postEventSourceDispatch (s=0x2cec8080)
    at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:244
#34 0x00007fb6c550ee8c in g_main_dispatch (context=0x7fb6a0000f00) at ../glib/gmain.c:3344
#35 g_main_context_dispatch_unlocked (context=0x7fb6a0000f00) at ../glib/gmain.c:4152
#36 0x00007fb6c5570c98 in g_main_context_iterate_unlocked.isra.0
    (context=context@entry=0x7fb6a0000f00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4217
#37 0x00007fb6c5510383 in g_main_context_iteration (context=0x7fb6a0000f00, may_block=1)
    at ../glib/gmain.c:4282
#38 0x00007fb6c86851a3 in QEventDispatcherGlib::processEvents (this=0x2cdd97d0, flags=...)
    at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#39 0x00007fb6c83a3bc3 in QEventLoop::exec (this=this@entry=0x7ffd95925cb0, flags=..., 
    flags@entry=...) at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/global/qflags.h:34
#40 0x00007fb6c839fa7c in QCoreApplication::exec ()
    at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/global/qflags.h:74
#41 0x00007fb6c99d66ed in QGuiApplication::exec ()
    at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/gui/kernel/qguiapplication.cpp:1926
#42 0x00007fb6ca58b189 in QApplication::exec ()
    at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/widgets/kernel/qapplication.cpp:2555
#43 0x0000000000436e68 in main (argc=<optimized out>, argv=<optimized out>)
    at /home/nate/kde/src/spectacle/src/Main.cpp:136


ADDITIONAL INFORMATION
Does not happen if I lower the primary screen's scale factor to 200% or less.

Does not happen if the vertical screen is to the right of the primary screen.
Comment 1 Noah Davis 2024-10-04 09:45:50 UTC
Unfortunately, I cannot reproduce this. Here's what I tried to do:
1. Make my 4k screen on the right 225% scale and make it primary.
2. Use a counter-clockwise 90 degree rotation for my FHD laptop screen on the left
3. Run `spectacle -ir`, Meta+Shift+PrintScreen and click Rectangular Region in the GUI to try the 3 main ways of activating a rectangle capture.

I see you put 23.04.1 as the Spectacle version. Is that a mistake?
Comment 2 Noah Davis 2024-10-04 09:47:55 UTC
I see you have OpenCV 4.9.0. I have OpenCV 4.10.0.
Comment 3 Nate Graham 2024-10-04 15:39:14 UTC
That was a mistake, yeah. It's git master. I'll test again once I get OpenCV 4.10.0.
Comment 4 Nate Graham 2025-02-22 18:10:51 UTC
I have OpenCV 4.10.0 now and can no longer reproduce it. I guess it was an upstream issue!
Comment 5 Nate Graham 2025-03-07 14:48:07 UTC
*** Bug 496507 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2025-03-07 14:48:44 UTC
New report in Bug 496507 where the user has OpenCV 4.10.0; re-opening.
Comment 7 Noah Davis 2025-05-23 10:53:34 UTC

*** This bug has been marked as a duplicate of bug 503682 ***