Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black screen on some machines #1

Open
w23 opened this issue Jun 24, 2018 · 7 comments
Open

Black screen on some machines #1

w23 opened this issue Jun 24, 2018 · 7 comments
Labels
bug Something isn't working

Comments

@w23
Copy link
Owner

w23 commented Jun 24, 2018

  • Windows 10, AMD 7850 2Gb
  • 1060 multiple monitors
@w23 w23 added the bug Something isn't working label Jun 24, 2018
@w23
Copy link
Owner Author

w23 commented Jun 24, 2018

A few debug binaries to test the issue on various machines: http://yolp.omgwtf.ru/appear_debug.zip

@lieff
Copy link

lieff commented Jun 24, 2018

Под вайном с 2мя мониторами:
appear_asm_safer.exe - окно постоянно исчезает и появляется, в момент когда окно видно вроде как все нормально.
Остальные - краш.

Unhandled exception: unimplemented function user32.dll.SetWindowFullScreenState called in 32-bit code (0x7b43d31c).
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:7b43d31c ESP:07eef5a4 EBP:07eef628 EFLAGS:00000212(   - --  I   -A- - )
 EAX:7b429a31 EBX:00000004 ECX:07eef5d0 EDX:07eef654
 ESI:7e8112c0 EDI:0042044b
Stack dump:
0x07eef5a4:  00000870 00000001 00000010 00000000
0x07eef5b4:  00000000 00000000 80000100 00000001
0x07eef5c4:  00000000 7b43d31c 00000002 7e8112c0
0x07eef5d4:  7e811443 07eef600 7e84c000 00000001
0x07eef5e4:  00113ec0 07eef648 72e68100 7e938320
0x07eef5f4:  7e84c000 7e7ded5b 7e84c000 07eef648
Backtrace:
=>0 0x7b43d31c in kernel32 (+0x1d31c) (0x07eef628)
  1 0x7e8110a7 in user32 (+0xa10a6) (0x07eef668)
  2 0x7e7799b1 in user32 (+0x99b0) (0x7e6b0000)
  3 0x004200db in appear_debug_nomusic (+0x200da) (0x7e6b0000)
  4 0x00000003 (0x00905a4d)
0x7b43d31c: addl        $12,%esp
Modules:
Module  Address                 Debug info      Name (55 modules)
PE        400000- 683b6eb       Export          appear_debug_nomusic
ELF     7a800000-7a93c000       Deferred        opengl32<elf>
  \-PE  7a820000-7a93c000       \               opengl32
ELF     7b400000-7b7ed000       Dwarf           kernel32<elf>
  \-PE  7b420000-7b7ed000       \               kernel32
ELF     7bc00000-7bd2a000       Deferred        ntdll<elf>
  \-PE  7bc40000-7bd2a000       \               ntdll
ELF     7c000000-7c004000       Deferred        <wine-loader>
ELF     7e1af000-7e1b6000       Deferred        libxfixes.so.3
ELF     7e1b6000-7e1c2000       Deferred        libxcursor.so.1
ELF     7e254000-7e286000       Deferred        libexpat.so.1
ELF     7e286000-7e2d1000       Deferred        libfontconfig.so.1
ELF     7e2d1000-7e2f0000       Deferred        libz.so.1
ELF     7e2f0000-7e32a000       Deferred        libpng16.so.16
ELF     7e32a000-7e3e7000       Deferred        libfreetype.so.6
ELF     7e3e7000-7e3fa000       Deferred        libxi.so.6
ELF     7e3fa000-7e3fe000       Deferred        libxcomposite.so.1
ELF     7e3fe000-7e40b000       Deferred        libxrandr.so.2
ELF     7e40b000-7e417000       Deferred        libxrender.so.1
ELF     7e417000-7e41e000       Deferred        libxxf86vm.so.1
ELF     7e41e000-7e439000       Deferred        libbsd.so.0
ELF     7e439000-7e465000       Deferred        libxcb.so.1
ELF     7e465000-7e5b0000       Deferred        libx11.so.6
ELF     7e5b0000-7e5c5000       Deferred        libxext.so.6
ELF     7e610000-7e6a1000       Deferred        winex11<elf>
  \-PE  7e620000-7e6a1000       \               winex11
ELF     7e6a1000-7e75a000       Deferred        winmm<elf>
  \-PE  7e6b0000-7e75a000       \               winmm
ELF     7e75a000-7e961000       Dwarf           user32<elf>
  \-PE  7e770000-7e961000       \               user32
