Jean-Luc Dery (dery++at++Discreet.COM)
Mon, 29 Sep 1997 12:34:08 -0400
I have a little problem with the font loader.
Our application uses the font type 1 developped by M. Haeberli and loads them
using the pfdLoadFont_type1 utility.
The application can load/unload scenes during a single work session, meaning
that we load a scene and some time later, destroy it and reload another one.
When loading a given scene, fonts are loaded with pfdLoadFont_type1 and
referenced multiple times if more than one pfString object uses it. When
unloading a scene, all the scene tree is destroyed except the pfScene root
node, to which the next loaded scene is attached. Up to know, nothing special.
But what happens is when a font is used in a scene, destroyed and then reloaded
in a newly loaded scene, the application crashes in pfdLoadFont_type1 function
call. This might not happen at the first reload of the font, but always happens
after a few reloads (sometimes after one and usually less than 5). If we work
with the same databases but don't load fonts, everything works fine. So my way
of handling pfFont/pfString/pfText is wrong or the way pfdLoadFont works not
optimal. By the way, I'm not using the pfBuffer's for now, until I debug this;
so every memory allocation/deallocation is done in the app process using pf/pr
new operators and pfDelete.
The application is built with Performer 2.1 and the problem occurs on different
platforms with different operating systems (6.2/6.3/6.4).
Help, ...
And thanks in advance for your suggestions.
Jean-Luc.
Here is what I get from dbx:
0 pfMemory::getMemory(const void*)(0x3e000000, 0x0, 0xa4, 0x5c1d59b0,
0x5c1d8190, 0x5c1d8190, 0x5c1d59b4, 0x0)
["/perf7/zhz/perftot1/perf/lib/libpr/pfMemory.C":856, 0x5c09d630 (pixie
0x5c09d630)]
1 pfMemory::unref(void*)(0x3e000000, 0x0, 0xa4, 0x0, 0x0, 0x5c1d8190,
0x5c1d59b4, 0x0) ["/perf7/zhz/perftot1/perf/lib/libpr/pfMemory.C":758,
0x5c09dc88 (pixie 0x5c09dc88)]
2 pfFont::setCharGSet(int,pfGeoSet*)(0x0, 0x0, 0x0, 0x5c1d59b0, 0x5c1d8190,
0x5c1d8190, 0x5c1d59b4, 0x0)
["/perf7/zhz/perftot1/perf/lib/libpr/pfFont.C":326, 0x5c057e30 (pixie
0x5c057e30)]
3 ::pfFontCharGSet(0x3e000000, 0x0, 0xa4, 0x5c1d59b0, 0x5c1d8190,
0x5c1d8190, 0x5c1d59b4, 0x0) ["/perf7/zhz/perftot1/perf/lib/libpr/cFont.C":47,
0x5c0eba6c (pixie 0x5c0eba6c)] 4 makeObjFontGSets(0x0, 0x3, 0x0, 0x0,
0x5c1d8190, 0x5c1d8190, 0x5c1d59b4, 0x0)
["/perf7/zhz/perftot1/perf/lib/libpfdu/pfdLoadFont.c":240, 0x5c87e5d0 (pixie
0x5c87e5d0)]
5 pfdLoadFont_type1(0x0, 0x1, 0xa4, 0x5c1d59b0, 0x5c1d8190, 0x5c1d8190,
0x5c1d59b4, 0x0) ["/perf7/zhz/perftot1/perf/lib/libpfdu/pfdLoadFont.c":145,
0x5c87e250 (pixie 0x5c87e250)]
6 sdbFont::load(void)(this = 0x60078410)
["/vobs/waipa/runtime/renderingEngine/sceneMgr/sdbFont.C":110, 0x5f1acc04
(pixie 0x5f1acc04)]
7 sdbFont::load(const char*)(this = 0x60078410, fontName = 0x93ea98 =
"AvantGarde-Book")
["/vobs/waipa/runtime/renderingEngine/sceneMgr/sdbFont.C":85, 0x5f1acaa8 (pixie
0x5f1acaa8)]
8 ::getFontItem(char*)(fontName = 0x93ea98 = "AvantGarde-Book")
["/vobs/waipa/runtime/renderingEngine/sceneMgr/sdbBuilder.C":705, 0x5f1bb9ac
(pixie 0x5f1bb9ac)]
9 ::createNode(ddbObject&,int)(object = 0x93e520, index = 56)
["/vobs/waipa/runtime/renderingEngine/sceneMgr/sdbBuilder.C":548, 0x5f1bab40
(pixie 0x5f1bab40)]
10 ::buildTree(pfGroup*,int)(parent = 0x6097a280, index = 56)
["/vobs/waipa/runtime/renderingEngine/sceneMgr/sdbBuilder.C":323, 0x5f1b9b28
(pixie 0x5f1b9b28)]
11 ::buildTree(pfGroup*,int)(parent = 0x60e82090, index = 60)
["/vobs/waipa/runtime/renderingEngine/sceneMgr/sdbBuilder.C":364, 0x5f1b9f64
(pixie 0x5f1b9f64)]
12 ::buildTree(pfGroup*,int)(parent = 0x60090780, index = 112)
["/vobs/waipa/runtime/renderingEngine/sceneMgr/sdbBuilder.C":364, 0x5f1b9f64
(pixie 0x5f1b9f64)]
13 ::buildTree(pfGroup*,int)(parent = 0x610e1800, index = 245)
["/vobs/waipa/runtime/renderingEngine/sceneMgr/sdbBuilder.C":365, 0x5f1b9fcc
(pixie 0x5f1b9fcc)
14 ::buildTree(pfGroup*,int)(parent = 0x5fe13470, index = 246)
["/vobs/waipa/runtime/renderingEngine/sceneMgr/sdbBuilder.C":364, 0x5f1b9f64
(pixie 0x5f1b9f64)]
15 ::sdbBuildScene(sdbScene*)(scene = 0x5fe13470)
["/vobs/waipa/runtime/renderingEngine/sceneMgr/sdbBuilder.C":178, 0x5f1b8c94
(pixie 0x5f1b8c94)]
and from purify :
ZPR: Zero page read (3 times):
* This is occurring while in:
pfMemory::isOfType(pfType*) [pfMemory.C:77]
pfBuffer::pf_destroyMem(pfMemory*) [pfBuffer.C:1402]
pfDBase [pfProcess.C:3058]
inlineProc(int,_pfProcStats*) [pfProcess.C:2374]
pfFrame [pfProcess.C:2749]
vfLaunchRenderingEngine(unsigned int,bool) [vfRenderingEngine.C:206]
* Reading 4 bytes from 0x8
MSE: Memory segment error:
* This is occurring while in:
pfMemory::getMemory(const void*) [pfMemory.C:856]
pfMemory::unref(void*) [pfMemory.C:758]
pfFont::setCharGSet(int,pfGeoSet*) [pfFont.C:326]
pfFontCharGSet [cFont.C:47]
makeObjFontGSets [pfdLoadFont.c:240]
pfdLoadFont_type1 [pfdLoadFont.c:145]
* Accessing a memory range that crosses a memory segment boundary.
Addressing 0x43d00000 for 4 bytes ending at 0x43d00004,
which is neither in the heap nor the main stack.
COR: Fatal core dump:
* This is occurring while in:
pfMemory::getMemory(const void*) [pfMemory.C:856]
pfMemory::unref(void*) [pfMemory.C:758]
pfFont::setCharGSet(int,pfGeoSet*) [pfFont.C:326]
pfFontCharGSet [cFont.C:47]
makeObjFontGSets [pfdLoadFont.c:240]
pfdLoadFont_type1 [pfdLoadFont.c:145]
* Received signal 11 (SIGSEGV - Segmentation fault)
* Handler function:
reSignalHandler(int,sigcontext*) [vfRenderingEngine.C:506]
* Faulting address = 0x5c5ec990
* Signal mask: (SIGSEGV)
* Pending signals:
-- _____________________________________________________________________________Jean-Luc Dery Discreet Logic System Engineer 10 Duke Street 3-D Graphics Technology Montreal (Quebec), Canada, H3C 2L7 Tel: (514) 954-7239 Email: dery++at++discreet.com Fax: (514) 393-0110 _____________________________________________________________________________ ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:56:01 PDT