Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / February 2004



Tip: Looking for answers? Try searching our database.

access fault exception in PowerPlant CW 8.3 MacOS X 10.3

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MacPorter - 23 Feb 2004 13:54 GMT
Hi,

I'm porting a MacOS 9 app to OS X (10.3 Panther)
using Carbon within CW 8.3.
For now I'm building a Macintosh PowerPC target.
It compiles fine with a few warnings but when I
try to debug it it crashes with an access fault
exception when calling Power Plant constructors
before entering the main function (the arrow
represents the position of the current function
call in the debugger (i.e. stack):

=> CTextDocApp theApp;
...

int main(int argc, char** argv)
{
    ...
    theApp.Run();
    ...
    return 0;
}

The constructor of theApp (after usual calls:
__start
__sinit
__sinit__:CTextDocApp_cp)

  CTextDocApp::CTextDocApp()
=> {
     ...

calls

  LDocApplication::LDocApplication()
=> {
  }

which calls

  LApplication::LApplication()
=> {
     ...

which in turn calls

  LEventDispatcher::LEventDispatcher()
=> {
     ...

that leads to access fault exception with:

Variables: All            Value        Location
__________________________________________________________
this                0x000D74AE    @R31
    $LAttachable        0x0000000D    0x000D74AE
        mAttachments    0x0977B3A8    0x00000011
    mSaveDispatcher        0x00000000    0x000D74B6
    mMouseRgn        0x000D74BA    0x000D74BA
        mRegionH    0x00000000    0x000D74BA
        mIsOwner    false        0x000D74BE
__________________________________________________________
LEventDispatcher::sCurrentDispatcher
                0x00000000    0x000D7BF0

The value of $LAttachable seems weird, don't you think?

Does anyone have encountered such behavior, is there
something I am missing?
I carbonized (rebuilt for Macintosh PowerPC) FeaturesLib
(which declares LEventDispatcher) and included it in my
target. Perhaps it comes from this rebuild?

Thanks in advance for your help :-)
MW Ron - 23 Feb 2004 14:56 GMT
>Hi,
>
[quoted text clipped - 7 lines]
>represents the position of the current function
>call in the debugger (i.e. stack):

If I recall right,  there was a bug in CW 8 PowerPlant Advanced classes
because they included the debugging classes.  When you launched them
they crashed giving what appeared to be a serious error but actually was
just saying that no debugger nub was there.  Could that be what you are
seeing?  I can try to get more information if you think this might be it.

Instead of trying to  convert your old project what might be a better
idea is to create a new stationery project and then drag and drop your
sources to the new stationery (you can drag entire groups from one
project to another).  

Ron

Signature

Metrowerks, maker of CodeWarrior   -  "Software Starts Here"  
Ron Liechty - MWRon@metrowerks.com - <http://www.metrowerks.com>

MacPorter - 24 Feb 2004 08:18 GMT
Hi,

Thanks for your quick answer.
I'm going to try to create a new project, but I'm afraid I'm going
to encounter the same trouble if you recall right about the bug in
the advanced classes

Regards

> >Hi,
> >
[quoted text clipped - 20 lines]
>
> Ron
MacPorter - 24 Feb 2004 17:12 GMT
Hi,

Thank you that was it! :-D

I created a new project and copy and paste files into it: now it
works (almost) fine.

For those who could be interested in the process...

I created a new MacOS PowerPlant Stationery project.
I chose Mac OS Carbon/Mac OS Carbon Bundle/Document since it was
the style closest to the app I was trying to port to MacOS X.
Then I just removed all MSL libs (MSL_Runtime.PPC.Lib, MSL_C_Carbon.Lib,
MSL_C++_PPC.Lib) to replace them by MSL_All_Carbon.Lib (same with debug
versions *_D.Lib) which also includes some MSL_Extras I needed.
I also included all PowerPlant .cp files that were not included by default
in the new created project such as LEditField.cp, LTableView.cp, UCMMUtils.cp...
I rebuilt everything and now it all almost works: the bugs are now laying
in my code :-)

Regards and again thank you Ron

> Hi,
>
[quoted text clipped - 29 lines]
> >
> > Ron
MW Ron - 24 Feb 2004 17:22 GMT
>Hi,
>
>Thanks for your quick answer.
>I'm going to try to create a new project, but I'm afraid I'm going
>to encounter the same trouble if you recall right about the bug in
>the advanced classes

I'm sorry I didn't state that very well.  You just have to remove the
debugging classes from your project.

Ron

>> >Hi,
>> >
[quoted text clipped - 20 lines]
>>
>> Ron

Signature

Announcing  CodeWarrior Development Tools for Windows v9.2
http://www.metrowerks.com/MW/Develop/Desktop/Windows/Professional/Default.htm
Ron Liechty - MWRon@metrowerks.com - <http://www.metrowerks.com>

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.