From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20395 invoked by alias); 16 Jun 2013 21:48:41 -0000 Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com Received: (qmail 20385 invoked by uid 89); 16 Jun 2013 21:48:40 -0000 X-Spam-SWARE-Status: No, score=3.7 required=5.0 tests=AWL,BAYES_99,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,TW_CP,TW_XF,URIBL_BLACK autolearn=no version=3.3.1 Received: from p3plsmtpa06-01.prod.phx3.secureserver.net (HELO p3plsmtpa06-01.prod.phx3.secureserver.net) (173.201.192.102) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sun, 16 Jun 2013 21:48:39 +0000 Received: from [10.0.1.102] ([68.9.29.195]) by p3plsmtpa06-01.prod.phx3.secureserver.net with id p9oc1l0074CauTG019ocua; Sun, 16 Jun 2013 14:48:37 -0700 Message-ID: <51BE32B4.7020309@codespunk.com> Date: Sun, 16 Jun 2013 21:48:00 -0000 From: "Matt D." User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 MIME-Version: 1.0 To: cygwin-xfree Subject: Re: Cygwin/X crashes when combined with ssh/nx tunneling and -multiwindow References: <51BCFAF7.5060107@dronecode.org.uk> In-Reply-To: <51BCFAF7.5060107@dronecode.org.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00036.txt.bz2 > I've applied a fix to address the immediate problem of not checking > for the failure, and I've uploaded a snapshot at [1]. Perhaps you > could try that and see if it fixes the issue for you? Yes, this solves the crash problem (thank you!). > I would also be interested to know how the icon for the window which > was causing this issue appears. I've attached some screenshots of the taskbar and titlebar icons for Eclipse 4.2 using your XWin.exe build running with an without nx. The titlebar icon does NOT appear when running Eclipse with vanilla X. The taskbar icon also uses full colors; I do not know if it's a different icon or if nx is using some kind of compression. The second set of images (eclipse-4_2-nx_2 and eclipse-4_2-nonx_2) indicate the time of crash. When Eclipse starts up is displays a splash image which initially does not have an icon in its titlebar. Notably, a window border only appears when running Eclipse with nx. Despite not having a border, the icon is still relevant because it is the same one used to display in the taskbar. The crash occurs when the icon is being loaded onto the splash window. To reiterate, the window is NOT created with this icon. It is loaded sometime later while Eclipse is initializing. > Hmm... this seems to indicate that icon was of size -1x-1, which > doesn't seem right... Perhaps it has to do with the icon being applied after the window has already been created? > From the backtrace, it looks like the crash is occurring due to a > failure when converting the X11 icon to a Windows icon, and then not > checking properly for that failure. It looked to me like the crash was occurring at line 264 of icon_convert.c; a memcpy to DIB_pixels which I believe was uninitialized. Regardless, the memcpy is one without verifying DIB_pixels or checking the return value of CreateBitmap. This is what I has planned to look into.. if I ever get XWin.exe to compile. (I can't seem to send images to the mailing list, so here they are) These images illustrate the small titlebar icon and its accompanying taskbar icon: http://codespunk.com/files/upload/eclipse-4_2-nonx.png http://codespunk.com/files/upload/eclipse-4_2-nx.png These images show the splash image and the visible border when using nx: http://codespunk.com/files/upload/eclipse-4_2-nonx_2.png http://codespunk.com/files/upload/eclipse-4_2-nx_2.png On 2:59 PM, Jon TURNEY wrote: > On 15/06/2013 13:06, Matt D. wrote: >> "Caught signal 11 (Segmentation fault). Server aborting" >> >> So far I've only been able to duplicate this when tunneling Eclipse. I >> tried writing a simple java program that creates a JFrame window but could >> not replicate the crash with anything smaller (sorry!). The problem exists >> in the two versions I tried: Eclipse 3.6 and 4.2. > > I'm afraid your diagnosis is a bit speculative. > >> From the backtrace, it looks like the crash is occurring due to a failure when > converting the X11 icon to a Windows icon, and then not checking properly for > that failure. > > I've applied a fix to address the immediate problem of not checking for the > failure, and I've uploaded a snapshot at [1]. Perhaps you could try that and > see if it fixes the issue for you? If it does, I would also be interested to > know how the icon for the window which was causing this issue appears. > > [1] ftp://cygwin.com/pub/cygwinx/XWin.20130615-git-9a3cc6b8d6f94f74.exe.bz2 > >> Although the error message pops up, Cygwin/X doesn't actually terminate >> until the error window that reports the segfault is closed. X continues to >> work if I ignore it, however all of the newly created windows do not have >> any titlebars or frame borders. > > This is because the crash is occurring in the window manager thread, not the > server thread. > >> This problem does NOT occur when running with either a root window or with the '-rootless' option. >> >> I've attached the XWin backtrace. > > Thank you, this was very useful. > >> #27 0x0042c0fd in NetWMToWinIconAlpha (icon=0xff8d0030) >> at /usr/src/debug/xorg-server-1.14.1-1/hw/xwin/wmutil/icon_convert.c:264 >> hdc = >> ii = {fIcon = 1, xHotspot = 0, yHotspot = 0, hbmMask = 0x0, >> hbmColor = 0x0} >> bmh = {bV4Size = 108, bV4Width = -1, bV4Height = 1, bV4Planes = 1, >> bV4BitCount = 32, bV4V4Compression = 3, bV4SizeImage = 0, >> bV4XPelsPerMeter = 0, bV4YPelsPerMeter = 0, bV4ClrUsed = 0, >> bV4ClrImportant = 0, bV4RedMask = 16711680, bV4GreenMask = 65280, >> bV4BlueMask = 255, bV4AlphaMask = 4278190080, bV4CSType = 0, >> bV4Endpoints = {ciexyzRed = {ciexyzX = 0, ciexyzY = 0, >> ciexyzZ = 0}, ciexyzGreen = {ciexyzX = 0, ciexyzY = 0, >> ciexyzZ = 0}, ciexyzBlue = {ciexyzX = 0, ciexyzY = 0, >> ciexyzZ = 0}}, bV4GammaRed = 0, bV4GammaGreen = 0, >> bV4GammaBlue = 0} >> width = >> height = 0 >> pixels = 0xff8d0038 >> result = >> DIB_pixels = 0x0 > > Hmm... this seems to indicate that icon was of size -1x-1, which doesn't seem > right... > >> #28 NetWMToWinIcon (bpp=, icon=0xff8d0030) >> at /usr/src/debug/xorg-server-1.14.1-1/hw/xwin/wmutil/icon_convert.c:358 >> hasIconAlphaChannel = true >> versionChecked = true >> #29 0x0042c687 in winXIconToHICON (conn=0x802d0cf8, id=10485914, iconSize=32) >> at /usr/src/debug/xorg-server-1.14.1-1/hw/xwin/wmutil/icon_convert.c:438 >> mask = >> image = 0x0 >> imageMask = >> dst = >> src = >> planes = 1 >> bpp = 32 >> i = >> biggest_size = >> hDC = >> ii = {fIcon = -1812266357, xHotspot = 2150436088, >> yHotspot = 10485914, hbmMask = 0x1a19be, hbmColor = 0x20} >> hints = {flags = 11, input = 2150436088, initial_state = -2176016, >> icon_pixmap = 1975673360, icon_window = 1710526, icon_x = 1024, >> icon_y = -2175960, icon_mask = 1975680452, >> window_group = 1975680403} >> hIcon = 0x0 >> biggest_icon = >> _XA_NET_WM_ICON = 235 >> generation = 1 >> icon = >> icon_data = >> size = >> cookie = >> reply = 0xff890008 >> #30 0x004085ff in winUpdateIcon (hWnd=0x1a19be, pDisplay=0x8028efd8, >> id=10485914, hIconNew=0x0) >> at /usr/src/debug/xorg-server-1.14.1-1/hw/xwin/winmultiwindowicons.c:71 >> conn = 0x802d0cf8 >> hIcon = >> hIconSmall = 0x0 >> hIconOld = >> #31 0x0041d987 in UpdateIcon (iWindow=10485914, pWMInfo=) >> at /usr/src/debug/xorg-server-1.14.1-1/hw/xwin/winmultiwindowwm.c:666 >> hWnd = 0x1a19be >> hIconNew = >> attr = {x = 2014, y = 389, width = 452, height = 302, >> border_width = 0, depth = 24, visual = 0x802dc4e0, root = 534, >> class = 1, bit_gravity = 1, win_gravity = 1, backing_store = 0, >> backing_planes = 4294967295, backing_pixel = 0, save_under = 0, >> colormap = 10485886, map_installed = 0, map_state = 2, >> all_event_masks = 6537343, your_event_mask = 0, >> do_not_propagate_mask = 0, override_redirect = 0, >> screen = 0x802dc430} >> #32 0x0041f3b9 in winMultiWindowWMProc (pArg=0x80046368) >> at /usr/src/debug/xorg-server-1.14.1-1/hw/xwin/winmultiwindowwm.c:928 >> pNode = 0x8031fab0 >> __cleanup_handler = {function = 0x41d260, >> arg = 0x0, next = 0x0} >> pProcArg = 0x80046368 >> pWMInfo = 0x80046378 >> #33 0x610ffe1a in pthread::thread_init_wrapper(void*)@4 (arg=0x80040090) >> at /usr/src/debug/cygwin-1.7.20-1/winsup/cygwin/thread.cc:1947 >> thread = 0x80040090 >> __PRETTY_FUNCTION__ = "static DWORD pthread::thread_init_wrapper(void*)" >> ret = >> #34 0x6108974c in thread_wrapper (arg=0x0) >> at /usr/src/debug/cygwin-1.7.20-1/winsup/cygwin/miscfuncs.cc:600 >> dealloc_addr = >> count = >> wrapper_arg = {func = 0x0, arg = 0x0, stackaddr = 0x0, >> stackbase = 0x0, stacklimit = 0x0} >> old_start = 0x610d9285<_sigbe> > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/