freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] More crashes on ARM


From: david turner
Subject: Re: [ft-devel] More crashes on ARM
Date: Mon, 30 Jan 2006 14:05:51 +0100
User-agent: Thunderbird 1.5 (Windows/20051201)

Sorry, I should have been more accurate.

You should set the watchpoint just after the creation of the FT_CMap
object (this happens in FT_CMap_New in src/base/ftobjs.c). there is
code like this:

   if ( !FT_ALLOC( cmap, clazz->size ) )
   {
     cmap->charmap = *charmap;
     cmap->clazz   = clazz;

     if ( clazz->init )
     {
       error = clazz->init( cmap, init_data );
       if ( error )
         goto Fail;
     }

     /* add it to our list of charmaps */

you should set the watchpoint after the "cmap->clazz = clazz" statement.
So it should be:

- first set a breakpoint at the "cmap->clazz = clazz" statement
 (line 2598 of current CVS)

- when the breakpoint is reached, add a watchpoint to the
 memory location of the 'clazz' field, i.e.:

    p &cmap->clazz
    0x6734efd4                          (or some other value)
    watch *(char*)0x6734efd4   (replace with previous value)
    c

- repeat each time the first breakpoint is reached (there may be
 several charmaps in the font)

the watchpoint should trigger whenever the memory location is
updated. Note that the watchpoint should make things run very
slowly on some platforms.

Hope this helps,

- David


Frank Meerkoetter a écrit :
Quoting david turner <address@hidden>:

Hi,

Can you put a watchpoint on the cmap's "clazz" field to detect where it
is over-written ?
Really, it should give us meaningful information.

I'm not sure if i understand correctly what you wan't me to do.
The crash happens directly after cmap becomes available.

FT_EXPORT_DEF( FT_ULong )
  FT_Get_Next_Char( FT_Face   face,
                    FT_ULong  charcode,
                    FT_UInt  *agindex )
  {
 [...]
      FT_UInt32  code = (FT_UInt32)charcode;
      FT_CMap    cmap = FT_CMAP( face->charmap );           // <---


      gindex = cmap->clazz->char_next( cmap, &code );       // <--- crash
      result = ( gindex == 0 ) ? 0 : code;
    }
 [...]
  }

I tried it anyways but had no success.

Breakpoint 2, FT_Get_Next_Char (face=0x4bb90, charcode=0, agindex=0xbefff748)
    at ftobjs.c:2426
2426        FT_ULong  result = 0;
Current language:  auto; currently c
(gdb) n
2427        FT_UInt   gindex = 0;
(gdb) n
2430        if ( face && face->charmap )
(gdb) n
2432          FT_UInt32  code = (FT_UInt32)charcode;
(gdb) n
2433          FT_CMap    cmap = FT_CMAP( face->charmap );
(gdb) n
2436          gindex = cmap->clazz->char_next( cmap, &code );
(gdb) watch cmap->clazz
Watchpoint 3: cmap->clazz
(gdb) c
Continuing.
0x00000000 in ?? ()
Cannot access memory at address 0x0


Regards,
   Frank




***********************************************************************************
Information contained in this email message is confidential and may be 
privileged, and is intended only for use of the individual or entity named 
above. If the reader of this message is not the intended recipient, or the 
employee or agent responsible to deliver it to the intended recipient, you are 
hereby notified that any dissemination, distribution or copying of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the address@hidden and destroy the original 
message.
***********************************************************************************




reply via email to

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