Bug 341005 - Crash when unplugging USB video device
Summary: Crash when unplugging USB video device
Status: RESOLVED FIXED
Alias: None
Product: KScreen
Classification: Plasma
Component: kded (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Daniel Vrátil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-15 22:22 UTC by Salvador I. Gonzalez
Modified: 2015-04-01 11:08 UTC (History)
1 user (show)

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


Attachments
Manual XrandR config - Step 1 Pre Monitor Plugin (3.65 KB, text/plain)
2015-03-08 14:42 UTC, Salvador I. Gonzalez
Details
Manual XrandR config - Step 2 Post Monitor Plugin / Pre Screen Config (4.43 KB, text/plain)
2015-03-08 14:43 UTC, Salvador I. Gonzalez
Details
Manual XrandR config - Step 3 Post Screen Config (4.94 KB, text/plain)
2015-03-08 14:43 UTC, Salvador I. Gonzalez
Details
Manual XrandR config - Step 4 Post Monitor Unplug (3.85 KB, text/plain)
2015-03-08 14:44 UTC, Salvador I. Gonzalez
Details
Kde GUI Screen Config - Step 1 Pre Monitor Plugin (3.65 KB, text/plain)
2015-03-08 14:44 UTC, Salvador I. Gonzalez
Details
Kde GUI Screen Config - Step 2 Post Monitor Plugin / Pre Screen Config (4.43 KB, text/plain)
2015-03-08 14:45 UTC, Salvador I. Gonzalez
Details
Kde GUI Screen Config - Step 3 Post Screen Config (4.54 KB, text/plain)
2015-03-08 14:45 UTC, Salvador I. Gonzalez
Details
Kde GUI Screen Config - Step 4 Post Monitor Unplug (3.66 KB, text/plain)
2015-03-08 14:46 UTC, Salvador I. Gonzalez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Salvador I. Gonzalez 2014-11-15 22:22:09 UTC
Application: kded4 (4.13.3)
KDE Platform Version: 4.13.3
Qt Version: 4.8.6
Operating System: Linux 3.13.0-39-generic x86_64
Distribution: Ubuntu 14.04.1 LTS

-- Information about the crash:
- What I was doing when the application crashed:
Removed USB Monitor driver - AOC e1649Fwu, using udl kernel driver.

This moitor requires a special modeline to work properly, the auto-config in KDE does not work:

xrandr --newmode "1368x768_60.20"  86.15  1368 1440 1584 1800  768 769 772 795  -HSync +Vsync

lsusb for device:
Bus 001 Device 003: ID 1210:2604 DigiTech 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x1210 DigiTech
  idProduct          0x2604 
  bcdDevice            0.01
  iManufacturer           1 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          512
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0 
      iFunction               4 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      0 
      iInterface              4 
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.00
        wTotalLength           78
        dwClockFrequency       30.000000MHz
        bInCollection           1
        baInterfaceNr( 0)       1
      VideoControl Interface Descriptor:
        bLength                27
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 6
        guidExtensionCode         {b0d0bb68-a461-834b-90b7-a6215f3c4f70}
        bNumControl            16
        bNrPins                 1
        baSourceID( 0)          2
        bControlSize            2
        bmControls( 0)       0xff
        bmControls( 1)       0xff
        iExtension              0 
      VideoControl Interface Descriptor:
        bLength                18
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Camera Sensor
        bAssocTerminal          0
        iTerminal               0 
        wObjectiveFocalLengthMin      0
        wObjectiveFocalLengthMax      0
        wOcularFocalLength            0
        bControlSize                  3
        bmControls           0x00000000
      VideoControl Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      5 (PROCESSING_UNIT)
      Warning: Descriptor too short
        bUnitID                 2
        bSourceID               1
        wMaxMultiplier          0
        bControlSize            2
        bmControls     0x0000157f
          Brightness
          Contrast
          Hue
          Saturation
          Sharpness
          Gamma
          White Balance Temperature
          Backlight Compensation
          Power Line Frequency
          White Balance Temperature, Auto
        iProcessing             0 
        bmVideoStandards     0x 9
          None
          SECAM - 625/50
      VideoControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             3
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               2
        iTerminal               0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               7
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              4 
      VideoStreaming Interface Descriptor:
        bLength                            14
        bDescriptorType                    36
        bDescriptorSubtype                  1 (INPUT_HEADER)
        bNumFormats                         1
        wTotalLength                      323
        bEndPointAddress                  130
        bmInfo                              0
        bTerminalLink                       3
        bStillCaptureMethod                 2
        bTriggerSupport                     1
        bTriggerUsage                       0
        bControlSize                        1
        bmaControls( 0)                    27
      VideoStreaming Interface Descriptor:
        bLength                            27
        bDescriptorType                    36
        bDescriptorSubtype                  4 (FORMAT_UNCOMPRESSED)
        bFormatIndex                        1
        bNumFrameDescriptors                5
        guidFormat                            {59555932-0000-1000-8000-00aa00389b71}
        bBitsPerPixel                      16
        bDefaultFrameIndex                  1
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 2 fields
          Field 1 first: No
          Field pattern: Field 1 only
          bCopyProtect                      0
      VideoStreaming Interface Descriptor:
        bLength                            50
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           480
        dwMinBitRate                  3072000
        dwMaxBitRate                 18432000
        dwMaxVideoFrameBufferSize      614400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  6
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            400000
        dwFrameInterval( 2)            500000
        dwFrameInterval( 3)            666666
        dwFrameInterval( 4)           1000000
        dwFrameInterval( 5)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            50
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         2
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            352
        wHeight                           288
        dwMinBitRate                  1013760
        dwMaxBitRate                  6082560
        dwMaxVideoFrameBufferSize      202752
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  6
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            400000
        dwFrameInterval( 2)            500000
        dwFrameInterval( 3)            666666
        dwFrameInterval( 4)           1000000
        dwFrameInterval( 5)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            50
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         3
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            320
        wHeight                           240
        dwMinBitRate                   768000
        dwMaxBitRate                  4608000
        dwMaxVideoFrameBufferSize      153600
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  6
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            400000
        dwFrameInterval( 2)            500000
        dwFrameInterval( 3)            666666
        dwFrameInterval( 4)           1000000
        dwFrameInterval( 5)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            50
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         4
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            176
        wHeight                           144
        dwMinBitRate                   253440
        dwMaxBitRate                  1520640
        dwMaxVideoFrameBufferSize       50688
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  6
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            400000
        dwFrameInterval( 2)            500000
        dwFrameInterval( 3)            666666
        dwFrameInterval( 4)           1000000
        dwFrameInterval( 5)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            50
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         5
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            160
        wHeight                           120
        dwMinBitRate                   192000
        dwMaxBitRate                  1152000
        dwMaxVideoFrameBufferSize       38400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  6
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            400000
        dwFrameInterval( 2)            500000
        dwFrameInterval( 3)            666666
        dwFrameInterval( 4)           1000000
        dwFrameInterval( 5)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            26
        bDescriptorType                    36
        bDescriptorSubtype                  3 (STILL_IMAGE_FRAME)
        bEndpointAddress                    0
        bNumImageSizePatterns               5
        wWidth( 0)                        640
        wHeight( 0)                       480
        wWidth( 1)                        352
        wHeight( 1)                       288
        wWidth( 2)                        320
        wHeight( 2)                       240
        wWidth( 3)                        176
        wHeight( 3)                       144
        wWidth( 4)                        160
        wHeight( 4)                       120
        bNumCompressionPatterns             5
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     1 (BT.709,sRGB)
        bTransferCharacteristics            1 (BT.709)
        bMatrixCoefficients                 4 (SMPTE 170M (BT.601))
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              4 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x1400  3x 1024 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              4 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0c00  2x 1024 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              4 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              4 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1

The crash can be reproduced every time.

-- Backtrace:
Application: KDE Daemon (kded4), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7ff7c7ae67c0 (LWP 2494))]

