Anonymous559581

We are creating a reporting application in C++ since 1993. It always worked flawlessly, but now we have encountered a problem with Windows Vista. We are using direct Win API calls, no MFC or anything like that.

The problem is: we output text in our report-preview (a simple window) using ExtTextOut(). If we jump from one page to another, which means that the whole window is redrawn, some lines of text are not shown. This occurs by random, sometimes - for the same page! - all lines are shown, then line 41 to 45 is missing, then line 32 to 33, etc.

Disabling Clear-Type does not help, but if we switch Vista to "Classic Design", the bug disappears.

We have also found out that setting BkgMode = OPAQUE (instead of transparent) solves the problem.

We think this is a bug in Vista. Any comments or ideas

Regards
Thorsten Radde
IDEAL Software GmbH
www.IdealSoftware.com




Re: Application Compatibility for Windows Vista Text Disappearing (ExtTextOut, BkgMode transparent)

donelder

I tried changing some of my apps TextOut calls to ExtTextOut with a transparent background and could not repeat the problem on Vista with AERO desktop composition turned on.

Are you using the rectangle arguments Does it help to NULL them out

Are you drawing to a WM_PAINT DC or just getting a DC from a Window

Do all the arguments to your ExtTextOut call look good when you step through in debug mode





Re: Application Compatibility for Windows Vista Text Disappearing (ExtTextOut, BkgMode transparent)

Anonymous

First of all, thank you for your reply. This is really a serious problem, which threatens our company.

We are always painting in response to a WM_PAINT message.

The arguments are ok, the same code is running since at least 10 years on Win95 up to WinXP: fuOptions is zero and lprc is NULL. We are using lpDX, we tried setting this to NULL also, but without success: still some lines of text missing by random.

The most weird thing is: we inserted a MoveTo(x, y) - which are the coordinates for the ExtTextOut call and a LineTo(x + 100, y). We did this to verify that the code is executed for all text lines, so the problem can be nailed down to the ExtTextOut call. If there would have been some line drawings missing, we would have known that the problem is somewhere else. But to our surprise the lines were drawn and NO single text line was missing. Really weird! The MoveTo / LineTo code was added directly *behind* the ExtTextOut call. Since it is called afterwards, it can not have any influence to the ExtTextOut call, so this is rather a problem of a buffer, cache or area update ( ).

We have no clue to this problem. It must be somewhere in Vista or in the graphics driver (nVidia). We are using the graphics driver which was shipped with Vista. We are using 64-bit Vista and our software is 32-bit. The problem was reported by a customer who is using 32-bit Vista.

If it is of any help, we can provide an executable which makes the problem reproduceable.

Regards
Thorsten Radde




Re: Application Compatibility for Windows Vista Text Disappearing (ExtTextOut, BkgMode transparent)

donelder

I'll be happy to download an exe if you want to post it. I can try it on my 32 bit Vista system today and my 64 bit system tomorrow at the office.

To see if it a timing issue, you might try using individual static memory blocks that do not get reset between calls to ExtTextOut. Vista does that whole off-screen composition thing when desktop composition is active which always makes one wonder about timing and persistence of buffers.

Also to see if it is API related you might try DrawText and TextOut to see if that makes any difference in the disappearances.





Re: Application Compatibility for Windows Vista Text Disappearing (ExtTextOut, BkgMode transparent)

Anonymous

This seems to be a misunderstanding. When we simply draw a horizontal line in each line we output text, then the bug disappears. So when I say: "this seems to be a buffer, cache or area update problem", I mean a problem inside Vista or the graphics driver.

Using DrawText or TextOut is not an option.

I created a test application, you can download it at: http://www.IdealSoftware.com/vistabug.zip

After running the executable, you can use the screen-up/down keys to scroll forward and backward from one page to the other. It takes some time, but sooner or later you will notice randomly missing lines.

Thanks for your help.

Regards
Thorsten Radde




Re: Application Compatibility for Windows Vista Text Disappearing (ExtTextOut, BkgMode transparent)

donelder

I tried your exe on all my Vista systems, both 32 and 64 bit, with a variety of video cards, both Radeon and NVidia, and saw the problem on each system.

However, loading your exe under Appverifier on a Vista system gives an address exception error the first time I attempt to scroll forward a page.

Maybe, the missing lines are a side effect of some memory overwrite that normally goes undetected.





Re: Application Compatibility for Windows Vista Text Disappearing (ExtTextOut, BkgMode transparent)

Anonymous

I downloaded and installed AppVerifier. It does not report any problems and there is no address exception error. I also doubt that the code of interest has any memory problems, because it is developed since 14 years now and it is running solid on millions of PCs. Amongst many other applications, it is used here in germany to print tax forms for the software of the german internal revenue service (which is distributed free of charge to any german household and to all tax advisors) as well as for a telephone-book CD-ROM. There have never been reported any problems of missing or garbled text.

