• 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: App give s -35 error when run out of the debugger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: App give s -35 error when run out of the debugger


  • Subject: Re: App give s -35 error when run out of the debugger
  • From: "Jason T. Slack-Moehrle" <email@hidden>
  • Date: Mon, 12 Nov 2012 13:59:26 -0800

Hi Fritz,

The app is using paths like str=".\\Folder\\xxx.txt"

The app in created in a structure like:

app.app
Folder\
Folder\xxx.txt

Works from the debugger but not when clicking the app from the finder

So maybe I should output the current directory to the console in main() and seeing if this differs from when in the debugger vs when not.

NSBundle might be a good solution but we have hundreds of files brought in and some files contains the paths to other files, I'd have to explore doing this further to make sure I can still do everything we are currently doing.

Jason


On Mon, Nov 12, 2012 at 11:53 AM, Fritz Anderson <email@hidden> wrote:
On 12 Nov 2012, at 1:04 PM, Jason T. Slack-Moehrle <email@hidden> wrote:

> OS X 10.6.8, XCode 3.2.6 targeting 10.5 SDK, Carbon
>
> My app works in the debugger. all the resources, etc load. (there are a lot, hundreds, from .png's to special text files, etc)
>
> When I double click it outside the debugger it returns a -35 error.
>
> According to MacErrors.h: http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/MacErrors.h
>
> a -35: nsvErr = -35, /*no such volume*/
>
> According to Console.app: 11/12/12 10:59:23 AM        [0x0-0x25d25d]Mystical[18406]     what():  {-35}
>
> I am curious to know how one starts tracking down why it works in debug but not release if the folder structure, etc is exactly the same?
>
> Obviously it is a path problem to all of these resources, the path it thinks doesn't exist...

By any chance, are you relying on a particular location for the working directory? It varies by the environment in which an application is launched, which is why you should always access resources through NSBundle.

        — F


--
Fritz Anderson -- Xcode 4 Unleashed: 4.5 supplement in the works -- <http://x4u.manoverboard.org/>


 _______________________________________________
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

References: 
 >App give s -35 error when run out of the debugger (From: "Jason T. Slack-Moehrle" <email@hidden>)
 >Re: App give s -35 error when run out of the debugger (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Corrupt Simulator?
  • Next by Date: Re: Using Xcode's target=>info=>Document Types panel
  • Previous by thread: Re: App give s -35 error when run out of the debugger
  • Next by thread: Re: App give s -35 error when run out of the debugger
  • Index(es):
    • Date
    • Thread