graphics >> LockRect failed: D3DERR_DRIVERINTERNALERROR

by T2R5c3NleQ » Wed, 05 Apr 2006 22:36:02 GMT

My application gets a D3DERR_DRIVERINTERNALERROR error returned from a
LockRect call on an OffScreen surface. I don't always get the error - it only
shows up on some graphics adapters but not all. I am running DX9c runtime
and have plenty of graphics memory left when the error is returned.

The app basically allocates several ( # varies) swap chains of say
720x480x4, several off screen surfaces of 720x480x2 or x4 (format doesn't
matter) and then tries to lock each offscreen surface. On one machine after
about a dozen lockrect calls, I get one that returns

Any ideas why I can get this error? I'm not out of memory at this point

The debug out looks like the follwoing:
Direct3D9: (INFO) :HalDevice Driver Style 9

Direct3D9: :DoneExclusiveMode
D3D9 Helper: Warning: Default value for D3DRS_POINTSIZE_MAX is
2.19902e+012f, not 1.58456e+029f. This is ok.
Direct3D9: :DoneExclusiveMode
Direct3D9: (ERROR) :Error trying to lock driver surface
D3D9 Helper: IDirect3DSurface9::LockRect failed: D3DERR_DRIVERINTERNALERROR

graphics >> LockRect failed: D3DERR_DRIVERINTERNALERROR

by legalize+jeeves » Thu, 06 Apr 2006 00:49:09 GMT

[Please do not mail me a copy of your followup]

=?Utf-8?B?T2R5c3NleQ==?= < XXXX@XXXXX.COM > spake the secret code
< XXXX@XXXXX.COM > thusly:

Have you tried contacting the developer relation address for the
driver manufacturer? ATI has XXXX@XXXXX.COM and NVidia has one too (I
don't remember what it is, though).
"The Direct3D Graphics Pipeline"-- code samples, sample chapter, FAQ:
< ~legalize/book/>
Pilgrimage: Utah's annual demoparty
< >

graphics >> LockRect failed: D3DERR_DRIVERINTERNALERROR

by T2R5c3NleQ » Thu, 06 Apr 2006 02:16:02 GMT

Yes and one of them is Intel since we are using an Intel 945 motherboard with
builtin graphics adapter. I've made contact but it is slow going to get to
someone who might actually know something about it. I also see the error on
another machine with an NVidia adapter. A machine with an ATI Radeon X800 XT
doesn't exhibit the problem.

graphics >> LockRect failed: D3DERR_DRIVERINTERNALERROR

by legalize+jeeves » Thu, 06 Apr 2006 05:12:55 GMT

[Please do not mail me a copy of your followup]

=?Utf-8?B?T2R5c3NleQ==?= < XXXX@XXXXX.COM > spake the secret code
< XXXX@XXXXX.COM > thusly:

Try working with nvidia then to understand the problem. Unfortunately
anything that says "driver internal error" isn't something that is
going to be documented in the SDK. You'll need to work with the
driver provider to get to the bottom of it.
"The Direct3D Graphics Pipeline"-- code samples, sample chapter, FAQ:
< ~legalize/book/>
Pilgrimage: Utah's annual demoparty
< >

Similar Threads

1. Surface::LockRect Failed before Present,why?



using a fresh installation of WinXP pro (DirectX 9.0c, SP1, Catalyst 4.10
for a X800pro), I did a new installation of Unreal II and Unreal Expanded

However the mentioned games (and some other too) keep crashing with an
D3DERR_DRIVERINTERNALERROR. This happens at least when trying to use the
fullscreen option or when changing some of the graphics details settings.

The critical error dialog tells the I should delete the unreal2.ini and
restart. As this helps for starting again it does not help when changing
the settings again.

Are there any known settings in game or in the Catalyst driver to work
around this problem? Using Windows 98SE before I did not encounter any
problems playing these games, however I used a GF2 Ti instead.

The OS is updated (without SP2 cause this seems to make more problems),
Norton AV 2003 is disabled, all drivers (motherboard, soundcard Audigy) are
up to date.

3. new Device() throws an exception message "-2005530585 (D3DERR_DRIVERINTERNALERROR)"

4. LockRect performance problem?

Hi everyone,

My game capture app needs to copy backbuffer data to memory. I first
GetBackBuffer, then CreateOffscreenPlainSurface (with
D3DPOOL_SYSTEMMEM), then GetRenderTargetData from the backbuffer into
the offscreen surface, and then - alas - LockRect the surface and
memcpy the bits.

Everything takes really fast, except one thing: the LockRect. it takes
around 50ms, on some games.

I tried using all the flags in LockRect (including D3DLOCK_DONOTWAIT!)
but to no avail

any ideas? any tricks?

thanks for _any_ thought,

5. Threading & LockRect?

6. what does LockBox() or LockRect() locks?

usualy i would do the following:

VolumeTexture->LockBox(0, &LockedBox, NULL, D3DLOCK_DISCARD));
memcpy(LockedBox.pBits, buffer, size);

when VolumeTexture is unlocked, where is my texture, in the graphic card' 
memory, or in the motherboard' memory? what does LockedBox.pBits points to?

if it points to the motherboard' memory, what happens after UnlockBox(), and 
how to speed it up?

memcpy transfers at ~1GBps.

i don't know the answer to this question, but i know this is a silly 
question. can someone please tell me where to find the answer to similar 
questions without starting a new topic each time?

7. IDirect3DSurface9::LockRect memory

8. lockRect problem in direct3d mobile during texturing

I wish to add a texture to a direct3d mobile application. Rather than
using createTextureFromFileX(...), I wish to create an empty texture
and then add data to it because the image data is readily available to
me in a buffer. So to reduce the time consumed in saving the data as a
bmp and then using createTextureFromFileX(..'xxx.bmp'..), I thought
I'll create an empty texture

D3DMXCreateTexture( g_pd3dmDevice, 									            D3DMX_DEFAULT,
D3DMX_DEFAULT, 1, 0, 									    D3DMFMT_UNKNOWN, vbpool,
&textureHolder );

Then I read somewhere of using lockRect to lock the texture buffer and
writing into it the image data. So,

HRESULT hr = textureHolder->LockRect( 0, &LockedRect, NULL, 0 );
if( hr == D3DM_OK )
	BYTE *textureBuf = (BYTE *) LockedRect.pBits;
	printf( "pitch of locked rect:%d\n", LockedRect.Pitch );
//      the image size : 256*256;  bit depth: 32;  bytes per pixel: 4;
image bufffer: pngImage
	for( int i=0; i<256; i++ )
		memcpy( textureBuf + (LockedRect.Pitch)*i,
				pngImage + 256*4*i,
				256*4 );
		printf( "%d \n", i );
else if( hr == D3DMERR_INVALIDCALL )
	Cleanup( );

Unfortunately, textureHolder->LockRect(..) returns D3DMERR_INVALIDCALL.
My program runs on windows mobile 5.0, on a HP PDA phone.
Can someone help me out here? Is there an error in my code, or is my
PDA not capable of doing this job?