ELF     7e961000-7e9db000       Deferred        advapi32<elf>
  \-PE  7e970000-7e9db000       \               advapi32
ELF     7e9db000-7eb09000       Deferred        gdi32<elf>
  \-PE  7e9f0000-7eb09000       \               gdi32
ELF     7eb09000-7eb2c000       Deferred        libtinfo.so.5
ELF     7eb2c000-7eb52000       Deferred        libncurses.so.5
ELF     7ee84000-7ee98000       Deferred        libnss_files.so.2
ELF     7ee98000-7eeb3000       Deferred        libnsl.so.1
ELF     7eeb3000-7efb5000       Deferred        libm.so.6
ELF     7efb8000-7efc2000       Deferred        librt.so.1
ELF     7efc2000-7efe6000       Deferred        imm32<elf>
  \-PE  7efd0000-7efe6000       \               imm32
ELF     7efe6000-7f000000       Deferred        version<elf>
  \-PE  7eff0000-7f000000       \               version
ELF     f7b10000-f7b14000       Deferred        libxinerama.so.1
ELF     f7b14000-f7b1b000       Deferred        libxdmcp.so.6
ELF     f7b1b000-f7b1f000       Deferred        libxau.so.6
ELF     f7b21000-f7b26000       Deferred        libdl.so.2
ELF     f7b26000-f7d02000       Deferred        libc.so.6
ELF     f7d02000-f7d21000       Deferred        libpthread.so.0
ELF     f7d22000-f7d30000       Deferred        libnss_nis.so.2
ELF     f7d62000-f7d6c000       Deferred        libnss_compat.so.2
ELF     f7d6c000-f7f37000       Dwarf           libwine.so.1
ELF     f7f39000-f7f61000       Deferred        ld-linux.so.2
ELF     f7f64000-f7f66000       Deferred        [vdso].so

@w23
Copy link
Owner Author

w23 commented Jun 24, 2018

@lieff интересно, спасибо. Думаю, впрочем, что это всё -- проблемы вайна. Удивительно, что под ним вообще запускается -- обычно большие-то демки не работают, не говоря уже о всякой мелочи, которая абьюзит всё, что можно и нельзя.

Наверное, отдельным интересным проектом было бы пропатчить вайн до состояния, в котором он бы успешно показывал большую часть OpenGL интр за последние лет 10. :D

@lieff
Copy link

lieff commented Jun 24, 2018

Ну это конечно вполне вероятно, но я, например, инициализирую примерно так же:

  const PIXELFORMATDESCRIPTOR pfd={ 0,1,PFD_SUPPORT_OPENGL|PFD_DOUBLEBUFFER, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0,0 };
  //DEVMODE dmScreenSettings={ 0,0,0,sizeof(DEVMODE),0,DM_PELSWIDTH|DM_PELSHEIGHT,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1024,768,0,0,0,0,0,0,0,0,0,0 };
  //ChangeDisplaySettings(&dmScreenSettings, CDS_FULLSCREEN);
  HWND hWnd = CreateWindow("edit", 0, WS_POPUP | WS_VISIBLE | WS_MAXIMIZE, 0, 0, 0, 0, 0, 0, 0, 0);
  HDC hDC = GetDC(hWnd);
  SetPixelFormat(hDC, ChoosePixelFormat(hDC, &pfd), &pfd);
  wglMakeCurrent(hDC, wglCreateContext(hDC));
  ShowCursor(0);

и у меня и на вайне и на винде работало норм.

@w23
Copy link
Owner Author

w23 commented Jun 24, 2018

Хм. Из существенных отличий вижу только то, что у меня не "edit", а "static" (не помню уже, почему).

@lieff
Copy link

lieff commented Jun 24, 2018

Основной луп:

for(;;) {
  pglUniform1f(u, time);
  time = (GetTickCount() - start)/1000.0;
  glRecti(1, 1, -1, -1);
  SwapBuffers(hDC);
  MSG msg;
  PeekMessage(&msg, hWnd, 0, 0, 1);
  if (GetAsyncKeyState(VK_ESCAPE))
      break;
}

@w23
Copy link
Owner Author

w23 commented Jan 17, 2019

I've been able to get my hands on a Windows machine with AMD GPU and it seems that the core of the issue is that I expect the created program to have name=1 (it is hardcoded), but on AMD it is two. Quick test of propagating this value using unused ESI register seems to fix the black screen, but it makes the intro 5 bytes over the size limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants