http://bugs.winehq.org/show_bug.cgi?id=28249
Summary: opengl program failed in Mac OS X 10.7, dead block at pglXCreateGLXPixmap() Product: Wine Version: 1.3.27 Platform: x86 OS/Version: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: opengl AssignedTo: wine-bugs@winehq.org ReportedBy: drangon.mail@gmail.com
My windows program use OpenGL, it runs fine in Mac OS X 10.6.x, but failed to run in Mac OS X 10.7.
My windows program code fragment is :
----------------------------------------------- PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), 1, PFD_DRAW_TO_WINDOW | /*PFD_DOUBLEBUFFER |*/ PFD_SUPPORT_OPENGL, PFD_TYPE_RGBA, 24, 0,0,0,0,0,0, 0,0,0,0,0,0,0, 32, 0,0, PFD_MAIN_PLANE, 0, 0,0,0, };
int wglPixelFormat = ::ChoosePixelFormat(m_hDC, &pfd); BOOL bSuccess = ::SetPixelFormat(m_hDC, wglPixelFormat, &pfd); ---------------------------------------------
the function SetPixelFormat() doesn't return, the process dead blocked.
I dig into wine source, it is block in the following function call : pglXCreateGLXPixmap(display, vis, parent);
http://bugs.winehq.org/show_bug.cgi?id=28249
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testcase
http://bugs.winehq.org/show_bug.cgi?id=28249
--- Comment #1 from drangon drangon.mail@gmail.com 2011-09-14 00:27:26 CDT --- Created an attachment (id=36387) --> (http://bugs.winehq.org/attachment.cgi?id=36387) backtrace
backtrace of error
http://bugs.winehq.org/show_bug.cgi?id=28249
--- Comment #2 from drangon drangon.mail@gmail.com 2011-09-14 00:28:18 CDT --- the backtrace of block is the following, ( see also the atachments ) :
(gdb) bt #0 0x9b1adb42 in select$DARWIN_EXTSN () #1 0x450428f3 in _xcb_in_read_block () #2 0x45042d05 in _xcb_in_read () #3 0x45041af5 in _xcb_conn_wait () #4 0x45043565 in xcb_wait_for_reply () #5 0x44f5056f in _XReply () #6 0x4536296d in XAppleDRICreatePixmap () #7 0x45356a9a in apple_glx_pixmap_create () #8 0x45364f72 in glXCreateGLXPixmap () #9 0x44d5bba6 in set_win_format [inlined] () at /opt/wine-zjg/src/wine-1.3.28/dlls/winex11.drv/window.c:622 #10 0x44d5bba6 in X11DRV_WindowMessage (hwnd=0x21696, msg=14, wp=186, lp=0) at window.c:2692 #11 0x42669fc4 in handle_internal_message (hwnd=0x21696, msg=<value temporarily unavailable, due to optimizations>, wparam=186, lparam=0) at message.c:1882 #12 0x4266a0dd in call_window_proc (hwnd=<value temporarily unavailable, due to optimizations>, msg=<value temporarily unavailable, due to optimizations>, wparam=186, lparam=0, unicode=1, same_thread=1, mapping=2949708) at message.c:2198 #13 0x4266fae1 in send_message (info=0x2d01b0, res_ptr=0x2d01dc, unicode=1) at message.c:3084 #14 0x42670005 in SendMessageW (hwnd=0x450428f3, msg=14, wparam=2947952, lparam=0) at message.c:3264 #15 0x44d47f90 in internal_SetPixelFormat (physDev=0xbb5de10, iPixelFormat=113, ppfd=<value temporarily unavailable, due to optimizations>) at opengl.c:1658 #16 0x43ff45c0 in SetPixelFormat (hdc=0x5ed8, iPixelFormat=113, ppfd=0x0) at painting.c:583 #17 0x4448aa84 in context_set_pixel_format (gl_info=0xbb70730, dc=0x5ed8, format=113) at context.c:725 #18 0x44493cfe in context_create (swapchain=0xbb95f70, target=0xbb6f268, ds_format=0xbb773d8) at context.c:1367 #19 0x4453b64d in wined3d_swapchain_create (device=0xbb7bf78, present_parameters=0x2d0910, surface_type=SURFACE_OPENGL, parent=0x0, parent_ops=0x44410aa0, swapchain=0x2d078c) at swapchain.c:1013 #20 0x443ca90e in device_parent_create_swapchain (device_parent=0x450428f3, present_parameters=0x2d0910, swapchain=0x2d078c) at ddraw.c:5789 #21 0x444a4b4c in wined3d_device_init_3d (device=0xbb7bf78, present_parameters=0x2d0910) at device.c:1277 #22 0x443c272b in ddraw_attach_d3d_device [inlined] () at /opt/wine-zjg/src/wine-1.3.28/dlls/ddraw/ddraw.c:2780 #23 ddraw_create_swapchain [inlined] () at /opt/wine-zjg/src/wine-1.3.28/dlls/ddraw/ddraw.c:2866 #24 0x443c272b in CreateSurface (ddraw=0xbb6b6e0, DDSD=0x2d0b84, Surf=0x2d09bc, UnkOuter=0x0, version=7) at ddraw.c:3255 #25 0x443c3341 in ddraw7_CreateSurface (iface=0xbb6b6e0, surface_desc=0x2d0b84, surface=0x184238c, outer_unknown=0x0) at ddraw.c:3319 #26 0x0036a2f9 in __wine_dos () #27 0x00369e7b in __wine_dos () #28 0x0036d2e5 in __wine_dos () #29 0x0034670d in __wine_dos () #30 0x0034c0ff in __wine_dos () #31 0x0033f19e in __wine_dos () #32 0x00484720 in __wine_dos ()
http://bugs.winehq.org/show_bug.cgi?id=28249
--- Comment #3 from Alexandre Julliard julliard@winehq.org 2011-09-14 02:18:05 CDT --- You should file a bug with Apple, and/or try a more recent XQuartz.
http://bugs.winehq.org/show_bug.cgi?id=28249
--- Comment #4 from drangon drangon.mail@gmail.com 2011-09-16 00:16:20 CDT --- I make some more test, it shows difference between top level window and sub window.
A simple dialog base application, there is a sub window in the dialog.
If I use the dialog window handle to create OpenGL context, it works file. If I use the sub window handle to create OpenGL context, all other code are the same, it block at the SetPixelFormat() function call.
What's difference between the top level window and the sub window ?
http://bugs.winehq.org/show_bug.cgi?id=28249
drangon drangon.mail@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #5 from drangon drangon.mail@gmail.com 2011-09-18 02:14:26 CDT --- It seems it's the bug of XQuartz.
http://xquartz.macosforge.org/trac/ticket/508
http://bugs.winehq.org/show_bug.cgi?id=28249
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Austin English austinenglish@gmail.com 2011-09-22 13:31:31 CDT --- Closing.
http://bugs.winehq.org/show_bug.cgi?id=28249
Roderick Colenbrander thunderbird2k@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zhao_jian@dahuatech.com
--- Comment #7 from Roderick Colenbrander thunderbird2k@gmail.com 2011-09-25 16:30:19 CDT --- *** Bug 28281 has been marked as a duplicate of this bug. ***