[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-windows
Subject: Re: KPixampCache crash
From: Rivo Laks <rivolaks () hot ! ee>
Date: 2007-08-23 13:22:52
Message-ID: 200708231622.52658.rivolaks () hot ! ee
[Download RAW message or body]
Ühel kenal päeval (neljapäev 23 august 2007) kirjutas Jaros³aw Staniek:
> Rivo Laks pisze:
> > Ühel kenal päeval (neljapäev 23 august 2007) kirjutasid sa:
> >> Hello,
> >> On first run, cache files in ~/.kde/cache-hostname/kpc are created.
> >> Then, on second run, KPixmapCache opens and tries to mmap the data file.
> >> Then I got the crash under win2000, msvc.net, fresh kdelibs and Qt. Have
> >> anyone encountered this or is the cache is working for you on win32?
> >>
> >>
> >> msvcr71d.dll!memcpy(unsigned char * dst=0x00000019, unsigned char *
> >> src=0x00d9f7ac, unsigned long count=4) Line 218 Asm
> >
> > [...]
> >
> >> kdeui.dll!KIconCache::setThemeInfo(const QList<KIconTheme *> &
> >> themes={...}) Line 260 C++
> >
> > [...]
> >
> > It looks like KPCMemoryDevice has an invalid memory pointer (0 perhaps?).
> > I committed a small fix for KPCMemoryDevice which adds virtual keywords
> > that were previously missing. Maybe that has some effect for Windows.
> > Also, the attached patch prints out memory address returned by mmap() and
> > checks for null pointer (although mmap() should never return 0). Could
> > you svn up, apply the patch and retry?
>
> Thanks for your reply. Condition checked in your patch is not used in my
> case as void* indexMem = mmap(0, info->available, PROT_READ |
> PROT_WRITE, MAP_SHARED, info->file->handle(), 0); returns indedxMem == -1,
> what's already covered.
> Sorry for not tracking this down before, but now I can see mmapping is
> somewhat broken not at your level. We already are aware of this and will
> investigate this later.
>
> In the patch below I have:
> 1. Used USE_MMAP everywhere instead of HAVE_MMAP (OK?)
> 2. Disabled using mmap for Windows (temporarily I suppose)
> 3. I've added some fixes so even if mmap is enabled on Windows, the cache
> now will not crash.
Looks good, except that I think invalidateMmapFiles() shouldn't check whether
the cache is valid anymore. This way even a cache that has become invalid can
be invalidated.
Otherwise, please commit.
Rivo
_______________________________________________
Kde-windows mailing list
Kde-windows@kde.org
https://mail.kde.org/mailman/listinfo/kde-windows
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic