Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] (PR#12849) Client crash, 2.0.0 Win32 - science dialog?
Home

[Freeciv-Dev] (PR#12849) Client crash, 2.0.0 Win32 - science dialog?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jacobn+freecivrt@xxxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#12849) Client crash, 2.0.0 Win32 - science dialog?
From: "James Canete" <use_less@xxxxxxxxxxx>
Date: Fri, 22 Apr 2005 02:09:01 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12849 >

> [jdorje - Fri Apr 22 06:37:23 2005]:
> 
> jacobn+freecivrt@xxxxxxxxxxxxxxxxxxxxxx wrote:
> 
> > Could it be a resource leak? IIRC Win9x has particularly low numbers
> > of various sorts of resources (typically 16384?). If every control
> > drawn in the game takes up one and doesn't free it (*waves hands*, I
> > don't entirely know what I'm talking about), then trouble could ensue.
> > I could imagine this not showing up on modern Windows (e.g., XP).
> 
> That's exactly the reason the GTK client doesn't run (well) on older
> versions of windows.  It doesn't even require a leak either.  Freeciv
> doesn't keep close track of how many resources it uses (AFAIK) so we
> could just be running over.
> 
> -jason
> 
 
I ran 2.0.0 for a while and monitored its GDI Objects count from Task
Manager, and it didn't seem to have any leaks.  You can give it a try if
you'd like.

Then, I had a thought.  The biggest change between Freeciv 1.14 and 2.0
that I can think of was the introduction of a common backing store to
the mapview.  This backing store is pretty large, since it's the same
size as the mapview.  At my resolution of 1600x1200, it can get as big
as 1200x1000.

And Freeciv 2.0.0 creates two of 'em, mapview_canvas.store and
mapview_canvas.tmp_store.  In Freeciv 1.14.x, it created only one, which
was gui-win32 specific.

Now, 1200x1000x4x2 = about 9.2 megs, stored in a pair of HBITMAPs.  I'm
not sure where GDI stores the info for these, but it's possible
whereever it's storing them, it's running out of memory.  

Anyway, how much ram is in your video card, and what res are you running? :)

As an aside, current CVS uses around 50-60 less GDI Objects than 2.0.0,
mostly because of my new cache code.  There have been a lot of changes
to the graphics code in gui-win32, though, so applying this patch
probably isn't an option.

-James Canete



[Prev in Thread] Current Thread [Next in Thread]