• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Still doesn't work - Re: Launch failed with error code -2857
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Still doesn't work - Re: Launch failed with error code -2857


  • Subject: Re: Still doesn't work - Re: Launch failed with error code -2857
  • From: Chris Espinosa <email@hidden>
  • Date: Mon, 20 Dec 2004 15:41:25 -0800

I've lost the beginning of the thread, but he's trying to debug a Mach-O library being loaded by a CFM application, and apparently following the correct steps.

Scott, where did you add the environment variable? You should add it to the Get Info inspector of your custom executable. Xcode doesn't run your bash startup or rc files when it starts up the debugger.

And make sure that your custom executable (LaunchCFMApp) is being passed the complete path to the CFM executable (in foo.app/Contents/MacOS/foo), not the app bundle itself.

Chris

On Dec 20, 2004, at 11:27 AM, daniel wrote:


You need to point to the executable application, not to the shared library.

You can't debug a library without an app to host it.

D

On Dec 18, 2004, at 5:59 AM, scott kaplan wrote:

Thanks, but I am still getting the same error.  Here is what I did:

1) I added the environment variable (full path to my shared library that I want to debug):
CFProcessPath=/Applications/adir/anotherdir/mydynamiclibrary.dylib


2) I restarted my system to make sure the environment variable took, which it did.

3) I clicked the Debug button in Project Builder

Here is everything that I got back:

GNU gdb 5.3-20021014 (Apple version gdb-250) (Sat Dec 7 02:14:27 GMT 2002)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-apple-macos10".
run
tty /dev/ttyp1
[Switching to process 559 thread 0xb03]
Launch failed with error code -2857


---------------------------------------------------------------------- --------------------------------------------------------------------
See Apple's tech note on this subject:
http://developer.apple.com/carbon/tipsandtricks.html#CFMLaunchError


6. Why do I get "Launch failed with error code -2857" when launching
from the Terminal?

There is a problem with the interaction between the Code Fragment
Manager (CFM) and Core Foundation (CF) which causes LaunchCFMApp to
sometimes fail when launched from the terminal (or gdb).

True, the error code means it can't find the 'cfrg' resource. This
is  because CF gets confused and thinks the application is
"LaunchCFMApp"  instead of your target bundle.

To work around the problem for the time being, define the
environment variable "CFProcessPath" to be the full path to your
executable. This will force CF to locate the correct "bundle" for
your app. This should get you debugging again!
---------------------------------------------------------------------- --------------------------------------------------------------------
I am trying to debug a shared library in project builder from a CFM
project.


I followed the instructions exactly of the following article
(http://lists.apple.com/archives/projectbuilder-users/2001/Feb/
msg00210.html) which is reiterated verbatim below.

When I performed step 6), I got the error "Launch failed with error
code -2857".
I have read every article in the project builder archives
concerning  how to solve my problem and the solution did not appear
to be there.

My Mac is running OS 10.2.X


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Still doesn't work - Re: Launch failed with error code -2857
      • From: Jim Ingham <email@hidden>
  • Prev by Date: Re: Searching for string
  • Next by Date: Re: error when running XCode
  • Previous by thread: Re: CHUD Updater not working?
  • Next by thread: Re: Still doesn't work - Re: Launch failed with error code -2857
  • Index(es):
    • Date
    • Thread