[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] Memory corruption [Symbian]?
From: |
Fernando Papa |
Subject: |
[Devel] Memory corruption [Symbian]? |
Date: |
Sat, 11 Sep 2004 16:08:33 -0300 |
This applies to ft219 and current-20040910. To make
things shorter, I stripped the error-code checking from
the code below.
I configured FreeType2 with the bare minimum features
to render anti-aliased TrueType fonts. It builds
cleanly on all the compilers mentioned in this post.
It works fine on win2k when compiled with VC++ 6.0 SP6.
I modified a Symbian Series 60 "Hello, World!" sample
app, adding the following lines: (plus includes etc)
const unsigned char trebuc[] = { ..... };
FT_Library library;
FT_Face face;
FT_Init_FreeType(&library);
FT_New_Memory_Face(library, trebuc, 65100, 0, &face);
That works OK on Symbian Series 60 *simulator*, when
compiled with CodeWarrior 2.5
But, when compiling for the target device (Nokia 3650,
ARMI), it crashes with an access violation (KERN EXEC 3).
The native code is generated by GCC. I tried both the
official Symbian build and an updated one:
- gcc version 2.9-psion-98r2 (Symbian build 540)
- gcc version 3.0-psion-98r2 (Symbian build 8/546)
(also tried disabling 64 bits int support)
It never returns from FT_New_Memory_Face().
Unfortunately I can't do in-device debugging.
What I did was crashing it with a Panic when it reached
several places, to pin-point the AV. I found that the AV
changes its location when I move the code around, or
even insert dummy stuff.
So I believe there's some memory corruption going.
I just tried 2.1.5 and it behaves about the same: the
above code works, but then the following fails:
FT_Set_Pixel_Sizes(face, 10, 16);
FT_Load_Char(face, 'A', FT_LOAD_RENDER);
(FT_Load_Char() triggers the AV)
By the way, in case the AV was triggered somewhere
else on the simulator, I did some char rendering,
rotating, etc, and everything worked fine.
Any clues?
Thanks,
Fernando.
- [Devel] Memory corruption [Symbian]?,
Fernando Papa <=
[Devel] FT_PtrDist is badly defined and should be abolished, Graham Asher, 2004/09/13