Thread 6 (Thread 0x7ff7ab68a700 (LWP 2509)):
#0  qt_gettime () at tools/qelapsedtimer_unix.cpp:142
#1  0x00007ff7c6786f05 in updateCurrentTime (this=0x7ff7a4003130) at kernel/qeventdispatcher_unix.cpp:354
#2  QTimerInfoList::timerWait (this=0x7ff7a4003130, tm=...) at kernel/qeventdispatcher_unix.cpp:460
#3  0x00007ff7c678567c in timerSourcePrepareHelper (src=<optimized out>, timeout=0x7ff7ab689c64) at kernel/qeventdispatcher_glib.cpp:143
#4  0x00007ff7c6785725 in timerSourcePrepare (source=<optimized out>, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:176
#5  0x00007ff7c244968d in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007ff7c2449f03 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ff7c244a0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007ff7c67857be in QEventDispatcherGlib::processEvents (this=0x7ff7a40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#9  0x00007ff7c67570af in QEventLoop::processEvents (this=this@entry=0x7ff7ab689e20, flags=...) at kernel/qeventloop.cpp:149
#10 0x00007ff7c67573a5 in QEventLoop::exec (this=this@entry=0x7ff7ab689e20, flags=...) at kernel/qeventloop.cpp:204
#11 0x00007ff7c6653c5f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:537
#12 0x00007ff7c665632f in QThreadPrivate::start (arg=0x20d08b0) at thread/qthread_unix.cpp:349
#13 0x00007ff7c2b2c182 in start_thread (arg=0x7ff7ab68a700) at pthread_create.c:312
#14 0x00007ff7c5358fbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 5 (Thread 0x7ff79a237700 (LWP 2528)):
#0  0x00007ff7c6786ef9 in QTimerInfoList::timerWait (this=0x7ff780003130, tm=...) at kernel/qeventdispatcher_unix.cpp:459
#1  0x00007ff7c678567c in timerSourcePrepareHelper (src=<optimized out>, timeout=0x7ff79a236c24) at kernel/qeventdispatcher_glib.cpp:143
#2  0x00007ff7c6785725 in timerSourcePrepare (source=<optimized out>, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:176
#3  0x00007ff7c244968d in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ff7c2449f03 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ff7c244a0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007ff7c67857be in QEventDispatcherGlib::processEvents (this=0x7ff7800008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#7  0x00007ff7c67570af in QEventLoop::processEvents (this=this@entry=0x7ff79a236de0, flags=...) at kernel/qeventloop.cpp:149
#8  0x00007ff7c67573a5 in QEventLoop::exec (this=this@entry=0x7ff79a236de0, flags=...) at kernel/qeventloop.cpp:204
#9  0x00007ff7c6653c5f in QThread::exec (this=this@entry=0x21f0400) at thread/qthread.cpp:537
#10 0x00007ff7c6738823 in QInotifyFileSystemWatcherEngine::run (this=0x21f0400) at io/qfilesystemwatcher_inotify.cpp:265
#11 0x00007ff7c665632f in QThreadPrivate::start (arg=0x21f0400) at thread/qthread_unix.cpp:349
#12 0x00007ff7c2b2c182 in start_thread (arg=0x7ff79a237700) at pthread_create.c:312
#13 0x00007ff7c5358fbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7ff799830700 (LWP 2532)):
#0  0x00007ff7c534bc6d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ff7c2449fe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ff7c244a0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ff7c67857be in QEventDispatcherGlib::processEvents (this=0x7ff7840008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#4  0x00007ff7c67570af in QEventLoop::processEvents (this=this@entry=0x7ff79982fde0, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007ff7c67573a5 in QEventLoop::exec (this=this@entry=0x7ff79982fde0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007ff7c6653c5f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:537
#7  0x00007ff7a8a77027 in KCupsConnection::run() () from /usr/lib/libkcupslib.so
#8  0x00007ff7c665632f in QThreadPrivate::start (arg=0x20ffdf0) at thread/qthread_unix.cpp:349
#9  0x00007ff7c2b2c182 in start_thread (arg=0x7ff799830700) at pthread_create.c:312
#10 0x00007ff7c5358fbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 3 (Thread 0x7ff79902f700 (LWP 2533)):
#0  0x00007ff7c2449bda in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007ff7c244a048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ff7c244a0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ff7c67857be in QEventDispatcherGlib::processEvents (this=0x7ff7780008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#4  0x00007ff7c67570af in QEventLoop::processEvents (this=this@entry=0x7ff79902ee20, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007ff7c67573a5 in QEventLoop::exec (this=this@entry=0x7ff79902ee20, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007ff7c6653c5f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:537
#7  0x00007ff7c665632f in QThreadPrivate::start (arg=0x22e1c40) at thread/qthread_unix.cpp:349
#8  0x00007ff7c2b2c182 in start_thread (arg=0x7ff79902f700) at pthread_create.c:312
#9  0x00007ff7c5358fbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7ff77fdad700 (LWP 2544)):
#0  0x00007ff7c248b61a in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007ff7c248b9a9 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ff7c2449680 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ff7c2449f03 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ff7c244a0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ff7c67857be in QEventDispatcherGlib::processEvents (this=0x7ff7680008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#6  0x00007ff7c67570af in QEventLoop::processEvents (this=this@entry=0x7ff77fdacde0, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007ff7c67573a5 in QEventLoop::exec (this=this@entry=0x7ff77fdacde0, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007ff7c6653c5f in QThread::exec (this=this@entry=0x23818e0) at thread/qthread.cpp:537
#9  0x00007ff7c6738823 in QInotifyFileSystemWatcherEngine::run (this=0x23818e0) at io/qfilesystemwatcher_inotify.cpp:265
#10 0x00007ff7c665632f in QThreadPrivate::start (arg=0x23818e0) at thread/qthread_unix.cpp:349
#11 0x00007ff7c2b2c182 in start_thread (arg=0x7ff77fdad700) at pthread_create.c:312
#12 0x00007ff7c5358fbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7ff7c7ae67c0 (LWP 2494)):
[KCrash Handler]
#5  0x00007ff7a996638b in XRandROutput::updateOutput(_XRROutputInfo const*) () from /usr/lib/kde4/plugins/kscreen/KSC_XRandR.so
#6  0x00007ff7a9965f44 in XRandROutput::XRandROutput(int, bool, XRandRConfig*) () from /usr/lib/kde4/plugins/kscreen/KSC_XRandR.so
#7  0x00007ff7a995c8ad in XRandRConfig::createNewOutput(unsigned long, bool) () from /usr/lib/kde4/plugins/kscreen/KSC_XRandR.so
#8  0x00007ff7a995c830 in XRandRConfig::addNewOutput(unsigned long) () from /usr/lib/kde4/plugins/kscreen/KSC_XRandR.so
#9  0x00007ff7a995957a in XRandR::updateOutput(unsigned long) () from /usr/lib/kde4/plugins/kscreen/KSC_XRandR.so
#10 0x00007ff7a9959edf in XRandR::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/kde4/plugins/kscreen/KSC_XRandR.so
#11 0x00007ff7c676c87a in QMetaObject::activate (sender=0x20e4c20, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff8a729bf0) at kernel/qobject.cpp:3539
#12 0x00007ff7a995c2f5 in XRandRX11Helper::outputChanged(unsigned long) () from /usr/lib/kde4/plugins/kscreen/KSC_XRandR.so
#13 0x00007ff7a995bcde in XRandRX11Helper::x11Event(_XEvent*) () from /usr/lib/kde4/plugins/kscreen/KSC_XRandR.so
#14 0x00007ff7c74fdeb8 in ?? () from /usr/lib/libkdeui.so.5
#15 0x00007ff7c674a35e in QAbstractEventDispatcher::filterEvent (this=0x3dda8d0, message=0x0, message@entry=0x7fff8a729da0) at kernel/qabstracteventdispatcher.cpp:542
#16 0x00007ff7c5b93a30 in x11EventSourceDispatch (s=0x1ed5e00, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:143
#17 0x00007ff7c2449e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007ff7c244a048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ff7c244a0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ff7c67857be in QEventDispatcherGlib::processEvents (this=0x1e3d6d0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#21 0x00007ff7c5b93bb6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#22 0x00007ff7c67570af in QEventLoop::processEvents (this=this@entry=0x7fff8a72a170, flags=...) at kernel/qeventloop.cpp:149
#23 0x00007ff7c67573a5 in QEventLoop::exec (this=this@entry=0x7fff8a72a170, flags=...) at kernel/qeventloop.cpp:204
#24 0x00007ff7c675cb79 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#25 0x00007ff7b0f6cd1b in kdemain () from /usr/lib/kde4/libkdeinit/libkdeinit4_kded4.so
#26 0x00000000004083ee in _start ()

