racket / drracket

DrRacket, IDE for Racket
http://www.racket-lang.org/
Other
448 stars 95 forks source link

Gdk issue with tooltips/arrows(?) #153

Open pnwamk opened 6 years ago

pnwamk commented 6 years ago

Steps to reproduce

  1. Install Racket on Ubuntu 17.10 and open DrRacket.

  2. Enter the following in the definitions window:

#lang racket

(modulo 10 2)
  1. Mouse over modulo

Instead of the arrow back to #lang racket and a tool tip appearing, the arrow appears and disapears in rapid succession, it seems like the window manager focuses and unfocuses on DrRacket each time this happens, and if you launched DrRacket from the terminal you see the following repeated each time the arrow/tool tip is drawn and disappears:

Gdk-Message: Window 0x5627860bc4c0 is a temporary window without parent, application will not be able to position it on screen.

This is especially troublesome when in a #lang that makes frequent use of tool tips (e.g. Typed Racket, etc).

I have observed this with the 6.10.1 release and with a built-from-source install.

pnwamk commented 6 years ago

Probably related to bug #15405 on bugs.racket-lang.org which @david-christiansen documented also here: https://www.youtube.com/watch?v=a0Ogy_38xd0

pnwamk commented 6 years ago

Just had a segfault that seemed related to this (i.e. I moused over something, it started flashing quickly, then DrRacket crashed):

Gdk-Message: Window 0x55bbfa6d97d0 is a temporary window without parent, application will not be able to position it on screen.
Gdk-Message: Window 0x55bbfa6d97d0 is a temporary window without parent, application will not be able to position it on screen.
Gdk-Message: Window 0x55bbfa6d97d0 is a temporary window without parent, application will not be able to position it on screen.
Gdk-Message: Window 0x55bbfa6d97d0 is a temporary window without parent, application will not be able to position it on screen.
SIGSEGV MAPERR si_code 1 fault on addr (nil)

[1]  + 32166 abort (core dumped)  ../../racket/bin/drracket
pnwamk commented 6 years ago

For anyone hitting this issue in a new Ubuntu (>= 17.10) install, changing the display server from Wayland back to Xorg should eliminate the issue. Steps:

  1. log out of Ubuntu
  2. click on your user name
  3. click on the little gear next to "sign in"
  4. select "Ubuntu on Xorg" from the drop down
  5. log in
lavovaLampa commented 6 years ago

As a quick workaround you don't have to switch session. Just run drracket with environment variable GDK_BACKEND set to x11 e.g.

GDK_BACKEND=x11 drracket

dubst3pp4 commented 5 years ago

In addition to @lavovaLampa suggestion:

If you don't want to start DrRacket from command line, just copy the desktop file into your home

cp /usr/share/applications/drracket.desktop ~/.local/share/applications/

and modify the value of the Exec key in your local drracket.desktop, so that it results in:

Exec=env GDK_BACKEND=x11 drracket -singleInstance %F