Ticket #2184 (assigned defect)

Opened 3 years ago

Last modified 2 months ago

Occasional black Palettes

Reported by: carrott Owned by: manuq
Priority: High Milestone: 1.0
Component: sugar Version: 0.98.x
Severity: Major Keywords: dextrose
Cc: bernie Distribution/OS: Fedora
Bug Status: New

Description

Occasionally I have I observed on my own loptop and on other laptops a right-click context menu which is entirely black with no writing. If a context menu showed up black, it would always be black, even after navigating to a completely different screen and back to the original screen. A restart would fix it.

I saw this on the neighbourhood view and the home view and probably other places.

Attachments

logging.patch Download (5.9 KB) - added by manuq 3 months ago.
delayed_popup.patch Download (1.9 KB) - added by manuq 3 months ago.
Patch: prevent fast popup popdown
0001-Palettes-prevent-popup-after-popdown-for-a-few-milli.patch Download (3.3 KB) - added by manuq 3 months ago.
remove_resizable_false.patch Download (1.9 KB) - added by manuq 2 months ago.
Remove resizable false, and add some logging
remove_resizable_false-shrink.patch Download (1.6 KB) - added by manuq 2 months ago.
Sort out palette shrink, the issue appears again

Change History

  Changed 3 years ago by bernie

  • cc bernie added
  • owner set to benzea
  • status changed from new to assigned
  • component changed from untriaged to sugar-artwork
  • status_field changed from Unconfirmed to New

Confirmed, I've seen this bug too, on different context menus.

Maybe a GTK theme bug? Assigning to sugar-artwork. Benjamin, what do you think?

  Changed 3 years ago by quozl

Seen four months ago also  http://dev.laptop.org/ticket/10131

  Changed 5 months ago by manuq

  • owner changed from benzea to manuq
  • priority changed from Unspecified by Maintainer to High
  • version changed from 0.88.x to 0.98.x
  • component changed from sugar-artwork to sugar
  • severity changed from Minor to Major

This is still happening after the port to GTK+3, I have seen this occasionally. Was reported also at #4348.

  Changed 5 months ago by manuq

  • milestone changed from Unspecified by Release Team to 1.0

  Changed 3 months ago by erikos

Manuel, just found a way to force it and reproduce it: doing several left and right clicks on the XO menu can get us the black menu.

  Changed 3 months ago by erikos

Same steps (quick left and right clicks) do work as well for the frame device icons. And extensive forcing can turn an AP Palette as well all black.

Works as well with a rapid sequence of touches.

  Changed 3 months ago by erikos

  • summary changed from Occasional black context menus on os300py on XO-1 to Occasional black Palettes

  Changed 3 months ago by carrott

I am able to reproduce this on XO-4 13.1.0 build 32 with touch screen interactions. In addition I managed to stop the touchscreen and mouse working while trying to reproduce this.

follow-up: ↓ 11   Changed 3 months ago by manuq

I'm adding logging, still couldn't find what's happening. Looks like an issue of palettes with an invoker that has toggle_palette property set to True.

I commented out the do_draw override method of _PaletteWindowWidget(Gtk.Window) but this doesn't solve the problem.

Changed 3 months ago by manuq

  Changed 3 months ago by manuq

I have also checked the size of the widget that the _PaletteWindowWidget contains, in case it is getting a null size. But looks correct too:

@@ -687,6 +694,9 @@ class PaletteWindow(GObject.GObject):
             self.on_leave()
 
     def __show_cb(self, widget):
+        child = widget.get_children()[0]
+        alloc = child.get_allocation()
+        logging.debug("MANUQ PaletteWindow __show_cb %r", (alloc.width, alloc.height))
         if self._invoker is not None:
             self._invoker.notify_popup()

in reply to: ↑ 9   Changed 3 months ago by erikos

Replying to manuq:

I'm adding logging, still couldn't find what's happening. Looks like an issue of palettes with an invoker that has toggle_palette property set to True.

It is true that the toggle Palette is at least our path for triggering the issue with the high sequence of clicks to invoke the Palette, the Palette is then forced to popup/popdown and draw the Palette quickly.

If you check on 12.1.0, where the Palettes are not toggable, I can not use our test case to trigger the issue. (this does not mean the issue is not there on older builds, but can probably only triggered through other means and is likely more rare).

Changed 3 months ago by manuq

Patch: prevent fast popup popdown

follow-up: ↓ 13   Changed 3 months ago by manuq

I think the attached patch is the way to go. After palette popdown, we prevent popping it up again for a few milliseconds. The user interaction is not affected.

in reply to: ↑ 12 ; follow-up: ↓ 14   Changed 3 months ago by erikos

Replying to manuq:

I think the attached patch is the way to go. After palette popdown, we prevent popping it up again for a few milliseconds. The user interaction is not affected.

I can still see the issue with this patch applied (XO-4 os34).

in reply to: ↑ 13   Changed 3 months ago by manuq

Replying to erikos:

I can still see the issue with this patch applied (XO-4 os34).

Thanks, on that first patch I missed the CursorInvoker. Now it should work on all palettes. I improved the code names and comments too.

  Changed 3 months ago by manuq

Forget the patch. It makes is more difficult to trigger the issue but is still easily reproduceable. We should see how to prevent the inconsistent state following the signals handling.

  Changed 2 months ago by manuq

Adding logging we can see _PaletteWindowWidget method do_draw stops being called at the point the issue starts to happen. Also adding a callback to the 'draw' signal of the same window shows that the callback stops being called.

The issue goes away if we remove set_resizable(False) in the _PaletteWindowWidget constructor. This makes the palette resizable though. We can sort out the user resizing the palette adding set_has_resize_grip(False). But we'll still have to sort out how to go back to the size of the palette containing only the header. Patch attached for testing.

Changed 2 months ago by manuq

Remove resizable false, and add some logging

  Changed 2 months ago by manuq

I tried to sort out the palette not shrinking to content of the previous patch, forcing a resize after the content hides. The issue appears again. So indeed the problem is in the resizing of the window.

Changed 2 months ago by manuq

Sort out palette shrink, the issue appears again

Note: See TracTickets for help on using tickets.