Report to https://bugs.kde.org/

Reproducible: Always

Steps to Reproduce:
1. Plug in USB Monitor
2. Set proper modeline & enable display
3. Un-plug device

Actual Results:  
Crash

Expected Results:  
No Crash
Comment 1 Daniel Vrátil 2015-03-05 18:51:42 UTC
We might not be dealing with disappearance of an actual output very well.

Could you please provide output of "xrandr --verbose" with the device plugged in and unplugged?
Comment 2 Salvador I. Gonzalez 2015-03-08 14:42:28 UTC
Created attachment 91484 [details]
Manual XrandR config - Step 1 Pre Monitor Plugin
Comment 3 Salvador I. Gonzalez 2015-03-08 14:43:08 UTC
Created attachment 91485 [details]
Manual XrandR config - Step 2 Post Monitor Plugin / Pre Screen Config
Comment 4 Salvador I. Gonzalez 2015-03-08 14:43:38 UTC
Created attachment 91486 [details]
Manual XrandR config - Step 3 Post Screen Config
Comment 5 Salvador I. Gonzalez 2015-03-08 14:44:09 UTC
Created attachment 91487 [details]
Manual XrandR config - Step 4 Post Monitor Unplug
Comment 6 Salvador I. Gonzalez 2015-03-08 14:44:55 UTC
Created attachment 91488 [details]
Kde GUI Screen Config - Step 1 Pre Monitor Plugin
Comment 7 Salvador I. Gonzalez 2015-03-08 14:45:25 UTC
Created attachment 91489 [details]
Kde GUI Screen Config - Step 2 Post Monitor Plugin / Pre Screen Config
Comment 8 Salvador I. Gonzalez 2015-03-08 14:45:58 UTC
Created attachment 91490 [details]
Kde GUI Screen Config - Step 3 Post Screen Config
Comment 9 Salvador I. Gonzalez 2015-03-08 14:46:21 UTC
Created attachment 91491 [details]
Kde GUI Screen Config - Step 4 Post Monitor Unplug
Comment 10 Salvador I. Gonzalez 2015-03-08 14:53:59 UTC
I have attached `xrandr --verbose` output for every discreet step in the process of plugging/unplugging the monitor.  I tried it both with configuring the second monitor on the CLI with xrandr, and then again with the KDE Utility.  Rebooted in between attempts to ensure a clean environment.  Both ways cause the crash upon unplugging.

