GNOME Bugzilla – Bug 335083
multi display: crash if second display disconnects
Last modified: 2006-03-19 11:22:37 UTC
Please describe the problem: In GIMP 2.3, image windows can be moved to another X display after opening that display with the View->Move to Screen menu. After GIMP opens a second display, if it loses the connection to that display (server shutdown, xkill, etc) the whole application aborts. Steps to reproduce: 1. Open an image 2. View->Move to Screen->Open Display and connect to another X server. I used an SSH connection from another machine with X forwarding, Xnest or maybe Xvnc should work also. 3. Optional: move an image window to the new screen (it's already connected, so it will still crash without doing this) 4. Terminate the remote X server Actual results: GIMP prints the following on the terminal and exits with status 1 The application 'gimp-2.3' lost its connection to the display localhost:10.0; most likely the X server was shut down or you killed/destroyed the application. (script-fu:1563): LibGimpBase-WARNING **: script-fu: wire_read(): error Expected results: GIMP should gracefully disconnect from the display, but otherwise continue running and delete any windows on the affected display, or move them to another display. I think the best solution would be moving a window back only if the image doesn't have any windows on active displays. Does this happen every time? yes Other information:
Opening other displays is a toy testing feature added in order to get proper display migration support into GTK+ (see bug #85715). It will definitely not work with anything but the latest unstable GTK+ version (preferable CVS HEAD). Apart from that, you can't just close the X display any expect applicaions to handle that gracefuly. The application must call gdk_display_close() beforehand. This may change in the future, but that's the current state off affairs. And you probably noticed that the "Open display" dialog says: "Experimental multi-display stuff! Click OK and have fun crashing GIMP..." Closing as duplicate of the resp. GTK+ bug. *** This bug has been marked as a duplicate of 85715 ***