EXC_BAD_ACCESS on device when getting URL contents

Hi Guys
I'm having an issue retrieving the contents of a URL, only when I am testing on the iPhone device itself.
It works fine when I use the simulator but when testing on the device itself I get a EXC_BAD_ACCESS on the following line:
NSString * example = [NSString stringWithContentsOfURL:nsURL];
The device is a iPhone 4 with iOS 4.1
Can someone please help as I have tried everything I can think of?
Thanks in advance

The error occurs when I call [NSString stringWithContentsOfURL:nsURL];
The entire code is as follows:
NSURL *nsURL = [NSURL URLWithString:@"http://www.mywebsite.com/xmlfeed.jsp"];
NSString * example = [NSString stringWithContentsOfURL:nsURL];
Only other thing I can add is that this code is running in a background thread when the app is launched and that the returned data is XML.
I have also tried using TouchXML and the following line also has the same problem:
CXMLDocument *xmlParser = [[[CXMLDocument alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://www.mywebsite.com/xmlfeed.jsp"] options:0 error:nil] autorelease];
The strange thing is that both options work 100% of the time on the simulator. Could there be a flag or option I need to set to allow the app to communicate with the network connection?

Similar Messages

  • WLS Instances don`t refresh when getting New content

              Hi there,
              We´re using wls6.0sp2 for testing purposes and we have problems when we're loading
              new HTML and JSP content in a already deployed web directory, i.e. a client is
              only able to access the old stuff.
              The Clients are communicating via an Apache PlugIn with the WLS Instances (we`ve
              got a small cluster with 2 instances). Is it possible that either the apache webserver
              or the WLS Admin Server have cached the old content ?
              Is hot Deploymewnt of new content not possible on WLS 6.0 ?
              Thanks for any help.
              sincerely,
              Marcus Kreher
              

    WebAppComponents can be hot deployed, i.e. refreshed without having to
              redeploy the whole application. This will work for any static content (html,
              gif, jpeg, etc.) as well as jsp files.
              In 6.1, use the weblogic.deploy command to refresh. In 6.0, there is a
              separate command-line tool
              (weblogic.management.tools.WebAppComponentRefreshTool) which is in a rolling
              patch for Service Pack 2.
              Please contact WebLogic Support to request the Rolling Patch.
              Regards,
              -- Ian
              "Marcus Kreher" <[email protected]> wrote in message
              news:[email protected]..
              >
              > Hi there,
              >
              > We´re using wls6.0sp2 for testing purposes and we have problems when we're
              loading
              > new HTML and JSP content in a already deployed web directory, i.e. a
              client is
              > only able to access the old stuff.
              > The Clients are communicating via an Apache PlugIn with the WLS Instances
              (we`ve
              > got a small cluster with 2 instances). Is it possible that either the
              apache webserver
              > or the WLS Admin Server have cached the old content ?
              > Is hot Deploymewnt of new content not possible on WLS 6.0 ?
              >
              > Thanks for any help.
              >
              > sincerely,
              > Marcus Kreher
              >
              

  • How to get URL content in a variable

    I want to load whole webpage in a variable like we do file_gets_contents in PHP. Any ideas???

    any ideas? yes.
    It's fundamental, just a few lines of code (plus some exception handling).

  • When im clicking on billing periods and devices im getting error as

    in es32,when im clicking on billing periods and devices im getting error as
    1)ISU_INSTALLATION_STRUC_ANALYZE
    2)ISU_O_DEVICERATE_OPEN
    any suggestions n solutions will be appriciated
    Thank u guyz in Advance
    Edited by: ikrishna on May 16, 2011 8:55 AM

    Hi Ricardo,
    Please check below links for EDM profiles information.
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/41/b5d0ca72454324a7032a4626da29b5/content.htm
    http://help.sap.com/saphelp_erp60/helpdata/en/7d/a0023b288dd720e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/4e/d4ca74a8d7476482815a895227e343/content.htm
    http://help.sap.com/erp2005_ehp_05/helpdata/en/bd/e22c18fde411d4a77600a0c9303371/content.htm?frameset=/en/7d/a0023b288dd720e10000000a114084/frameset.htm
    Hope this helps you out.
    Regards
    Sachin

  • How do I get iTunes to recognize a new device if I accidentally did not hit new device when I first hooked it up? I hit the button that said I wanted to back it up from my old info

    How do I get iTunes to recognize a new device if I accidentally did not hit new device when I first hooked it up? I hit the button that said I wanted to back it up from my old phone. The new phone is my husbands and I don't want to back up my phone info on it. I re connected it hoping it would prompt me with the option again and it doesn't , it just shows up as a back up to my phone. How can I get it to give me that option in the beginning again

    First of all, I think the first time you sync an iPod that's formatted for Windows on a Mac, the sync process reformats it for Mac. You can check what it is now by looking for the iPod with Disk Utility. If it's Mac OS Extended, it's formatted for Mac already.
    Also, there is no current iPod updater app these days. iTunes handles it through the Restore button. If you are not able to use the latest iTunes because of your Mac, I can understand. The latest version of iTunes should run with 10.3.9 or later, if the hardware can handle it.
    You said the battery was low so let it recharge for a while.
    You should also reset the iPod. It's part of the 5Rs, which you should go through as the starting point for iPod trouble-shooting.
    http://www.apple.com/support/ipod/five_rs/wheel/

  • A black airplay info window floats around on my HDTV screen when sending audio content via airplay up to sound system w Apple TV.  How can I get rid of this?

    A black airplay info window floats around on my HDTV screen when sending audio content via airplay up to sound system w Apple TV.  How can I get rid of this?

    Had this happen to me after a recent update, was super annoying.  To turn off, go to Settings > AirPlay > Conference Room Display > Off.

  • When I try to open a project, the only option for a new track is for external MIDI device; when I try to open an audio or software instrument track, I get an error message saying that "the specified number of tracks could not be created. Reduce the n

    When I try to open a project, the only option for a new track is for external MIDI device; when I try to open an audio or software instrument track, I get an error message saying that "the specified number of tracks could not be created. Reduce the number of tracks to create and try again." I didn't specify ANY number of tracks. Thanks for help!

    Ah.. then I suspect you just need to go to Logic's prefs/Audio and check CoreAudio...
    It has been unchecked somehow...
    Also.. as an aside.. Be careful not to create such large subject names in future when posting here.. They can cause issues with replying to posts in such threads.. due to a bug in the forum software.. so please keep them short and to the point...
    Cheers..
    Nigel

  • Hi! I need to load a GET url that si very long. On other browsers, I can load the url. In firefox 3.6, no. There is an addons or a plugin so I can extend this limit? If yes, is possible to load automatically this addons when loading a certain page? thanks

    Hi!
    I need to load a GET url that si very long. On other browsers, I can load the url. In firefox 3.6, no.
    There is an addons or a plugin so I can extend this limit? If yes, is possible to load automatically this addons when loading a certain page? thanks
    The url is sometingh like this (this is correctly loaded, but it could be longer)

    Firefox should have problems with long GET data appended to an URL (long would be over 64k).<br />
    If there are problems then it is possible that an extension is the cause of that.
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • I puchased the Photoshop/Lightroom, but when I try to download Lightroom I get the following error message:Error -302 when loading url aam://SAPCode=LTRM?productVersion=5.5?passPhrase=RRR9EU9BaSBdtGb7 BrzzYZ9hLdjmpvEWeq7/9gSYn2 lUDLZNr9UveWEgxzaiobbibx4d6

    I get the following error message when attempting to load Lightroom:  Error -302 when loading url aam://SAPCode=LTRM?productVersion=5.5?passPhrase=RRR9EU9BaSBdtGb7+BrzzYZ9hLdjmpvEWeq7/9gS Yn2+lUDLZNr9UveWEgxzaiobbibx4d6JK3R74HPAX4YFwTpkn6K3YQk6Ej82wRFyYvKwXKAVMfMhQCfW5qg8odoMny OV1JlBuT0gEMjSjG5EhuCR288pgnfgQbAmchGqKSU=
    What can I do to solve the problem?

    Ewlett you are receiving this error because the AAM Detect plug-in is not yet installed.  Please see Error referring to aam protocol when you click download button | CC for more details.

  • HT1351 my itunes won't recognize my ipod in devices when I have it connected to my computer? How do I get it to sync? it is a ipod classic

    I have a ipod classic and my itunes will not recognize it under devices when I have it plugged into my computer. I have restored the ipod and itunes is up to date on my computer. I have not been able to get my music to sync onto this ipod. Thanks for the help

    If the iPod was not recognized by iTunes, how was the Restore performed?
    The latest iTunes may hide the sidebar.  This may be confusing to long-time iTunes users.  If you don't see the sidebar on the left side, go up to the menu bar.  Under Views, select Show Sidebar.
    With the sidebar visible, do you see the iPod under DEVICES?

  • When I left my former employer, Pollinate Agency, I bought a MacBook Pro with Acrobat Pro (version 9 or possibly 9.5) installed from the company. I recently had a serious computer crash, and needed to get all contents erased. The support provider didn't h

    When I left my former employer, Pollinate Agency, I bought a MacBook Pro with Acrobat Pro (version 9 or possibly 9.5) installed from the company. I recently had a serious computer crash, and needed to get all contents erased. The support provider didn't have my product key, so could not reinstall Acrobat Pro for me. Since then, I have gotten the product key sent to me from my former employer, [ REMOVED ] So I need help in re-downloading, installing and activating the Acrobat Pro software on this computer.

    Please remove the S/N immediately (I can't or would). Never post them online. As for download you can go to http://helpx.adobe.com/acrobat/kb/acrobat-downloads.html on the right panel to get 9 pro. I am not sure there is a MAC version there, but that is the first place to go. If it is the proper version, then please back it up to CD and/or portable HD, not the system HD.

  • I have purchased a new iPad2 and I was wondering if there is a way to get iPod content onto this new device. I am having difficulty finding any information on this kind of transfer and I am not sure if it is even possible. Thanks

    I have purchased a new iPad2 and I was wondering if there is a way to get iPod content onto this new device. I am having difficulty finding any information on this kind of transfer and I am not sure if it is even possible. Just not looking forward to loosing my progress in games and information in notes and other apps. Thanks

    Have you been syncing the iPod with iTunes? Then you just connect the iPad and set it up through iTunes and sync any content you want onto it.
    http://support.apple.com/kb/ht1386
    In terms of games/apps. If they are not universal (you will see a + symbol next to them) or made for iPad (you would see an HD in the name, usually) then they won't look good on an iPad as those apps will open in a iPod sized window, giving you the option to enlarge.

  • Macbook Pro Late 2008 gets real hot when viewing Flash Content.  Does anyone have a solution?

    Macbook Pro Late 2008 gets hot, fans kick on at 6200 rpm, and CPU usage of about 65% when viewing Flash Content.  I've been to the Adobe Forum, but saw no solution for this.  Already unchecked Hardware Acceleration.  I had motherboard replaced just a week ago, so that's not the issue.  I hope someone can help.

    MDhennin wrote:
    Yes it was happening before the logicboard was replaced.  I'm up to date with Flash and Software Updates too.  Macbook can handle everything but Flash content.  So I assume its related to some kind of incompatability.  Not sure though.  I have come across others who have the same issue.
    Ok, dumb question on my part, but did any of those others find a solution? If not, what have they, and you, tried? If you don't mind, posting a link to content which causes this might be helpful (I don't watch a lot of Flash-based video, but I've never had an issue like that on my early 2008/less able MBP . . .).

  • How do I get the content to match when exporting pages document to word?

    How do I get the content to match when I export a pages document to word format?

    You simply cannot get an absolutely identical export, in any app to any app. Exporting from one app to another means converting/parsing code, therefore the result cannot be identical. In order to have control over your final result, use PDF export. If you need a closer compatibility with Word, use OpenOffice or LibreOffice. I would not bet that Word for Mac would presserve identical page setting if file is created in windows, or vice-versa.

  • My iPod touch is plugged into PC. My iPod is shown, but when I drag content from iTunes library to it I end up with an error message that says it "Cannot copy item" then "The device has either stopped responding or has been disconnected."  What to do???

    My iPod touch is plugged into PC. My iPod is shown, but when I drag content from iTunes library to it I end up with an error message that says it "Cannot copy item" then "The device has either stopped responding or has been disconnected."  What to do???

    Yes you can drag and drop music to the iPiod if you select Manually Manage Music and Videos in  iTunes.
    DaibhiN wrote:
    You do not drag the music to put it on the iPod, you click into the iPod tab and sync it with your library.
    This article may help: http://support.apple.com/kb/HT1386
    Does that answer your question?

Maybe you are looking for

  • What settings do i use with Entourage

    i had a mobile me account....i migrated to iCloud.  i still use my email address with @mac.com.  iCloud works on my iphone and i get the email pushed to my iphone.  however, i now get server time outs from my computers when accessing the emails.  i s

  • Font Book Vs. Font Explorer

    Hi all I have for some time found a simple pleasure in downloading and collecting fonts, don't ask me why I find it relaxing, I don't know I was wondering what other people thought of LinoType's Font Explorer as an alternative to Apple's Font Book. P

  • Nokia pulled Nokia messaging ?

    I have 5800xm vith v40 and i just did a hard reset. I downloaded the Nokia Messaging V10.2 from software update and i cannot get it work. After the installation , 2 icons were in the apps folder, one is email set up another is email. No matter which

  • Anyone else's iphone rebate number not work?

    Just got back from the Apple store buying an imac. I tried to use my three $100 rebate codes, but only 2 worked. The Apple guy said that has happened a lot, and to just email Apple about it and they will get you another code... Well, he said the emai

  • Iweb site won't open

    my iweb program will not display site or new site. all in grey. how can i fix this? i have no receord of the site i bulit anywhere else