Re: pfTexture::loadFile

New Message Reply Date view Thread view Subject view Author view

Scott Herod (herod++at++aspen.evt.com)
Thu, 02 Dec 1999 09:37:33 -0700


"iopen" is the problem. I'm guessing that you are linking your
code in dynamically. iopen is defined in libimage.a and, of course,
must exist at runtime. To get around this same problem in some
cases, I've had to force libimage to be include. I use something
similar to the following in make files.

==================

# Libraries that are not used by the product that must be
# pulled into the plug-in.
PULLIN_LIBS = -limage

$(AFXNAME).so: $(AFXNAME).o BuildPanel.o
        rm -f $++at++
        $(CXX) $(CXXFLAGS) -shared -all $(AFXNAME).o BuildPanel.o
$(PULLIN_LIBS) -o $++at++

==================

See the CC man page about the -all flag and the dlopen man page
for namespace issues.

Scott Herod
herod++at++rtset.com

Satheesh Ganapathi Subramanian wrote:
>
> Hi Performers,
>
> I'm having a problem with pfTexture::loadFile. I've created a pfTexture
>
> pfTexture *tex = new pfTexture;
>
> and I want to load a particular image as the texture.
> I use loadFile for that as follows:
>
> tex->loadFile("testimage.rgb");
>
> But the program seems to crash at this function giving a Bus Error. dbx
> gives the following error message:
>
> Source (of malloc.c) not available for Process 1214
>
> The call stack of dbx shows:
>
> > 0 __malloc(0x98, 0x407cad29, 0x98, 0xfb48afc) ["malloc.c":209,
> 0xfa372e0]
> 1 _malloc(0x98, 0x407cad29, 0x98, 0xfb48afc) ["malloc.c":186,
> 0xfa39ea4]
> 2 _calloc(0x98, 0x407cad29, 0x98, 0xfb48afc) ["calloc.c":40, 0xfa41928]
> 3 imgopen(0x0, 0x7fff2ca0, 0x3c10cc78, 0x2e) ["open.c":35, 0x43a264]
> 4 iopen(0x7fff2ca0, 0x3c10cc78, 0x2e, 0x7fff2ca0) ["open.c":17,
> 0x43a1a8]
> 5 pfTexture::pr_load_sgi_image(const char*)(0x181ca910, 0x7fff2ca0,
> 0x98, 0xfb48afc) ["../../../lib/libpr/pfTexture.C":4650, 0x3bf8aa00]
> 6 pfTexture::loadFile(const char*)(0x181ca910, 0x10012e20, 0x98,
> 0xfb48afc) ["../../../lib/libpr/pfTexture.C":2550, 0x3bf86c94]
>
> Can someone tell me where I'm going wrong.
>
> Thanks,
> Satheesh


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Thu Dec 02 1999 - 08:37:35 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.