In case it helps, here are the commands I run on the CLI to configure the second monitor:
xrandr --rmmode "1368x768_60.20"
xrandr --newmode "1368x768_60.20"  86.15  1368 1440 1584 1800  768 769 772 795  -HSync +Vsync &&
xrandr --addmode DVI-1-0 1368x768_60.20 &&
xrandr --output DVI-1-0 --mode 1368x768_60.20 --left-of LVDS --noprimary
Comment 11 Christoph Feck 2015-03-15 17:37:05 UTC
Thanks for the update, changing status.
Comment 12 Daniel Vrátil 2015-03-18 10:02:13 UTC
Thanks, indeed plugging and unplugging the video device causes a new output to appear/disappear, and we don't handle this in our code correctly (at all), which leads to various crashes.
Comment 13 Daniel Vrátil 2015-03-26 16:31:02 UTC
Git commit e888640086fb6ecac52ca89d9ebd9de273114a40 by Dan Vrátil.
Committed on 26/03/2015 at 16:29.
Pushed by dvratil into branch 'master'.

XRandR: correctly handle output disappearing

This can happen for example when user unplugs an external GPU.
FIXED-IN: 5.3

M  +16   -2    backends/xrandr/xrandr.cpp
M  +2    -5    backends/xrandr/xrandrconfig.cpp
M  +1    -6    backends/xrandr/xrandrconfig.h
M  +0    -3    backends/xrandr/xrandroutput.h

http://commits.kde.org/libkscreen/e888640086fb6ecac52ca89d9ebd9de273114a40
Comment 14 Daniel Vrátil 2015-03-26 16:31:12 UTC
Git commit 3a0c9330cf8ffe34351cd5c7838fa394212b5af5 by Dan Vrátil.
Committed on 26/03/2015 at 16:30.
Pushed by dvratil into branch 'master'.

KCM: properly handle outputs appearing and disappearing at runtime

M  +34   -10   kcm/src/controlpanel.cpp
M  +4    -0    kcm/src/controlpanel.h
M  +54   -57   kcm/src/declarative/qmlscreen.cpp
M  +3    -7    kcm/src/declarative/qmlscreen.h
M  +3    -1    kcm/src/outputconfig.cpp
M  +6    -0    kcm/src/widget.cpp

http://commits.kde.org/kscreen/3a0c9330cf8ffe34351cd5c7838fa394212b5af5
Comment 15 Salvador I. Gonzalez 2015-04-01 11:08:04 UTC
Thank you for your help!