[kwin] [Bug 483681] Crash in KWin::ScreenCastStream::onStreamAddBuffer()

2024-05-15 Thread Vlad Zahorodnii
https://bugs.kde.org/show_bug.cgi?id=483681

Vlad Zahorodnii  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|REPORTED|RESOLVED
  Latest Commit||https://invent.kde.org/plas
   ||ma/kwin/-/commit/4ebb21e8c3
   ||f259c552df2f1d693988fb564ba
   ||74a

--- Comment #8 from Vlad Zahorodnii  ---
Added a guard in master. The same guard already exists in Plasma/6.0 and it
seems like it has "fixed" the crash

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

[kwin] [Bug 483681] Crash in KWin::ScreenCastStream::onStreamAddBuffer()

2024-05-14 Thread David Edmundson
https://bugs.kde.org/show_bug.cgi?id=483681

David Edmundson  changed:

   What|Removed |Added

  Component|general |screencasting

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

[kwin] [Bug 483681] Crash in KWin::ScreenCastStream::onStreamAddBuffer()

2024-05-08 Thread Jakob Petsovits
https://bugs.kde.org/show_bug.cgi?id=483681

--- Comment #7 from Jakob Petsovits  ---
Maybe one more.

(gdb) frame 6
#6  0x7165f7f2ce85 in KWin::DmaBufScreenCastBuffer::create
(pwBuffer=0x64d609f57e10, options=...) at
/home/kpetso/src/kde/plasma/kwin/src/plugins/screencast/screencastbuffer.cpp:68
68  Q_ASSERT(pwBuffer->buffer->n_datas >= uint(attrs->planeCount));
(gdb) print *attrs
$11 = {planeCount = 2, width = 800, height = 1021, format = 875713089, modifier
= 72057594037927940, fd = {_M_elems = {{m_fd = 274}, {m_fd = 276}, {m_fd = -1},
{m_fd = -1}}}, offset = {_M_elems = {0, 3276800, 0, 0}}, pitch = {_M_elems =
{3200, 128, 0, 0}}}

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

[kwin] [Bug 483681] Crash in KWin::ScreenCastStream::onStreamAddBuffer()

2024-05-08 Thread Jakob Petsovits
https://bugs.kde.org/show_bug.cgi?id=483681

--- Comment #6 from Jakob Petsovits  ---
I hit this again. The code changed a bit since last time, but the assertion and
n_datas vs. planeCount values are similar. Let's add some extra info from my
new stack trace.

(gdb) bt
#0  0x716603aab32c in ??? () at /usr/lib/libc.so.6
#1  0x716603a5a6c8 in raise () at /usr/lib/libc.so.6
#2  0x716603a424b8 in abort () at /usr/lib/libc.so.6
#3  0x71660408c6ac in ??? () at /usr/lib/libQt6Core.so.6
#4  0x71660408cebd in QMessageLogger::fatal(char const*, ...) const () at
/usr/lib/libQt6Core.so.6
#5  0x71660408cf1a in qt_assert(char const*, char const*, int) () at
/usr/lib/libQt6Core.so.6
#6  0x7165f7f2ce85 in KWin::DmaBufScreenCastBuffer::create
(pwBuffer=0x64d609f57e10, options=...) at
/home/kpetso/src/kde/plasma/kwin/src/plugins/screencast/screencastbuffer.cpp:68
#7  0x7165f7f38496 in KWin::ScreenCastStream::onStreamAddBuffer
(this=0x64d6086b5d00, pwBuffer=0x64d609f57e10) at
/home/kpetso/src/kde/plasma/kwin/src/plugins/screencast/screencaststream.cpp:218
#8  0x7165f7f38641 in operator() (__closure=0x0, data=0x64d6086b5d00,
buffer=0x64d609f57e10) at
/home/kpetso/src/kde/plasma/kwin/src/plugins/screencast/screencaststream.cpp:262
#9  0x7165f7f38669 in _FUN () at
/home/kpetso/src/kde/plasma/kwin/src/plugins/screencast/screencaststream.cpp:263
#10 0x7165f5ba146b in impl_port_use_buffers (object=0x64d609f579d0,
direction=, port_id=, flags=,
buffers=, n_buffers=) at
../pipewire/src/pipewire/stream.c:1023
#11 0x7165f5b98f5b in negotiate_mixer_buffers (n_buffers=3,
buffers=0x7ffde3c4fba0, flags=, port=0x64d609d79c90) at
../pipewire/src/pipewire/impl-port.c:1818
#12 pw_impl_port_use_buffers (port=0x64d609d79c90,
mix=mix@entry=0x64d60a2fba58, flags=flags@entry=1,
buffers=buffers@entry=0x7ffde3c4fba0, n_buffers=n_buffers@entry=3) at
../pipewire/src/pipewire/impl-port.c:1860
#13 0x7165f5b138e6 in client_node_port_use_buffers (_data=,
direction=, port_id=, mix_id=,
flags=, n_buffers=, buffers=) at
../pipewire/src/modules/module-client-node/remote-node.c:719
#14 0x7165f5b22bc7 in client_node_demarshal_port_use_buffers
(data=, msg=) at
../pipewire/src/modules/module-client-node/protocol-native.c:572
#15 0x7165f7ebc162 in process_remote (impl=impl@entry=0x64d6086aaf90) at
../pipewire/src/modules/module-protocol-native.c:1037
#16 0x7165f7ebc940 in on_remote_data (data=0x64d6086aaf90, fd=51, mask=1)
at ../pipewire/src/modules/module-protocol-native.c:1071
#17 0x7165f7efc646 in loop_iterate (object=0x64d6088f0a88,
timeout=) at ../pipewire/spa/plugins/support/loop.c:496
#18 0x7165f7f27412 in operator() (__closure=0x64d6086f19e0) at
/home/kpetso/src/kde/plasma/kwin/src/plugins/screencast/pipewirecore.cpp:67
#19 0x7165f7f281b7 in QtPrivate::FunctorCall,
QtPrivate::List<>, void, KWin::PipeWireCore::init():: >::call(struct
{...} &, void **) (f=..., arg=0x7ffde3c50590) at
/usr/include/qt6/QtCore/qobjectdefs_impl.h:137
#20 0x7165f7f28189 in
QtPrivate::FunctorCallable
>::call, void>(struct {...} &, void *, void **) (f=...,
arg=0x7ffde3c50590) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:345
#21 0x7165f7f28140 in
QtPrivate::QCallableObject,
QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *,
void **, bool *) (which=1, this_=0x64d6086f19d0, r=0x64d6086c1c80,
a=0x7ffde3c50590, ret=0x0) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:555
#22 0x716604197679 in ??? () at /usr/lib/libQt6Core.so.6
#23 0x7166041a05ea in QSocketNotifier::event(QEvent*) () at
/usr/lib/libQt6Core.so.6
#24 0x7166052fbfcb in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /usr/lib/libQt6Widgets.so.6
#25 0x71660413db38 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /usr/lib/libQt6Core.so.6
#26 0x7166042ac689 in
QEventDispatcherUNIXPrivate::activateSocketNotifiers() () at
/usr/lib/libQt6Core.so.6
#27 0x7166042b262b in
QEventDispatcherUNIX::processEvents(QFlags) ()
at /usr/lib/libQt6Core.so.6
#28 0x716604bc1472 in
QUnixEventDispatcherQPA::processEvents(QFlags)
() at /usr/lib/libQt6Gui.so.6
#29 0x716604145cce in
QEventLoop::exec(QFlags) () at
/usr/lib/libQt6Core.so.6
#30 0x716604141738 in QCoreApplication::exec() () at
/usr/lib/libQt6Core.so.6
#31 0x64d606484830 in main (argc=14, argv=0x7ffde3c50f78) at
/home/kpetso/src/kde/plasma/kwin/src/main_wayland.cpp:634

