access violation in WM_PAINT not caught

前端 未结 6 827
伪装坚强ぢ
伪装坚强ぢ 2020-12-17 01:30

To test this problem I have written a minimal windows application. If I force an access violation in the WM_PAINT handler this exception never gets to the debug

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-17 02:04

    I've noticed that, when you have Aero enabled (which is by default in Vista), resizing windows tends to create many, many page faults. These aren't normal virtual memory-needs-to-be-paged-in faults, either. I suspect (though it's just a theory), that Aero redirects the graphics output to a protected chunk of memory, and catches the faults in order to know which bits of the visible surface need to be recomposited on the desktop. Perhaps that is eating other access violations as well.

提交回复
热议问题