Please note that simply adding the following two lines of code behind the call to ExtTextOut() makes the bug disappear:

ExtTextOut(hDC, x, y, ...)
MoveToEx(hDC, x, y, &pt)
LineTo(hDC, x + 100, y)

And please keep in mind that switching the BkgMode from TRANSPARENT to OPAQUE also makes the bug disappear. This does not point to a memory problem. It neither does point to a problem in our code.

Regards
Thorsten Radde




Re: Application Compatibility for Windows Vista Text Disappearing (ExtTextOut, BkgMode transparent)

donelder

Not arguing with anything you say. Just reporting what happened when I ran your program. Here is the App Verifier log:

The first chance exception occurs whether or not desktop composition is enabled.

< xml version="1.0" encoding="UTF-8" standalone="no" >
- <avrf:logfile xmlns:avrf="Application Verifier">
- <avrf:logSession TimeStarted="2007-04-02 : 08:42:33" PID="3436" Version="2">
- <avrf:logEntry Time="2007-04-02 : 08:42:36" LayerName="Heaps" StopCode="0x13" Severity="Error">
<avrf:message>First chance access violation for current stack trace.</avrf:message>
<avrfStick out tonguearameter1>458b000 - Invalid address causing the exception.</avrfStick out tonguearameter1>
<avrfStick out tonguearameter2>1002ead4 - Code address executing the invalid access.</avrfStick out tonguearameter2>
<avrfStick out tonguearameter3>12fa04 - Exception record.</avrfStick out tonguearameter3>
<avrfStick out tonguearameter4>12fa20 - Context record.</avrfStick out tonguearameter4>
- <avrfTongue TiedtackTrace>
<avrf:trace>vrfcore!VfCoreRedirectedStopMessage+81</avrf:trace>
<avrf:trace>vfbasics!VfBasicsStopMessage+1c9</avrf:trace>
<avrf:trace>vfbasics!AVrfpCheckFirstChanceException+139</avrf:trace>
<avrf:trace>vfbasics!AVrfpVectoredExceptionHandler+18</avrf:trace>
<avrf:trace>ntdll!itow+67</avrf:trace>
<avrf:trace>ntdll!RtlGetAce+2a1</avrf:trace>
<avrf:trace>ntdll!RtlGetAce+c7</avrf:trace>
</avrfTongue TiedtackTrace>
</avrf:logEntry>
</avrf:logSession>
</avrf:logfile>

When I load your sample exe under BoundsChecker on an XP system I see the following errors:

Type Quantity Location Sequence

Total Errors 64


API Failure 27


Invalid Value 1


Resource Error 36


