🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.codewarrior
Article #1058

App crashes on object declaration

#1058
From: Wade Williams
Date: Fri, 08 Mar 2002 22:15
59 lines
3610 bytes
I've got an application which uses a carbonized GUSI.  When the app
makes a simple call to fopen(), which GUSI overrides, the app crashes
on an object declaration.  (Note that under Classic I've used GUSI in
this project fine, and the author of the Carbon version of GUSI uses it
without problem)

The error occurs when it's attempting to create an instance of
GUSIErrorSaver.  It does not actually enter the constructor.

// The next calls also need the services of [[GUSIDeviceRegistry]].
[[open]] used
// both the [[GUSIDeviceRegistry]] and the [[GUSIDescriptorTable]].
//
// <POSIX function wrappers>=
int   open(const char * path, int mode, ...)
{
   GUSIErrorSaver       saveError;    <<-----error occurs right here
   GUSIDeviceRegistry * factory  = GUSIDeviceRegistry::Instance();
   GUSIDescriptorTable *   table = GUSIDescriptorTable::Instance();
   GUSISocket *         sock;
   int                  fd;

and here it is in mixed source / assembly:

{
004EFC60: 7C0802A6  mflr     r0
004EFC64: BEA1FFD4  stmw     r21,-44(SP)
004EFC68: 90010008  stw      r0,8(SP)
004EFC6C: 9421FF90  stwu     SP,-112(SP)
004EFC70: 90610088  stw      r3,136(SP)
004EFC74: 9081008C  stw      r4,140(SP)
004EFC78: 90A10090  stw      r5,144(SP)
004EFC7C: 90C10094  stw      r6,148(SP)
004EFC80: 90E10098  stw      r7,152(SP)
004EFC84: 9101009C  stw      r8,156(SP)
004EFC88: 912100A0  stw      r9,160(SP)
004EFC8C: 914100A4  stw      r10,164(SP)
004EFC90: 3BC26C74  addi     r30,RTOC,27764
004EFC94: 83E287B8  lwz      r31,-30792(RTOC)
   GUSIErrorSaver       saveError;
004EFC98: 801F0000  lwz      r0,0(r31)  <--error occurs here - r31 ==
0x00000000

I don't see anything wrong with the GUSIErrorSaver class definition
(it's very simple), so I'm not sure where the error is coming from.

It was suggested to me that it might be a problem with my runtime, but
I use MSL_All_Carbon_D.Lib (and of course CarbonLib), which is what is
in the stationary.

I have been unable to recreate the error in a smaller project, so I
agree with the theory that it might be something wrong with my linking,
runtime, etc.

Has anyone seen similar errors before?  Any thoughts?

Thanks,

Wade
Technical Details
Message-ID: <080320021615353314%wadesworld@mac.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-xfer2.newshosting.com!nntp2.aus1.giganews.com!nntp.giganews.com!nntp3.aus1.giganews.com!bin3.nnrp.aus1.giganews.com.POSTED!wadesworld

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bcce,1f46dffbdfb01bf7,start
X-Google-Attributes: gid10bcce,public
X-Google-Thread: f635e,1f46dffbdfb01bf7,start
X-Google-Attributes: gidf635e,public
X-Google-ArrivalTime: 2002-03-08 14:15:52 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-xfer2.newshosting.com!nntp2.aus1.giganews.com!nntp.giganews.com!nntp3.aus1.giganews.com!bin3.nnrp.aus1.giganews.com.POSTED!wadesworld
Subject: App crashes on object declaration
From: Wade Williams <wadesworld@mac.com>
Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac
Message-ID: <080320021615353314%wadesworld@mac.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: 8bit
User-Agent: Thoth/1.5.0 (Carbon/OS X)
Lines: 59
NNTP-Posting-Date: Fri, 08 Mar 2002 16:15:35 CST
Organization: Giganews.Com - Premium News Outsourcing
X-Trace: sv3-1ikV5QHoX4nRfBxT1D9BiQCzmcQsBtNmCOHvNmZXGXoTXNyj0iaeXjrNWgcMw0aFfu81yJa+UsO/rjm!qycph9aXUokmeSZy8xC1QSMwU7N81HT6ckUSEkDYl0mXZ47o34Ht70owcEdqcA==
X-Complaints-To: abuse@comcast.com
X-DMCA-Complaints-To: abuse@comcast.com
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
Date: Fri, 08 Mar 2002 22:15:36 GMT