Page 1 of 1

[Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sun 19 Mar, 2017 11:57 pm
by aybe
With PCem v12 running under Windows 10, if I click 'Show desktop' icon on bottom-right of the screen, the application will silently crash. :(

When I mean silently is that the window simply disappears, I don't see the usual small window that offers to either debug it or close it.

Let me know if you need more details.

Thanks !

EDIT: this actually happens only when using Direct3D

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Mon 20 Mar, 2017 12:13 am
by omarsis81
Well, something similar happens to me in Windows 8.1
I didn't post it before because I don't exactly how to reproduce it, but sometimes I'm working with other applications and when I try to switch back to PCem I noticed it closed all of a sudden with no errors, it just disappears

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Mon 20 Mar, 2017 1:47 am
by leilei
This only happens to the Direct3D backend. Doesn't crash on Directdraw. Windows 7 x64

Similarly, locking the screen will crash for Direct3D

Code: Select all

onesec
LockRect failed
PIC1 : MASK B8 PEND 00 INS 00 VECTOR 08
PIC2 : MASK BF PEND 00 INS 00 VECTOR 70

I had a similar bug report earlier where it would've locked windows to it rather than crashing.

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sat 01 Apr, 2017 3:58 pm
by rootfather
I can confirm this bug. Using the Direct3D and then switching to the Desktop crashes PCem. I'm running Windows 10 with the latest updates on an Intel Core i5 with HD Graphics 620 and no dedicated graphics hardware.

Using the DirectDraw renderer is no option for me, because it frequently crashes.

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sat 01 Apr, 2017 4:34 pm
by UPerschke
Same here, dedicated hardware (Core i5/GTX750Ti).

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sat 01 Apr, 2017 4:38 pm
by Battler
These problems have started since Sarah moved the renderer to its own thread. Evidently the rendering code is not thread-safe enough yet.

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sat 01 Apr, 2017 9:56 pm
by szadycbr
same here on win10 64bit. The change that Sarah made is for greater good, soon it will be thread-proof.

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sun 02 Apr, 2017 7:06 am
by gen_angry
does it for me, I've just kept it on directdraw (cant tell if any performance penalty)

Win10 x64, GTX 1060

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sun 02 Apr, 2017 9:40 am
by szadycbr
Mr. Gen_angry, honestely i dont understand why people think performance on d3d could be faster?, it is only display inteface , it plays a role as a virtual monitor, it does not use any 3d or other complex instructions it only displays static image. as far as i remember ddraw was always much faster in displaying picture than d3d, simple interface using less resources, and if your emulated cpu runs at 90% and you got (example) 35fps in quake II or 40 in NFSIII then u can use Dshow as a display interface and it won be any faster or any slower. Now graphics cards are pretty fast, but back in the day i will use definetely ddraw cos it was much faster, today i dont think it makes any difference and soon or later ddraw will be obsolete.

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sun 02 Apr, 2017 6:00 pm
by gen_angry
szadycbr wrote:Mr. Gen_angry, honestely i dont understand why people think performance on d3d could be faster?, it is only display inteface , it plays a role as a virtual monitor, it does not use any 3d or other complex instructions it only displays static image. as far as i remember ddraw was always much faster in displaying picture than d3d, simple interface using less resources, and if your emulated cpu runs at 90% and you got (example) 35fps in quake II or 40 in NFSIII then u can use Dshow as a display interface and it won be any faster or any slower. Now graphics cards are pretty fast, but back in the day i will use definetely ddraw cos it was much faster, today i dont think it makes any difference and soon or later ddraw will be obsolete.
erm, I said I couldn't tell if there was a penalty or not. So performance wise to me, they're pretty equal.

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sun 02 Apr, 2017 6:12 pm
by szadycbr
gen_angry , i know, i m just saying. no offence intended.

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sun 02 Apr, 2017 8:15 pm
by SarahWalker
D3D is noticeably faster on some machines (eg mine), DirectDraw is faster on some others, on some systems they're about the same speed. Mainly driver issues I think.

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sun 02 Apr, 2017 8:54 pm
by A. Naim
SarahWalker wrote:D3D is noticeably faster on some machines (eg mine), DirectDraw is faster on some others, on some systems they're about the same speed. Mainly driver issues I think.
My guess would be that later graphics cards emulate DirectDraw using Direct3D.

But that's just a guess.

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sun 02 Apr, 2017 9:25 pm
by FredPJ
Actually, this is the same bug that I've reported many times since 2015:

https://pcem-emulator.co.uk/phpBB3/view ... 2050#p2050

It is one of the main reasons why I rarely use PCem, I use the Show Desktop button A LOT and DirectDraw mode doesn't look/perform nearly as good.

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sun 09 Jul, 2017 8:41 am
by rootfather
Hi Sarah,

may I bring this issue back to your attention? The bug still persists on the current codebase (I'm currently on 3145faba13c5). The DirectDraw renderer still crashes sometimes and is much slower on my system (hardly to reproduce, somewhat random). The Direct3D renderer always crashes when using the "back to desktop" button in the taskbar and somewhat frequently but also somewhat random when leaving the fullscreen using CTRL + ALT + PGDOWN. OS is WIndows 10, Intel HD Graphics 620. Latest updates and drivers.

I noticed that you made some changes to the direct3d/directdraw handling since v12. I have to mention that I don't really understand what you did there, I just can tell that you obviously did something to it.

Thanks in advance!
rootfather

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sun 09 Jul, 2017 8:44 am
by JosepMa
I didn't realize this was already reported. This is my fix for that: https://pcem-emulator.co.uk/phpBB3/view ... ?f=3&t=760 I really didn't thought that the bug was so old...

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sun 09 Jul, 2017 10:45 am
by rootfather
JosepMa, thanks a lot!

I just run a few quick tests, and your fix actually works for me!

Re: [Bug] Show desktop in Windows 10 crashes the emulator

Posted: Sun 09 Jul, 2017 4:27 pm
by basic2004
Thanks to fix!
I often turning my Windows 10 to lockscreen, PCem was crash silently when locking but this fixed after your patch.

[EDIT] PCem freezes only screen instead crashing when lock Windows 10. minimize and restore PCem, screen working back.