DeleteDC usage error. Device Context still contains objects. 36 vpep3240.dll ! 0x000411A3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 56
Argument 1 in DeleteDC (HDC__ hdc = 0x870117CA) still contains non default/stock objects. Bitmap (0x50051EA5).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 57
Argument 1 in DeleteDC (HDC__ hdc = 0xA80121C3) still contains non default/stock objects. Bitmap (0x3E0517CA).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 58
Argument 1 in DeleteDC (HDC__ hdc = 0x0C012C42) still contains non default/stock objects. Bitmap (0x91053227).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 59
Argument 1 in DeleteDC (HDC__ hdc = 0xCB011DD3) still contains non default/stock objects. Bitmap (0x400517CA).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 60
Argument 1 in DeleteDC (HDC__ hdc = 0x090128DC) still contains non default/stock objects. Bitmap (0x93053227).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 61
Argument 1 in DeleteDC (HDC__ hdc = 0x19011772) still contains non default/stock objects. Bitmap (0x420517CA).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 62
Argument 1 in DeleteDC (HDC__ hdc = 0xE5011443) still contains non default/stock objects. Bitmap (0x95053227).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 63
Argument 1 in DeleteDC (HDC__ hdc = 0x6C01188B) still contains non default/stock objects. Bitmap (0x440517CA).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 64
Argument 1 in DeleteDC (HDC__ hdc = 0x18011E62) still contains non default/stock objects. Bitmap (0x9C053227).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 65
Argument 1 in DeleteDC (HDC__ hdc = 0x480117CA) still contains non default/stock objects. Bitmap (0x7F051593).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 66
Argument 1 in DeleteDC (HDC__ hdc = 0xCB011CFD) still contains non default/stock objects. Bitmap (0x55051CFB).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 67
Argument 1 in DeleteDC (HDC__ hdc = 0x83011593) still contains non default/stock objects. Bitmap (0xA2053227).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3
C:\Temp\vpep3240.dll!0x00035fd2

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 68
Argument 1 in DeleteDC (HDC__ hdc = 0x10010E5D) still contains non default/stock objects. Bitmap (0x57051CFB).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 69
Argument 1 in DeleteDC (HDC__ hdc = 0x47012980) still contains non default/stock objects. Bitmap (0xA4053227).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 70
Argument 1 in DeleteDC (HDC__ hdc = 0xDF0115BE) still contains non default/stock objects. Bitmap (0x59051CFB).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 71
Argument 1 in DeleteDC (HDC__ hdc = 0xD9012ABE) still contains non default/stock objects. Bitmap (0xA6053227).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00035fd2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 74
Argument 1 in DeleteDC (HDC__ hdc = 0x04011558) still contains non default/stock objects. Bitmap (0xA7050B4D).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x000420f2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 75
Argument 1 in DeleteDC (HDC__ hdc = 0xBE011CFD) still contains non default/stock objects. Bitmap (0xF50523AD).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x000420f2


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 76
Argument 1 in DeleteDC (HDC__ hdc = 0x080123AD) still contains non default/stock objects. Bitmap (0xBF050C06).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 77
Argument 1 in DeleteDC (HDC__ hdc = 0x6F011A3B) still contains non default/stock objects. Bitmap (0x06051EA5).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 78
Argument 1 in DeleteDC (HDC__ hdc = 0xD7010C06) still contains non default/stock objects. Bitmap (0x1D051FA6).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 79
Argument 1 in DeleteDC (HDC__ hdc = 0x66011EC7) still contains non default/stock objects. Bitmap (0x3F052B44).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 80
Argument 1 in DeleteDC (HDC__ hdc = 0xFB011772) still contains non default/stock objects. Bitmap (0x4C052B44).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 81
Argument 1 in DeleteDC (HDC__ hdc = 0xC3010C06) still contains non default/stock objects. Bitmap (0x59052B44).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 82
Argument 1 in DeleteDC (HDC__ hdc = 0xED01161D) still contains non default/stock objects. Bitmap (0x66052B44).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 83
Argument 1 in DeleteDC (HDC__ hdc = 0x82010C06) still contains non default/stock objects. Bitmap (0x73052B44).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 84
Argument 1 in DeleteDC (HDC__ hdc = 0x03012874) still contains non default/stock objects. Bitmap (0x0105254E).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 85
Argument 1 in DeleteDC (HDC__ hdc = 0xB5011BFB) still contains non default/stock objects. Bitmap (0x0E05254E).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 86
Argument 1 in DeleteDC (HDC__ hdc = 0x40011B46) still contains non default/stock objects. Bitmap (0x45051653).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 87
Argument 1 in DeleteDC (HDC__ hdc = 0x09011772) still contains non default/stock objects. Bitmap (0x1A050C06).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 88
Argument 1 in DeleteDC (HDC__ hdc = 0xA7011558) still contains non default/stock objects. Bitmap (0x27050C06).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 89
Argument 1 in DeleteDC (HDC__ hdc = 0xD4012091) still contains non default/stock objects. Bitmap (0x34050C06).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 90
Argument 1 in DeleteDC (HDC__ hdc = 0x56011CFB) still contains non default/stock objects. Bitmap (0x41050C06).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 91
Argument 1 in DeleteDC (HDC__ hdc = 0x4D011E62) still contains non default/stock objects. Bitmap (0x4E050C06).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpptest.exe!0x000013f3


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 92
Argument 1 in DeleteDC (HDC__ hdc = 0x7B012980) still contains non default/stock objects. Bitmap (0x6C052B44).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00042135


DeleteDC usage error. Device Context still contains objects. 1 vpep3240.dll ! 0x000411A3 93
Argument 1 in DeleteDC (HDC__ hdc = 0x9801179C) still contains non default/stock objects. Bitmap (0x6E052B44).

Current Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x000411a3

Bitmap Selection Call Stack - Thread 0 [0x13DC]
C:\Temp\vpep3240.dll!0x00040f00
C:\Temp\vpep3240.dll!0x00042135


The DeleteDc errors happen each time the PageDown or PageUp key is pressed.






Re: Application Compatibility for Windows Vista Text Disappearing (ExtTextOut, BkgMode transparent)

Anonymous

We have fixed all problems reported by AppVerifier and Boundschecker. None of them was related to the code that outputs the text lines. There was a small bug in the keyboard event handler and one in the code for drawing the toolbar (btw, this code was taken 1:1 from a Microsoft code sample).

