Skip to content

Drag-Drop making element go black and crash #12820

Closed

Description

@leotada
  • Electron version: 2.0.0
  • Operating system: Fedora Linux 28 - 4.16.5-300.fc28.x86_64
  • Hardware: Intel HD Graphics 4400
  • Last known working Electron version:
    1.8.6 (but flashes black at the beginning of the drag)
    Message on debug 1.8.6:
    [6956:0503/113418.226485:ERROR:buffer_manager.cc(453)] [.DisplayCompositor-0x345f2e791700]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command

Expected behavior

Drag and drop without crash the Electron, and the element not turn to black.

Actual behavior

When drag an element it turn black, freeze Electron and the black element stay on screen even through other programs. No messages on debug, just freeze.

How to reproduce

Start any project with a button with attribute draggable="true". Start dragging it, done.

ckerr edit: duplicate bug #13384 has a repro repo

Activity

  1. welcome commented on May 3, 2018

    @welcome

    👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

    To help make it easier for us to investigate your issue, please follow the contributing guidelines.

  2. codebytere commented on May 4, 2018

    @codebytere
    Member

    Thank you for taking the time to report this issue and helping to make Electron better.

    Please provide a standalone test that a tester could run to reproduce the issue. This makes fixing issues go more smoothly: not only does it ensure the right thing is tested, but it also prevents triage from bottlenecking on making testers write new tests for each new issue.

    I'm setting the more-information-needed label for the above reasons. After you've responded, please @ me in a followup comment.

    Thanks in advance! Your help is appreciated.

  3. leotada commented on May 4, 2018

    @leotada
    Author

    @codebytere
    I realized that even dragging a simple text occurs the same problem.
    Here is my code:
    https://github.com/leotada/electron-quick-start

  4. christianbundy commented on May 6, 2018

    @christianbundy

    I've been having the exact same issue with [email protected] as well.

    Just for reference:

    $ uname -a
    Linux samus 4.16.3-5-ph #1 SMP PREEMPT Mon Apr 30 16:30:07 PDT 2018 x86_64 GNU/Linux

    I was thinking it was a display driver issue (especially after reading https://wiki.archlinux.org/index.php/Intel_graphics#OpenGL_2.1_with_i915_driver), but I'm not sure that's the case.

    % lspci -nn | grep '\[03'
    00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 5500 [8086:1616] (rev 09)
    % modinfo i915
    filename:       /lib/modules/4.16.3-5-ph/kernel/drivers/gpu/drm/i915/i915.ko.xz
    license:        GPL and additional rights
    description:    Intel Graphics
    author:         Intel Corporation
    author:         Tungsten Graphics, Inc.
    firmware:       i915/bxt_dmc_ver1_07.bin
    firmware:       i915/skl_dmc_ver1_27.bin
    firmware:       i915/kbl_dmc_ver1_04.bin
    firmware:       i915/kbl_guc_ver9_39.bin
    firmware:       i915/bxt_guc_ver9_29.bin
    firmware:       i915/skl_guc_ver9_33.bin
    firmware:       i915/kbl_huc_ver02_00_1810.bin
    firmware:       i915/bxt_huc_ver01_07_1398.bin
    firmware:       i915/skl_huc_ver01_07_1398.bin
    srcversion:     C689DA53FEC35F81D813268
    alias:          pci:v00008086d00005A79sv*sd*bc03sc*i*
    alias:          pci:v00008086d00005A71sv*sd*bc03sc*i*
    alias:          pci:v00008086d00005A49sv*sd*bc03sc*i*
    ...
    alias:          pci:v00008086d00003582sv*sd*bc03sc*i*
    alias:          pci:v00008086d00002562sv*sd*bc03sc*i*
    alias:          pci:v00008086d00003577sv*sd*bc03sc*i*
    depends:        drm_kms_helper,drm,intel-gtt,i2c-algo-bit
    retpoline:      Y
    intree:         Y
    name:           i915
    vermagic:       4.16.3-5-ph SMP preempt mod_unload modversions 
    parm:           modeset:Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) (int)
    parm:           panel_ignore_lid:Override lid status (0=autodetect, 1=autodetect disabled [default], -1=force lid closed, -2=force lid open) (int)
    parm:           enable_dc:Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6) (int)
    parm:           enable_fbc:Enable frame buffer compression for power savings (default: -1 (use per-chip default)) (int)
    parm:           lvds_channel_mode:Specify LVDS channel mode (0=probe BIOS [default], 1=single-channel, 2=dual-channel) (int)
    parm:           panel_use_ssc:Use Spread Spectrum Clock with panels [LVDS/eDP] (default: auto from VBT) (int)
    parm:           vbt_sdvo_panel_type:Override/Ignore selection of SDVO panel mode in the VBT (-2=ignore, -1=auto [default], index in VBT BIOS table) (int)
    parm:           reset:Attempt GPU resets (0=disabled, 1=full gpu reset, 2=engine reset [default]) (int)
    parm:           vbt_firmware:Load VBT from specified file under /lib/firmware (charp)
    parm:           error_capture:Record the GPU state following a hang. This information in /sys/class/drm/card<N>/error is vital for triaging and debugging hangs. (bool)
    parm:           enable_hangcheck:Periodically check GPU activity for detecting hangs. WARNING: Disabling this can cause system wide hangs. (default: true) (bool)
    parm:           enable_ppgtt:Override PPGTT usage. (-1=auto [default], 0=disabled, 1=aliasing, 2=full, 3=full with extended address space) (int)
    parm:           enable_psr:Enable PSR (0=disabled, 1=enabled - link mode chosen per-platform, 2=force link-standby mode, 3=force link-off mode) Default: -1 (use per-chip default) (int)
    parm:           alpha_support:Enable alpha quality driver support for latest hardware. See also CONFIG_DRM_I915_ALPHA_SUPPORT. (bool)
    parm:           disable_power_well:Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible) (int)
    parm:           enable_ips:Enable IPS (default: true) (int)
    parm:           fastboot:Try to skip unnecessary mode sets at boot time (default: false) (bool)
    parm:           prefault_disable:Disable page prefaulting for pread/pwrite/reloc (default:false). For developers only. (bool)
    parm:           load_detect_test:Force-enable the VGA load detect code for testing (default:false). For developers only. (bool)
    parm:           force_reset_modeset_test:Force a modeset during gpu reset for testing (default:false). For developers only. (bool)
    parm:           invert_brightness:Invert backlight brightness (-1 force normal, 0 machine defaults, 1 force inversion), please report PCI device ID, subsystem vendor and subsystem device ID to [email protected], if your machine needs it. It will then be included in an upcoming module version. (int)
    parm:           disable_display:Disable display (default: false) (bool)
    parm:           enable_cmd_parser:Enable command parsing (true=enabled [default], false=disabled) (bool)
    parm:           mmio_debug:Enable the MMIO debug code for the first N failures (default: off). This may negatively affect performance. (int)
    parm:           verbose_state_checks:Enable verbose logs (ie. WARN_ON()) in case of unexpected hw state conditions. (bool)
    parm:           nuclear_pageflip:Force enable atomic functionality on platforms that don't have full support yet. (bool)
    parm:           edp_vswing:Ignore/Override vswing pre-emph table selection from VBT (0=use value from vbt [default], 1=low power swing(200mV),2=default swing(400mV)) (int)
    parm:           enable_guc:Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto, 0=disable [default], 1=GuC submission, 2=HuC load) (int)
    parm:           guc_log_level:GuC firmware logging level (-1:disabled (default), 0-3:enabled) (int)
    parm:           guc_firmware_path:GuC firmware path to use instead of the default one (charp)
    parm:           huc_firmware_path:HuC firmware path to use instead of the default one (charp)
    parm:           enable_dp_mst:Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true) (bool)
    parm:           inject_load_failure:Force an error after a number of failure check points (0:disabled (default), N:force failure at the Nth failure check point) (uint)
    parm:           enable_dpcd_backlight:Enable support for DPCD backlight control (default:false) (bool)
    parm:           enable_gvt:Enable support for Intel GVT-g graphics virtualization host support(default:false) (bool)

    I'm not getting this issue in Chromium (Version 66.0.3359.139 (Official Build) Arch Linux (64-bit)), so it may be Electron-specific.

    Here's a screenshot of me selecting and dragging text:

    dragging

    Even after I let go, my cursor is still stuck in drag mode and the black box won't disappear. Resizing the window also causes weird black rectangles. The window can't be killed normally (through the x or Ctrl+C), so it has to be killed with killall electron. No bueno.

    after

  5. christianbundy commented on May 6, 2018

    @christianbundy

    While researching this I found a debugging instruction that may give some useful info:

    Data exported | 2018-05-06T18:33:30.376Z
    -- | --
    Chrome version | Chrome/66.0.3359.139
    Operating system | Linux 4.16.3-5-ph
    Software rendering list URL | https://chromium.googlesource.com/chromium/src/+/04f3a687c3f0ca1c1c1444683ddfadb74191b787/gpu/config/software_rendering_list.json
    Driver bug list URL | https://chromium.googlesource.com/chromium/src/+/04f3a687c3f0ca1c1c1444683ddfadb74191b787/gpu/config/gpu_driver_bug_list.json
    ANGLE commit id | unknown hash
    2D graphics backend | Skia/66 773868fdade5f9f0e7697e6d09c9bd80aaa9b402-
    Command Line | /usr/lib/chromium/chromium --flag-switches-begin --flag-switches-end
    

    My intuitition is that there's a bug with how Chromium/Electron is interfacing with the driver/kernel when it does the semi-transparent dragging layer, but I'm not familiar enough to understand exactly where the fix needs to be applied. I'll keep working until everything looks happy in chrome://gpu, which will hopefully resolve the issue without any work being necessary in Chromium/Electron.

  6. christianbundy commented on May 6, 2018

    @christianbundy

    Reproduction steps:

    1. Open any Electron application.
    2. Copy any text within the app.
    3. Click and drag.

    Expected (and working in v1.8.4):

    • Selected text is copied below your mouse with ~50% transparency.
    • Text follows your mouse until you release your click.
    • Text disappears.
    • If you're hovering over an input, the text goes into the input.

    Actual (v2.0.0):

    • Black rectangle with the area of the selected text is copied under your cursor.
    • Black rectangle follows your mouse until you release your click.
    • Electron freezes and won't die.
    • Black rectangle is always visible and overlaps any other applications you try to drag over it.
    • Black rectangle remains until you kill Electron.

    screenshot from 2018-05-06 14-53-46

    "I'm setting the more-information-needed label for the above reasons. After you've responded, please @ me in a followup comment." -- @codebytere

  7. codebytere commented on May 7, 2018

    @codebytere
    Member

    yep, i'll 👀 this soon!

  8. christianbundy commented on May 9, 2018

    @christianbundy

    Workaround: --disable-gpu

    I found this suggestion here: #4380 (comment)

    @leotada Can you verify that electron --disable-gpu works for you as well?

    Additional notes

    • --disable-gpu-blacklist doesn't fix the issue
    • It isn't this bug (I'm using freetype2 2.9.1.1)
    • Seems related to transparency, Fix transparency #12561 may be relevant
    • My Electron GPU process flags:
      • --type=gpu-process
      • --no-sandbox
      • --supports-dual-gpus=false
      • --gpu-driver-bug-workarounds=1,9,27,70,84
      • --disable-gl-extensions=GL_KHR_blend_equation_advanced
      • GL_KHR_blend_equation_advanced_coherent
      • --disable-accelerated-video-decode
      • --gpu-vendor-id=0x8086
      • --gpu-device-id=0x1616
      • --gpu-driver-vendor
      • --gpu-driver-version
      • --gpu-driver-date
      • --service-request-channel-token=0EB803B34379058862EC3D63D17A989E
    • My Electron renderer process flags:
      • --type=renderer
      • --no-sandbox
      • --service-pipe-token=7A0DA93E3DA90C3F2E2E91228251969D
      • --lang=en-US
      • --app-path=/home/christianbundy/src/electron-test/node_modules/electron/dist/resources/default_app.asar
      • --node-integration=true
      • --node-integration-in-worker
      • --webview-tag=true
      • --no-sandbox
      • --background-color=#FFFFFF
      • --context-id=2
      • --enable-pinch
      • --num-raster-threads=2
      • --enable-main-frame-before-activation
      • --content-image-texture-target=0,0,3553;0,1,3553;0,2,3553;0,3,3553;0,4,3553;0,5,3553;0,6,3553;0,7,3553;0,8,3553;0,9,3553;0,10,3553;0,11,3553;0,12,3553;0,13,3553;0,14,3553;0,15,3553;0,16,3553;0,17,3553;1,0,3553;1,1,3553;1,2,3553;1,3,3553;1,4,3553;1,5,3553;1,6,3553;1,7,3553;1,8,3553;1,9,3553;1,10,3553;1,11,3553;1,12,3553;1,13,3553;1,14,3553;1,15,3553;1,16,3553;1,17,3553;2,0,3553;2,1,3553;2,2,3553;2,3,3553;2,4,3553;2,5,3553;2,6,3553;2,7,3553;2,8,3553;2,9,3553;2,10,3553;2,11,3553;2,12,3553;2,13,3553;2,14,3553;2,15,3553;2,16,3553;2,17,3553;3,0,3553;3,1,3553;3,2,3553;3,3,3553;3,4,3553;3,5,3553;3,6,3553;3,7,3553;3,8,3553;3,9,3553;3,10,3553;3,11,3553;3,12,3553;3,13,3553;3,14,3553;3,15,3553;3,16,3553;3,17,3553;4,0,3553;4,1,3553;4,2,3553;4,3,3553;4,4,3553;4,5,3553;4,6,3553;4,7,3553;4,8,3553;4,9,3553;4,10,3553;4,11,3553;4,12,3553;4,13,3553;4,14,3553;4,15,3553;4,16,3553;4,17,3553
      • --disable-accelerated-video-decode
      • --enable-gpu-async-worker-context
      • --service-request-channel-token=7A0DA93E3DA90C3F2E2E91228251969D
      • --renderer-client-id=4
      • --shared-files=v8_nat

    Not completely sure how to further debug, but at least we can pin it down to the GPU.

  9. leotada commented on May 11, 2018

    @leotada
    Author

    @christianbundy Yes works fine with --disable-gpu.

  10. daniel-j commented on May 14, 2018

    @daniel-j

    @christianbundy Thank you for finding a workaround! I added this code to run on only Linux in my project and drag-drop works! app.disableHardwareAcceleration()

  11. ruslang02 commented on Jul 9, 2018

    @ruslang02

    Electron 3.0.0-beta

    Still not fixed. Flag --disable-gpu fixes the issue, albeit it does not fix the problem.
    There might be some projects out there that may need hardware acceleration.

  12. 20 remaining items

  13. dev-zetta commented on Oct 29, 2018

    @dev-zetta

    Same issue here. Everything worked fine with GPU blacklist flag, until I recently updated electron to the latest version. Now only enabling disable GPU flag helps, however I need GPU rendering, so this bug has become a serious problem for my project.

    The whole app freezes after drop event. It causes temp freeze + graphic glitch after the drag event starts:
    image

  14. anchepiece commented on Nov 1, 2018

    @anchepiece

    @dev-zetta I encountered a similar issue and resolved it by redirecting (stdout) output as hinted above by @bpasero

    Can you try launching using something like
    $ nohup yourapp
    Or if you want to capture the output
    $ nohup yourapp < /dev/null > nohup.out 2> nohup.err &

  15. dev-zetta commented on Nov 1, 2018

    @dev-zetta

    @anchepiece Awesome. Thanks, I missed that. Just tested this workaround and it works. Also thanks to @bpasero.

    Finally, my CPU gets a break from software rendering 💃

  16. Serisium commented on Nov 8, 2018

    @Serisium

    I'd like to add that this bug is also affecting the current version of Everdo, a multiplatform productivity app. See our discussions here: https://forum.everdo.net/t/arch-desktop-gui-crashes-when-dragging-items-from-the-inbox/468

  17. lsl commented on Nov 15, 2018

    @lsl

    Potentially related:

    I'm seeing slack coredumps on i3wm/x11 when my screen goes into suspend and slack is in a different workspace.

    You can reproduce using xset dpms force suspend while viewing another workspace. --disable-gpu prevents the issue.

  18. TitouanT commented on Nov 28, 2018

    @TitouanT

    Following this issue because I ran straight into it at the very begining of the development of my first electron app ^^ (I am so lucky :p) I hope it gets fixed soon, thank you guys for the work around !

  19. christianbundy commented on Nov 28, 2018

    @christianbundy

    FWIW, I read this morning that the bug may have been resolved by #15555.

    I haven't tested it (and I'm currently on mobile), but it looks like it was backported to both v3 and v4. Not sure whether it's landed in a release, but I wanted to share all the info I have.

  20. nkkollaw commented on Jan 6, 2019

    @nkkollaw

    FWIW, I read this morning that the bug may have been resolved by #15555.

    I haven't tested it (and I'm currently on mobile), but it looks like it was backported to both v3 and v4. Not sure whether it's landed in a release, but I wanted to share all the info I have.

    Does it fix crashes when reordering tabs? It's driving me crazy...

  21. martin31821 commented on Jan 9, 2019

    @martin31821

    Updating my app to electron 3.0.14 fixed the issue for me on linux.

  22. araspik commented on Apr 13, 2019

    @araspik

    I can confirm that this is still on Electron v4.1.1, and it affects Atom (latest, straight from GitHub release tar.gz). nohup <path>/atom fixes the issue.

    $ uname -a
    Linux <HOSTNAME> 5.0.6-artix1-1-ARTIX #1 SMP PREEMPT <DATE> x86_64 GNU/Linux
    

    (Artix Linux is Arch Linux using OpenRC instead of systemd)

  23. ckerr commented on Jan 28, 2021

    @ckerr
    Member

    This issue should've gotten more attention sooner. Is this still an issue in supported versions of Electron, e.g. is this still present in Electron 11 or in the 12 betas?

  24. added
    blocked/need-info ❌
    on Jan 28, 2021
  25. electron-triage commented on Mar 8, 2021

    @electron-triage

    The Electron version reported on this issue is no longer supported. See our supported versions documentation.

    If this is still reproducible on a supported version, please open a new issue with any other new information that a maintainer should know.

    Thank you for taking the time to report this issue and helping to make Electron better! Your help is appreciated.

  26. christianbundy commented on Mar 8, 2021

    @christianbundy

    Nope, I think this is fixed in Electron 11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

2-0-x3-0-x4-2-xblocked/need-info ❌bug 🪲bug/regression ↩️platform/linuxstatus/confirmed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions