git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-gui: suppress the X error on exit

From
JMJindrich Makovicka <makovick@gmail.com>
Date
Dec 4, 2009, 09:28 UTC
Message-ID
<20091204102844.3c720b21@starbug.prg01.itonis.net>
Hi,

Due to a bug in Tk, git-gui almost always (unless git-gui is closed right after starting) produces an X window error message on exit, something like

X Error of failed request:  RenderBadPicture (invalid Picture parameter)
  Major opcode of failed request:  150 (RENDER)
  Minor opcode of failed request:  7 (RenderFreePicture)
  Picture id in failed request: 0x3a000dc
  Serial number of failed request:  1965
  Current serial number in output stream:  1980
Respective Tk bug report is here:
http://sourceforge.net/tracker/?func=detail&atid=112997&aid=1821174&group_id=12997

This bug is triggered only when the send command is blocked via rename send {} . The following patch re-enables send just before quiting git-gui to suppress the error.

--- git-gui~ 2009-11-17 23:28:30.000000000 +0100 +++ git-gui 2009-12-03 23:32:50.848588924 +0100

@@ -2023,6 +2023,10 @@
 	}
 
 	set ret_code $rc
+
+	# briefly re-enable send to suppress the RenderBadPicture error
+	tk appname [appname]
+
 	destroy .
 }
 
Next: Shawn O. Pearce
Message 1 of 2 in “git-gui: suppress the X error on exit”
  1. git-gui: suppress the X error on exitJindrich Makovicka, Dec 4, 2009
  2. Shawn O. PearceDec 4, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.