[Bug] Show desktop in Windows 10 crashes the emulator

Discussion of development and patch submission.
Post Reply
aybe
Posts: 4
Joined: Fri 27 Mar, 2015 6:38 pm

[Bug] Show desktop in Windows 10 crashes the emulator

Post 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
User avatar
omarsis81
Posts: 945
Joined: Thu 17 Dec, 2015 6:20 pm

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

Post 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
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

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

Post 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.
User avatar
rootfather
Posts: 5
Joined: Thu 23 Mar, 2017 4:30 pm

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

Post 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.
UPerschke
Posts: 72
Joined: Wed 25 May, 2016 7:43 pm

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

Post by UPerschke »

Same here, dedicated hardware (Core i5/GTX750Ti).
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

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

Post 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.
szadycbr
Posts: 295
Joined: Mon 21 Nov, 2016 6:23 pm

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

Post by szadycbr »

same here on win10 64bit. The change that Sarah made is for greater good, soon it will be thread-proof.
User avatar
gen_angry
Posts: 127
Joined: Sat 25 Feb, 2017 6:48 am

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

Post by gen_angry »

does it for me, I've just kept it on directdraw (cant tell if any performance penalty)

Win10 x64, GTX 1060
szadycbr
Posts: 295
Joined: Mon 21 Nov, 2016 6:23 pm

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

Post 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.
User avatar
gen_angry
Posts: 127
Joined: Sat 25 Feb, 2017 6:48 am

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

Post 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.
szadycbr
Posts: 295
Joined: Mon 21 Nov, 2016 6:23 pm

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

Post by szadycbr »

gen_angry , i know, i m just saying. no offence intended.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

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

Post 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.
A. Naim
Posts: 139
Joined: Thu 09 Jul, 2015 5:06 pm

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

Post 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.
User avatar
FredPJ
Posts: 31
Joined: Tue 15 Sep, 2015 1:55 pm

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

Post 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.
User avatar
rootfather
Posts: 5
Joined: Thu 23 Mar, 2017 4:30 pm

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

Post 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
Last edited by rootfather on Sun 09 Jul, 2017 8:59 am, edited 1 time in total.
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

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

Post 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...
User avatar
rootfather
Posts: 5
Joined: Thu 23 Mar, 2017 4:30 pm

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

Post by rootfather »

JosepMa, thanks a lot!

I just run a few quick tests, and your fix actually works for me!
basic2004
Posts: 124
Joined: Sun 08 Jan, 2017 5:59 pm

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

Post 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.
Post Reply