(gdb) frame 6
#6  0x7165f7f2ce85 in KWin::DmaBufScreenCastBuffer::create
(pwBuffer=0x64d609f57e10, options=...) at
/home/kpetso/src/kde/plasma/kwin/src/plugins/screencast/screencastbuffer.cpp:68
68  Q_ASSERT(pwBuffer->buffer->n_datas >= uint(attrs->planeCount));
(gdb) print pwBuffer->buffer->n_datas
$1 = 1
(gdb) print attrs->planeCount
$2 = 2

So far, so similar. I'm noticing that the pipewire code locations are also
included this time (Arch package: pipewire 1:1.0.5-1).

Pressing on.

(gdb) print *pwBuffer
$3 = {buffer = 0x64d609e0d730, 

[kwin] [Bug 483681] Crash in KWin::ScreenCastStream::onStreamAddBuffer()

2024-04-08 Thread Vlad Zahorodnii
https://bugs.kde.org/show_bug.cgi?id=483681

--- Comment #5 from Vlad Zahorodnii  ---
Git commit 81ef5d3500f14c2eb1d39973f0a59bf8da3dd7dc by Vlad Zahorodnii.
Committed on 08/04/2024 at 10:39.
Pushed by vladz into branch 'Plasma/6.0'.

plugins/screencast: Add a n_datas guard

There's a crash in the onStreamAddBuffer() function. It's not totally
clear why the crash happens when accessing `chunk`.

This MR is a blind attempt to confirm that the crash is caused by wrong
n_datas value.

M  +16   -13   src/plugins/screencast/screencaststream.cpp

https://invent.kde.org/plasma/kwin/-/commit/81ef5d3500f14c2eb1d39973f0a59bf8da3dd7dc

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

[kwin] [Bug 483681] Crash in KWin::ScreenCastStream::onStreamAddBuffer()

2024-04-08 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=483681

--- Comment #4 from Nate Graham  ---
https://crash-reports.kde.org/organizations/kde/issues/5810/?project=12

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

[kwin] [Bug 483681] Crash in KWin::ScreenCastStream::onStreamAddBuffer()

2024-04-08 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=483681

Nate Graham  changed:

   What|Removed |Added

   Severity|normal  |crash
 CC||n...@kde.org

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

[kwin] [Bug 483681] Crash in KWin::ScreenCastStream::onStreamAddBuffer()

2024-04-08 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=483681

--- Comment #3 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/plasma/kwin/-/merge_requests/5578

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

[kwin] [Bug 483681] Crash in KWin::ScreenCastStream::onStreamAddBuffer()

2024-04-08 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=483681

--- Comment #2 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/plasma/kwin/-/merge_requests/5577

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

[kwin] [Bug 483681] Crash in KWin::ScreenCastStream::onStreamAddBuffer()

2024-03-17 Thread Dashon
https://bugs.kde.org/show_bug.cgi?id=483681

Dashon  changed:

   What|Removed |Added

 CC||dashonww...@pm.me

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

[kwin] [Bug 483681] Crash in KWin::ScreenCastStream::onStreamAddBuffer()

2024-03-15 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=483681

Bug Janitor Service  changed:

   What|Removed |Added

   Keywords||qt6

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

[kwin] [Bug 483681] Crash in KWin::ScreenCastStream::onStreamAddBuffer()

2024-03-15 Thread Jakob Petsovits
https://bugs.kde.org/show_bug.cgi?id=483681

--- Comment #1 from Jakob Petsovits  ---
Actually I'll leave out the other threads because they're all just waiting for
condition variables, polling, and such. Nothing that seems directly related on
first glance. It seems I have access to some actual heap data too though:

(gdb) frame 9
#9  0x716c1ffd0e3b in KWin::ScreenCastStream::onStreamAddBuffer
(this=0x5b0c07708e80, buffer=0x5b0c07b7c3b8) at
/home/kpetso/src/kde/plasma/kwin/src/plugins/screencast/screencaststream.cpp:234
234 Q_ASSERT(buffer->buffer->n_datas >=
uint(dmabufAttribs->planeCount));
(gdb) print buffer->buffer->n_datas
$1 = 1
(gdb) print dmabufAttribs->planeCount
$2 = 2

Let me know if you're interested in any other data!

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