Re: Errors locking offscreen surface if application heap is large
- From: "Phil Taylor" <ptaylor@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 5 Jan 2006 11:09:13 -0800
interesting problem.
DX7 still should have good debug output, have you turned the debug level all
the way up? DX7 you may still need to do this via the ini file, its been so
long since I worked with DX7 exclusively I cant recall.
just as an FYI, Surface.GetDC does a lock. If you comment out all your
GetDC/ReleaseDC code, does the failure go away? That would isolate this to
the DX-GDI interface. If so, one possible solution is to rewrite all your
text painting code to use D3D. Do you ever issue simultaneous locks?
"DmitriAtSun@xxxxxxxxxxxxxxxxx"
<DmitriAtSunnewsgroupsnospam@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6BF856BA-D16C-41EC-A836-2F4265744353@xxxxxxxxxxxxxxxx
>
> Thanks for your response.
>
> "Phil Taylor" wrote:
>
>> hard to say. I think the analysis in the report is suspect, its certainly
>> not related to some crufty old NT 4.0 DDraw 3.0 bug.
>
> That's just something (relatively) relevant we were able to find
> regarding
> this error by searching in msdn and other places.
>
>> how many machines tested on? whats the memory map for the machines, to
>
> Plenty, with different hw/os configurations, so this is not uncommon.
> Depending on systems' memory configuration the java's heap setting at
> which
> the failure occurs could be different. On my 1.5G WinXP (Dell precision
> 530?)
> it happens if more than 1.5G heap is requested.
>
> On another completely different system is my notebook (Dell 700m with
> 500m
> of ram with Intel i815 chipset), the failure point is something like 700
> megs).
>
> Basically, I'm pretty sure I can reproduce it on any system given some
> time
> to find the right heap setting.
>
>> understand whats already loaded into the process address space? and what
>> is
>> the largest contiguous block? and what are the physical and virtual
>> memory
>> settings? and whats the graphics hw/driver? all drivers for this hw show
>> this problem?
>
> I'll get back to you with the memory mapping settings, but I can
> reproduce
> the problem on my system with different video boards (nvidia, ati), so I
> doubt
> that this is a driver-specific issue.
>
>> on average, though, its hard to assume you can allocate more than 50% of
>> the
>> address space, which you are getting. at some point above that, things
>> begin
>> to fail.
>>
>> its not clear if its DDraw, or GDI since it appears a GetDC on a DDraw
>> surface is what fails based on comments, code is not forthcoming. its
>> also
>> not clear if its specific to a card/driver or machine config.
>
> Well, the most visible failure is actually the one that comes from the
> failing Lock.
>
>> this is going to be a hard bug to analyze. you need a few machines with a
>> few different memory configs, and a few different graphics card configs,
>> and
>> experiment.
>
> I realize that. Thanks for your help. As I mentioned, we've reproduced it
> on
> several systems (including a couple of notebooks, with intel and ati
> chipsets).
>
>> and run the app on a machine with the debug DX installed, and run the app
>> in
>> the debugger to capture the debug spew.
>
> I do have debug DX installed, but since we use DX7 there's not much
> we can capture.
>
> Thanks,
> Dmitri
>
>
>>
>> perhaps that more detail will let an accurate analysis of the problem
>> take
>> place.
>
>
>
>>
>>
>> "DmitriAtSun@xxxxxxxxxxxxxxxxx"
>> <DmitriAtSun@xxxxxxxxxxxxxxxxx@discussions.microsoft.com> wrote in
>> message
>> news:EB19CF77-9BAC-4FBA-A422-655B6A89529E@xxxxxxxxxxxxxxxx
>> > Hello,
>> >
>> > I have an application (it's Sun's java implementation) which could in
>> > some
>> > cases
>> > reserve large pieces of memory for heap and other stuff if requested by
>> > users.
>> >
>> > The app is DirectX7-based. We load ddraw.dll with LoadLibrary (and the
>> > call
>> > succeeds).
>> >
>> > In these conditions I see calls to Lock a plain offscrreen surface
>> > fail
>> > with DDERR_GENERIC, and also GetDC on offscreen surfaces fail
>> > occasionally
>> > with DDERR_CANTCREATEDC.
>> >
>> > For additional details, take a look at this bug report:
>> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6353972
>> >
>> > My question is: first, why would Lock fail in these conditions? Is this
>> > expected
>> > behavior?
>> >
>> > And second: is there any way to detect a situation when ddraw could
>> > fail
>> > because of (presumably) address space exaustion?
>> >
>> > Thanks,
>> > Dmitri
>> >
>>
>>
>>
.
- References:
- Re: Errors locking offscreen surface if application heap is large
- From: DmitriAtSun@newsgroups.nospam
- Re: Errors locking offscreen surface if application heap is large
- Prev by Date: Re: dx 5.0
- Next by Date: Re: compile error
- Previous by thread: Re: Errors locking offscreen surface if application heap is large
- Next by thread: How to use secondary display (video output) using DirectX?
- Index(es):
Relevant Pages
|