The bug with missing lines of text is still there. You can download the updated version at the same URL (http://www.IdealSoftware.com/vistabug.zip).

Thanks for your help.

Regards
Thorsten Radde




Re: Application Compatibility for Windows Vista Text Disappearing (ExtTextOut, BkgMode transparent)

donelder

Other than suggesting you read the following article, which has some scary stuff about how info retrieved from DCs is not reliable when desktop composition is enabled, I'm out of ideas. I notice your app has references to SaveDC, RestoreDC, and ResetDC.

http://msdn2.microsoft.com/en-us/library/aa969536.aspx

You may just have to turn off Desktop Composition for your app if there is just no way to be compatible or if there is a bug in Desktop Composition - net effect for you is the same, that unpleasant flash as Desktop Composition goes off.

I found a discussion in a blog recently that discussed in a lot of detail how the whole off-screen composition happened and the timing considerations involved in how often the off-screen composed windows were BLTed back to the display.

I noticed with your background grid on, at least for me, no text disappeared.

Everything I've read to date about the off screen composition sounds like a kludge, but I think its one that MS will stick with and probably gradually make it work better.





Re: Application Compatibility for Windows Vista Text Disappearing (ExtTextOut, BkgMode transparent)

Anonymous

SaveDC and RestoreDC are not called in the code path of painting the text. ResetDC is only used on printers.

This is definitely a severe bug in Windows Vista. This can also be verified by raising the zoom factor in our preview: if text is missing, just scroll up or down and the text appears. BUT our software does only update the new regions which are scrolled into the view. So this indicates that our software did output the text, but Vista did not copy the updated regions from the back-buffer to the screen.

We can not release our software for Vista unless this bug is fixed. This is heavily threatening our business!

Is this all help we can get from Microsoft Isn't Microsoft going to fix this serious bug immediately

Or can Microsoft at least provide technical support on how we can force Vista to recognize the updated regions and to do the painting correctly

Regards
Thorsten Radde





Re: Application Compatibility for Windows Vista Text Disappearing (ExtTextOut, BkgMode transparent)

donelder

I tried to duplicate your problem with a simple program that duplicates your call to ExtTextOut.

I cannot make it show the same failure you are seeing with ExtTextOut.

Are you positive that you are not skipping any WM_PAINT messages due to any internal calculations

The WM_PAINT that I used is shown below. Elsewhere in the program an accelerator is mapped to an InvalidateRect that forces a repaint.

case WM_PAINT:
{
hdc = BeginPaint(hWnd, &ps);
// TODO: Add any drawing code here...

WCHAR szNewTitle[200];
wsprintf(szNewTitle,L"rcPaint: left:%d, top:%d, right:%d, bottom:%d, fErase:%d",ps.rcPaint.left,ps.rcPaint.top,ps.rcPaint.right,ps.rcPaint.bottom,ps.fErase);
SetWindowText(hWnd,szNewTitle);

HBRUSH hbrYellow=CreateSolidBrush(RGB(128,128,0));
FillRect(hdc,&ps.rcPaint,hbrYellow);
DeleteObject(hbrYellow);

int nPixInch=GetDeviceCaps(hdc,LOGPIXELSY);
HFONT hfont = CreateFont((-9*nPixInch)/72, 0, 0, 0, 700, 0, 0, 0, 0, 0, 0, 0, 0, L"Segoe UI");

HFONT hfOld=(HFONT)SelectObject(hdc,hfont);
WCHAR szTest[]=L"12345 12345 12345 12345 12345 12345 12345 12345";
SetBkMode(hdc,TRANSPARENT);

int dxArray[500];
int loop0;
for(loop0=0;loop0<500;loop0++)
dxArray[loop0]=12;

int loop;
for(loop=0;loop<40;loop++)
{
nLineCounter++;
WCHAR szLine[30];
wsprintf(szLine,L"%d",nLineCounter);
RECT rClipRect;

int y=((12*nPixInch)/72)*loop+15;
rClipRect.left=5;
rClipRect.top=y;
rClipRect.right=900;
rClipRect.bottom=y+(9*nPixInch)/72;

ExtTextOut(hdc,5,y,ETO_CLIPPED,&rClipRect,szLine,lstrlen(szLine),dxArray);

rClipRect.left=85;

ExtTextOut(hdc,85,y,ETO_CLIPPED,&rClipRect,szTest,lstrlen(szTest),dxArray);
}

SelectObject(hdc,hfOld);
DeleteObject(hfont);

EndPaint(hWnd, &ps);
}
break;






Re: Application Compatibility for Windows Vista Text Disappearing (ExtTextOut, BkgMode transparent)

Mo Nail - MFST

I did not find a known known bug for this issue. You should contact your Microsoft Partner support for your region and pursue this through that channel. Be prepared to provide a small code sample which reproduces the problem.

If it is determined to be a bug, you should not be charged.

https://partner.microsoft.com