http://bugs.winehq.org/show_bug.cgi?id=9506
Summary: One-line Java program causes screen to go black Product: Wine Version: CVS/GIT Platform: Other OS/Version: other Status: NEW Keywords: download Severity: normal Priority: P2 Component: wine-directx-ddraw AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
Hey, kids, try this! (Works with any JVM, but let's use a recent one.)
1. Create the file bug.java containing
import java.awt.Frame;
public class bug { public static void main(String[] args) { Frame f = new Frame(); // causes whole screen to go black in wine! } }
2. Compile it using any java compiler: javac bug.java
3. Download a JDK from java.sun.com and install it in Wine
4. Use it to run bug.class, e.g. cd '.wine/drive_c/Program Files/Java/jre1.6.0_01' cp ~/bug.class . wine bin/java.exe bug
5. Note that entire primary display goes black (second display, if any, doesn't). This is really annoying - you have to move your other windows around to get them to redraw.
This may be the same as bug 4902, but this seems simpler to reproduce. Next step would be the corresponding trivial C file...
http://bugs.winehq.org/show_bug.cgi?id=9506
--- Comment #1 from H. Verbeet hverbeet@gmail.com 2007-08-28 17:54:57 --- Just to verify, does passing "-Dsun.java2d.noddraw=true" to the JVM help?
http://bugs.winehq.org/show_bug.cgi?id=9506
--- Comment #2 from Dan Kegel dank@kegel.com 2007-08-29 12:00:47 --- Yes, passing that option causes the program to run quietly, without nuking the display.
http://bugs.winehq.org/show_bug.cgi?id=9506
Stefan Dösinger stefandoesinger@gmx.at changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine-bugs@winehq.org, | |stefandoesinger@gmx.at AssignedTo|wine-bugs@winehq.org |stefandoesinger@gmx.at
--- Comment #3 from Stefan Dösinger stefandoesinger@gmx.at 2007-09-13 19:10:29 --- Yeah, this bug sounds very much like 4902. This problem occurs if applications create a windowed DirectDraw object with a the target window = NULL(which means the whole screen), then locks it and unlocks it. When the surface is created, it is initialized to black. The application does not modify it after locking, and on unlock, the black is written to the screen.
I am not sure how to really fix this. The most obvious thing is to read the screen content into the surface when locking, so the old content will be written back on unlock. This is also needed because locking the primary surface can be used to make a Screenshot of the whole screen. The problem with this is that it has terrible performance impacts - quicktime plays at one frame every two secounds. Crossover has a hack that limits the readback to read-write locks just because it makes QuickTime happy, but it is not correct because a write-only lock has the same problem.
A workaround is to enable the OpenGL DirectDraw implementation. This works because it reads the opengl buffer into it's own surface copy, and the gl buffer is the screen content. However, the buffer modification tracking is not designed for this, so it may happen that an outdated copy of the Desktop is written back.
http://bugs.winehq.org/show_bug.cgi?id=9506
--- Comment #4 from Stefan Dösinger stefandoesinger@gmx.at 2007-09-13 19:11:24 --- (In reply to comment #3)
A workaround is to enable the OpenGL DirectDraw implementation.
Actually that won't work, OpenGL cannot render to the NULL hwnd.
http://bugs.winehq.org/show_bug.cgi?id=9506
Martin Jürgens martin@gamesplace.info changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |martin@gamesplace.info
http://bugs.winehq.org/show_bug.cgi?id=9506
--- Comment #5 from Martin Jürgens martin@gamesplace.info 2007-09-14 04:39:44 --- I can confirm this issue with latest Wine. Also happens to me when running the Battlefield Vietnam installer.
http://bugs.winehq.org/show_bug.cgi?id=9506
--- Comment #6 from Martin Jürgens martin@gamesplace.info 2007-09-14 04:40:19 --- *** Bug 9642 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=9506
--- Comment #7 from Martin Jürgens martin@gamesplace.info 2007-09-14 04:42:10 --- Some wine output:
$ wine java.exe bug fixme:win:EnumDisplayDevicesW ((null),0,0x614ba8cc,0x00000000), stub! fixme:win:EnumDisplayDevicesW ((null),1,0x614ba8cc,0x00000000), stub! fixme:win:EnumDisplayDevicesW ((null),0,0x614cb8e8,0x00000000), stub! fixme:d3d:IWineD3DDeviceImpl_GetAvailableTextureMem (0x123588) : stub, simulating 64MB for now, returning 64MB left fixme:ddraw:IDirectDrawImpl_SetCooperativeLevel (0x11e910)->((nil),00001008) fixme:ddraw:IDirectDrawImpl_SetCooperativeLevel (0x11e910)->((nil),00000008)
http://bugs.winehq.org/show_bug.cgi?id=9506
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE
--- Comment #8 from Dan Kegel dank@kegel.com 2007-12-10 06:51:18 --- Dup.
*** This bug has been marked as a duplicate of bug 1347 ***
http://bugs.winehq.org/show_bug.cgi?id=9506
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Austin English austinenglish@gmail.com 2008-09-15 16:09:50 --- Closing.
http://bugs.winehq.org/show_bug.cgi?id=9506
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |unspecified
http://bugs.winehq.org/show_bug.cgi?id=9506
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|directx-ddraw |directx-d3d