https://bugs.kde.org/show_bug.cgi?id=504622

            Bug ID: 504622
           Summary: krdc SIGSEGV when freerdp disconnects sometimes
    Classification: Applications
           Product: krdc
      Version First 25.04.1
       Reported In:
          Platform: Ubuntu
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: RDP
          Assignee: uwol...@kde.org
          Reporter: m...@papersolve.com
  Target Milestone: ---

SUMMARY
During normal usage of krdc+rdp, logging out or disconnecting, krdc works fine.
However sometimes due to protocol issues or whatnot, freerdp can get
disconnected in an unusual way, and this causes krdc to crash 90% of the time
(the other 10% it just gets disconnect, but krdc stays up, and the next time I
do it it crashes). 

STEPS TO REPRODUCE
1. hard to reproduce - i have a particular server using RDP encryption not TLS
(which seems to make it easier to crash, though I can't reproduce the crash in
xfreerdp or wlfreerdp) where I connect to it and move a window around a lot and
then it disconnects
2. rdp window disconnects and krdc goes back to regular screen but then crashes
split-second after (only observable because of running in gdb)
3. 

OBSERVED RESULT
krdc SIGSEGV

EXPECTED RESULT
just disconnection; if possible to enable freerdp +reconnect option that might
help; or perhaps upgrading to newer freerdp libraries

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Ubuntu 25.04 
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.3
krdc - compiled from git today

ADDITIONAL INFORMATION
Log and backtrace below
~  gdb /usr/bin/krdc                                                          
                                     Wed 21 May 2025 09:07:17 AM EDT
GNU gdb (Ubuntu 16.2-8ubuntu1) 16.2
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/krdc...
(gdb) start
Temporary breakpoint 1 at 0x5bc29: file /home/mike/krdc/main.cpp, line 26.
Starting program: /usr/bin/krdc 
Function(s) ^std::(move|forward|as_const|(__)?addressof) will be skipped when
stepping.
Function(s) ^std::(shared|unique)_ptr<.*>::(get|operator) will be skipped when
stepping.
Function(s)
^std::(basic_string|vector|array|deque|(forward_)?list|(unordered_|flat_)?(multi)?(map|set)|span)<.*>::(c?r?(begin|end)|front|back|data|size|empty)
will be skipped when stepping.
Function(s) ^std::(basic_string|vector|array|deque|span)<.*>::operator.] will
be skipped when stepping.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Temporary breakpoint 1, main (argc=1, argv=0x7fffffffd6a8) at
/home/mike/krdc/main.cpp:26
26      {
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/bin/krdc 
Function(s) ^std::(move|forward|as_const|(__)?addressof) will be skipped when
stepping.
Function(s) ^std::(shared|unique)_ptr<.*>::(get|operator) will be skipped when
stepping.
Function(s)
^std::(basic_string|vector|array|deque|(forward_)?list|(unordered_|flat_)?(multi)?(map|set)|span)<.*>::(c?r?(begin|end)|front|back|data|size|empty)
will be skipped when stepping.
Function(s) ^std::(basic_string|vector|array|deque|span)<.*>::operator.] will
be skipped when stepping.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffed7ff6c0 (LWP 1639034)]
[New Thread 0x7fffecffe6c0 (LWP 1639035)]
[New Thread 0x7fffe7fff6c0 (LWP 1639036)]
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::SystemPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::ToolButtonPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::ButtonPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::CheckBoxPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::RadioButtonPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::HeaderPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::ItemViewPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::MessageBoxLabelPelette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::TabBarPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::LabelPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::GroupBoxPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::MenuPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::MenuBarPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::TextEditPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::TextEditPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::TextLineEditPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::ToolTipPalette
virtual QVariant Qt6CTPlatformTheme::themeHint(QPlatformTheme::ThemeHint) const
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::SystemPalette
virtual const QPalette* Qt6CTPlatformTheme::palette(QPlatformTheme::Palette)
const QPlatformTheme::SystemPalette
[New Thread 0x7fffdffff6c0 (LWP 1639040)]
[New Thread 0x7fffdf7fe6c0 (LWP 1639041)]
[New Thread 0x7fffdeffd6c0 (LWP 1639042)]
[New Thread 0x7fffde7fc6c0 (LWP 1639043)]
virtual QVariant Qt6CTPlatformTheme::themeHint(QPlatformTheme::ThemeHint) const
KRDC: Starting RDP session
[New Thread 0x7fffc8ad96c0 (LWP 1639070)]
[New Thread 0x7fffc293f6c0 (LWP 1639071)]
[New Thread 0x7fffc213e6c0 (LWP 1639072)]
[New Thread 0x7fffc193d6c0 (LWP 1639073)]
[New Thread 0x7fffc113c6c0 (LWP 1639074)]
[New Thread 0x7fffc093b6c0 (LWP 1639075)]
[New Thread 0x7fffbbfff6c0 (LWP 1639077)]
[New Thread 0x7fffbb7fe6c0 (LWP 1639078)]
[New Thread 0x7fffbaffd6c0 (LWP 1639079)]
[New Thread 0x7fffba7fc6c0 (LWP 1639080)]
[New Thread 0x7fffb9ffb6c0 (LWP 1639081)]
[New Thread 0x7fffb97fa6c0 (LWP 1639082)]
[New Thread 0x7fffb8ff96c0 (LWP 1639083)]
[New Thread 0x7fffb87f86c0 (LWP 1639084)]
[New Thread 0x7fffb7ff76c0 (LWP 1639085)]
[New Thread 0x7fffb77f66c0 (LWP 1639086)]
[New Thread 0x7fffb6ff56c0 (LWP 1639087)]
[New Thread 0x7fffb67f46c0 (LWP 1639088)]
[09:07:34:486] [1639026:0019029e] [WARN][com.freerdp.core.nego] -
[nego_enable_aad]: This build does not support AAD security, disabling.
[09:07:34:622] [1639026:0019029e] [WARN][com.freerdp.core.nego] -
[nego_process_negotiation_failure]: Error: SSL_NOT_ALLOWED_BY_SERVER
[09:07:34:652] [1639026:0019029e] [WARN][com.freerdp.core.nego] -
[nego_process_negotiation_failure]: Error: SSL_NOT_ALLOWED_BY_SERVER
[09:07:35:774] [1639026:0019029e] [WARN][com.freerdp.core.connection] -
[rdp_client_connect_auto_detect]: expected messageChannelId=1008, got 1003
[09:07:35:775] [1639026:0019029e] [WARN][com.freerdp.core.license] -
[license_read_binary_blob_data]: license binary blob::type BB_CERTIFICATE_BLOB,
length=0, skipping.
[09:07:35:793] [1639026:0019029e] [WARN][com.freerdp.core.license] -
[license_read_binary_blob_data]: license binary blob::type BB_ERROR_BLOB,
length=0, skipping.
[09:07:35:859] [1639026:0019029e] [WARN][com.freerdp.core.connection] -
[rdp_client_connect_auto_detect]: expected messageChannelId=1008, got 1003
[09:07:35:860] [1639026:0019029e] [INFO][com.freerdp.gdi] - [gdi_init_ex]:
Local framebuffer format  PIXEL_FORMAT_RGBX32
[09:07:35:860] [1639026:0019029e] [INFO][com.freerdp.gdi] - [gdi_init_ex]:
Remote framebuffer format PIXEL_FORMAT_BGRA32
[New Thread 0x7fffaffff6c0 (LWP 1639089)]
[New Thread 0x7fffaf7fe6c0 (LWP 1639090)]
[09:07:35:865] [1639026:0019029e] [INFO][com.freerdp.channels.rdpsnd.client] -
[rdpsnd_load_device_plugin]: [static] Loaded pulse backend for rdpsnd
[New Thread 0x7fffaeffd6c0 (LWP 1639091)]
[09:07:35:866] [1639026:0019029e] [INFO][com.freerdp.channels.drdynvc.client] -
[dvcman_load_addin]: Loading Dynamic Virtual Channel ainput
[09:07:35:866] [1639026:0019029e] [INFO][com.freerdp.channels.drdynvc.client] -
[dvcman_load_addin]: Loading Dynamic Virtual Channel audin
[New Thread 0x7fffae7fc6c0 (LWP 1639092)]
[09:07:35:870] [1639026:0019029e] [INFO][com.freerdp.channels.audin.client] -
[audin_load_device_plugin]: Loaded pulse backend for audin
[09:07:35:870] [1639026:0019029e] [INFO][com.freerdp.channels.drdynvc.client] -
[dvcman_load_addin]: Loading Dynamic Virtual Channel rdpsnd
[09:07:35:870] [1639026:0019029e] [INFO][com.freerdp.channels.drdynvc.client] -
[dvcman_load_addin]: Loading Dynamic Virtual Channel rdpgfx
[09:07:35:870] [1639026:0019029e] [INFO][com.freerdp.channels.drdynvc.client] -
[dvcman_load_addin]: Loading Dynamic Virtual Channel disp
[New Thread 0x7fffadffb6c0 (LWP 1639093)]
[New Thread 0x7fffad7fa6c0 (LWP 1639094)]
[New Thread 0x7fffacff96c0 (LWP 1639095)]
[New Thread 0x7fff97fff6c0 (LWP 1639096)]
[New Thread 0x7fff977fe6c0 (LWP 1639097)]
[New Thread 0x7fff96ffd6c0 (LWP 1639098)]
[New Thread 0x7fff967fc6c0 (LWP 1639099)]
[New Thread 0x7fff95ffb6c0 (LWP 1639100)]
[New Thread 0x7fff957fa6c0 (LWP 1639101)]
[New Thread 0x7fff94ff96c0 (LWP 1639102)]
[New Thread 0x7fff8ffff6c0 (LWP 1639103)]
[New Thread 0x7fff8f7fe6c0 (LWP 1639104)]
[New Thread 0x7fff8effd6c0 (LWP 1639105)]
[New Thread 0x7fff8e7fc6c0 (LWP 1639106)]
[New Thread 0x7fff8dffb6c0 (LWP 1639107)]
[New Thread 0x7fff8d7fa6c0 (LWP 1639108)]
[New Thread 0x7fff8cff96c0 (LWP 1639109)]
[New Thread 0x7fff8c7f86c0 (LWP 1639110)]
[New Thread 0x7fffb5ff36c0 (LWP 1639112)]
[09:07:35:193] [1639026:001902b6] [INFO][com.freerdp.channels.rdpsnd.client] -
[rdpsnd_load_device_plugin]: [dynamic] Loaded pulse backend for rdpsnd
[Thread 0x7fffb5ff36c0 (LWP 1639112) exited]
[09:07:36:272] [1639026:001902b6] [WARN][com.freerdp.channels.drdynvc.client] -
[check_open_close_receive]: {Microsoft::Windows::RDS::DisplayControl:14}
OnOpen=(nil), OnClose=0x7fffec4e4040
[New Thread 0x7fffb5ff36c0 (LWP 1639113)]
[09:07:36:277] [1639026:001902b6] [INFO][com.freerdp.channels.rdpsnd.client] -
[rdpsnd_load_device_plugin]: [dynamic] Loaded pulse backend for rdpsnd
[09:07:51:131] [1639026:0019029e] [ERROR][com.freerdp.core.transport] -
[transport_read_layer]: BIO_read returned a system error 11: Resource
temporarily unavailable
[09:07:51:131] [1639026:0019029e] [ERROR][com.freerdp.core] -
[transport_read_layer]: ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[Thread 0x7fffadffb6c0 (LWP 1639093) exited]
[Thread 0x7fffc293f6c0 (LWP 1639071) exited]
[Thread 0x7fffaffff6c0 (LWP 1639089) exited]
[Thread 0x7fffaf7fe6c0 (LWP 1639090) exited]
[Thread 0x7fffaeffd6c0 (LWP 1639091) exited]
[09:07:51:134] [1639026:00190272] [WARN][com.freerdp.api] -
[input_ensure_client_running]: [APPLICATION BUG] input functions called after
the session terminated
[09:07:51:134] [1639026:00190272] [WARN][com.freerdp.api] -
[input_ensure_client_running]: [APPLICATION BUG] input functions called after
the session terminated
[Thread 0x7fff94ff96c0 (LWP 1639102) exited]
[Thread 0x7fff957fa6c0 (LWP 1639101) exited]
[Thread 0x7fff95ffb6c0 (LWP 1639100) exited]
[Thread 0x7fff967fc6c0 (LWP 1639099) exited]
[Thread 0x7fff96ffd6c0 (LWP 1639098) exited]
[Thread 0x7fff977fe6c0 (LWP 1639097) exited]
[Thread 0x7fff97fff6c0 (LWP 1639096) exited]
[Thread 0x7fffacff96c0 (LWP 1639095) exited]
[Thread 0x7fff8c7f86c0 (LWP 1639110) exited]
[Thread 0x7fff8cff96c0 (LWP 1639109) exited]
[Thread 0x7fff8d7fa6c0 (LWP 1639108) exited]
[Thread 0x7fff8dffb6c0 (LWP 1639107) exited]
[Thread 0x7fff8e7fc6c0 (LWP 1639106) exited]
[Thread 0x7fff8effd6c0 (LWP 1639105) exited]
[Thread 0x7fff8f7fe6c0 (LWP 1639104) exited]
[Thread 0x7fff8ffff6c0 (LWP 1639103) exited]
[09:07:51:211] [1639026:001902b6] [WARN][com.freerdp.channels.drdynvc.client] -
[check_open_close_receive]: {Microsoft::Windows::RDS::DisplayControl:14}
OnOpen=(nil), OnClose=0x7fffec4e4040
[Thread 0x7fffb5ff36c0 (LWP 1639113) exited]
[Thread 0x7fffad7fa6c0 (LWP 1639094) exited]
[Thread 0x7fffae7fc6c0 (LWP 1639092) exited]
[Thread 0x7fffba7fc6c0 (LWP 1639080) exited]
[Thread 0x7fffbaffd6c0 (LWP 1639079) exited]
[Thread 0x7fffbb7fe6c0 (LWP 1639078) exited]
[Thread 0x7fffc093b6c0 (LWP 1639075) exited]
[Thread 0x7fffbbfff6c0 (LWP 1639077) exited]
[Thread 0x7fffc113c6c0 (LWP 1639074) exited]
[Thread 0x7fffc193d6c0 (LWP 1639073) exited]
[Thread 0x7fffc213e6c0 (LWP 1639072) exited]
[Thread 0x7fffb67f46c0 (LWP 1639088) exited]
[Thread 0x7fffb6ff56c0 (LWP 1639087) exited]
[Thread 0x7fffb77f66c0 (LWP 1639086) exited]
[Thread 0x7fffb7ff76c0 (LWP 1639085) exited]
[Thread 0x7fffb87f86c0 (LWP 1639084) exited]
[Thread 0x7fffb8ff96c0 (LWP 1639083) exited]
[Thread 0x7fffb97fa6c0 (LWP 1639082) exited]
[Thread 0x7fffb9ffb6c0 (LWP 1639081) exited]
[Thread 0x7fffc8ad96c0 (LWP 1639070) exited]

Thread 1 "krdc" received signal SIGSEGV, Segmentation fault.
0x00007ffff7ddf637 in RemoteView::startQuitting (this=0x555555d17f10) at
/home/mike/krdc/core/remoteview.cpp:152
152         startQuittingConnection();
(gdb) bt
#0  0x00007ffff7ddf637 in RemoteView::startQuitting (this=0x555555d17f10) at
/home/mike/krdc/core/remoteview.cpp:152
#1  0x00007fffec571ac7 in RdpView::handleError (this=0x555555d17f10,
error=131085) at /home/mike/krdc/rdp/rdpview.cpp:364
#2  0x00007fffec575bd2 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>,
QtPrivate::List<unsigned int>, void, void (RdpView::*)(unsigned
int)>::call(void (RdpView::*)(unsigned int), RdpView*,
void**)::{lambda()#1}::operator()() const (__closure=0x7fffffffcdb0)
    at /usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs_impl.h:152
#3  0x00007fffec576318 in QtPrivate::FunctorCallBase::call_internal<void,
QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<unsigned
int>, void, void (RdpView::*)(unsigned int)>::call(void (RdpView::*)(unsigned
int), RdpView*, void**)::{lambda()#1}>(void**,
QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<unsigned
int>, void, void (RdpView::*)(unsigned int)>::call(void (RdpView::*)(unsigned
int), RdpView*, void**)::{lambda()#1}&&) (args=0x7fffb0067cf8, fn=...) at
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs_impl.h:65
#4  0x00007fffec575c48 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>,
QtPrivate::List<unsigned int>, void, void (RdpView::*)(unsigned int)>::call
(f=(void (RdpView::*)(RdpView * const, unsigned int)) 0x7fffec57124c
<RdpView::handleError(unsigned int)>, o=0x555555d17f10, arg=0x7fffb0067cf8)
    at /usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs_impl.h:151
#5  0x00007fffec5757c2 in QtPrivate::FunctionPointer<void (RdpView::*)(unsigned
int)>::call<QtPrivate::List<unsigned int>, void>
    (f=(void (RdpView::*)(RdpView * const, unsigned int)) 0x7fffec57124c
<RdpView::handleError(unsigned int)>, o=0x555555d17f10, arg=0x7fffb0067cf8)
    at /usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs_impl.h:199
#6  0x00007fffec575019 in QtPrivate::QCallableObject<void (RdpView::*)(unsigned
int), QtPrivate::List<unsigned int>, void>::impl
    (which=1, this_=0x7fffe8008ae0, r=0x555555d17f10, a=0x7fffb0067cf8,
ret=0x0) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs_impl.h:570
#7  0x00007ffff5dca39a in QObject::event(QEvent*) () at
/lib/x86_64-linux-gnu/libQt6Core.so.6
#8  0x00007ffff7de0ae3 in RemoteView::event (this=0x555555d17f10,
event=0x7fffb0067cb0) at /home/mike/krdc/core/remoteview.cpp:429
#9  0x00007ffff6f980c8 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#10 0x00007ffff5d813f0 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /lib/x86_64-linux-gnu/libQt6Core.so.6
#11 0x00007ffff5d817df in QCoreApplicationPrivate::sendPostedEvents(QObject*,
int, QThreadData*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#12 0x00007ffff5fe92cf in ??? () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#13 0x00007ffff3ef7de2 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007ffff3f69238 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#15 0x00007ffff3ef8223 in g_main_context_iteration () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007ffff5fe6c63 in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
at /lib/x86_64-linux-gnu/libQt6Core.so.6
#17 0x00007ffff5d8bd5b in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/lib/x86_64-linux-gnu/libQt6Core.so.6
#18 0x00007ffff5d84f7e in QCoreApplication::exec() () at
/lib/x86_64-linux-gnu/libQt6Core.so.6
#19 0x00005555555b0cc9 in main (argc=1, argv=0x7fffffffd6a8) at
/home/mike/krdc/main.cpp:99
(gdb) quit
A debugging session is active.

        Inferior 1 [process 1639026] will be killed.

Quit anyway? (y or n) y

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

Reply via email to