NSCFString crash app when secondary used

Hello! NSCFString from plist crash my program when i using it in the second time. I have cocos2d project (attach) with one scene and one object. And one .plist file
HelloWorldLayer.h & .m (instantiate from CCLayer)
NodeObject.h & .m (instantiate from CCNode)
Test.plist
In NodeObject i have one local string and two method
@interface NodeObject : CCNode
    NSString *stringForPrint;
-(void)createObjWithString:[NSString *)string;
-(void)printString;
In this both method we print string obtained in parameter string
-(void)createObjWithString:[NSString *)string
    stringForPrint = string;
    NSLog(@"NodeObject.createObjWithString stringForPrint >> %@", stringForPrint);
-(void)printString
    NSLog(@"NodeObject.printString stringForPrint >> %@", stringForPrint);
Plis content is one array with one dictionary whit item type string.
Root
-TestArray <Array>
--item 0 <Dictionary>
---type <String> == "This is string from plist"
For test, into the scene i'm create NodeObject and get dada from plist. And print this string. It's work correctly.
if ([testDictionary objectForKey:@"TestArray"]) {
            for (NSDictionary *tempItemData in [testDictionary objectForKey:@"TestArray"]) {                //It's cool work. True string from plist.
                NSLog(@"type form plist in for loop > %@", [tempItemData objectForKey:@"type"]);            }
I create my NodeObject into the loop. And it's work again.
if ([testDictionary objectForKey:@"TestArray"]) {
            for (NSDictionary *tempItemData in [testDictionary objectForKey:@"TestArray"]) {
                NodeObject *testObj = [NodeObject node];
                //and send it string from plist
                [testObj createObjWithString:[tempItemData objectForKey:@"type"]];
BUT! if i have tried use this string in the printString method form NodeObject, app will crash without log. [testObj printString]; //crash app
I have check object from plist using:
    NSLog(@"Description %@ and class %@",[[tempItemData objectForKey:@"type"]description],    [[tempItemData objectForKey:@"type"]class]);
I repeat. Object creation with manual string work. If using string from plist it's crash. I broke my head. And only in the second method. In the createObjWithStrig it work.
    //Work
    NodeObject *testObj = [NodeObject node];
    [testObj createObjWithString:@"manual string object"];
    [testObj printString]; // Print correct string
    //Crash
    NodeObject *testObj = [NodeObject node];
    [testObj createObjWithString:[tempItemData objectForKey:@"type"]];
    [testObj printString]; //Crash here
I'm attach project file. Can test this

Thank you wery match!
Only this forum help me. Stackowerflow not halped, cocos2d-iphone not helped. Thaks @etresoft
stringForPrint = [string retain];
solved problem.

Similar Messages

  • Firefox crashes - even when not using the computer

    Firefox crashes - even when not using the computer
    Sometimes I can walk away from the computer and only have one tab open (e.g. Facebook) and when I come back to the computer a few hours later, Firefox has crashed for no reason.

    Unfortunately the linked crash report is empty (@ EMPTY: no crashing thread identified; corrupt dump) and doesn't include any data, so it is not possible to find the cause of the crash.
    Did you recently submitted other crash reports that were submitted and show a crashing thread?
    See:
    *http://kb.mozillazine.org/Firefox_crashes
    *https://support.mozilla.org/kb/Firefox+crashes
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Create a new profile as a test to check if your current profile is causing the problems.
    See "Creating a profile":
    *https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins" in case there are still problems.
    If the new profile works then you can transfer some files from the old profile to that new profile, but be careful not to copy corrupted files.
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • Passing Variable to air app when launch using Badger

    Hi all,
    I am going to desperately to develop my application. Hope someone can help me........
    I am using badger for air which I get it here http://www.adobe.com/devnet/air/articles/badger_for_air_apps.html and it launch my app correctly, but I can't pass any variable into my app when launch.
    I have read the instruction and adding some code like this :
    on index.html(show my badge installer):
        var so = new SWFObject("AIRInstallBadge.swf", "", "215", "180", "9.0.115", "#000000");
            so.addVariable("airversion", "1.5");
            so.addVariable("appname", "Secure%205");
            so.addVariable("appurl", "http://localhost/testing/source/secure5.air");
            so.addVariable("appid", "examples.html.HelloWorld");
            so.addVariable("pubid", "B71ED76ECC937067D72BB9A0CDB516D1A8F43A9E.1");
            so.addVariable("arguments", "launch from browser");// this is my code
            so.addVariable("appversion", "0.1");
            so.write("flashcontent");
    on index.html(my initial content) :
    var urlMonitor;
    var urlReq;
    var invokeEvent;
    var applicationID = "myappid";
    var publisherID = "mypubid";
    var applauncarg;
    //var admin="admin";
    function doWindow()
    var options = new air.NativeWindowInitOptions();
    options.transparent = false;
    options.systemChrome = air.NativeWindowSystemChrome.STANDARD;
    options.minimizable = false;
    options.maximizable = false;
    options.resizable=false;
    var windowBounds = new air.Rectangle(0,0,air.Capabilities.screenResolutionX,air.Capabilities.screenResolutionY);
    var urlreq="http://www.example.com";
    var newHTMLLoader = air.HTMLLoader.createRootWindow(true, options, true, windowBounds);
    newHTMLLoader.load(new air.URLRequest(applauncharg));
    newHTMLLoader.stage.nativeWindow.alwaysInFront = true;
    newHTMLLoader.stage.nativeWindow.addEventListener(air.NativeWindowBoundsEvent.MOVE,handlem ove);
    newHTMLLoader.stage.nativeWindow.addEventListener(air.Event.CLOSE,onCloseCommand);
    urlMonitor = new air.URLMonitor(new air.URLRequest("http://www.example.com"));
    urlMonitor.addEventListener(air.StatusEvent.STATUS, onStatusChange);
    urlMonitor.start();
    air.NativeApplication.nativeApplication.addEventListener(air.InvokeEvent.INVOKE, onInvoke);
    //urlReq=new air.URLRequestDefaults.manageCookies = true;
    function handlemove()
    newHTMLLoader.stage.nativeWindow.x=0;
    newHTMLLoader.stage.nativeWindow.y=0;
    function onCloseCommand(exitingEvent) {
    var winClosingEvent;
    for (var i = 0; i < air.NativeApplication.nativeApplication.openedWindows.length; i++) {
    var win = air.NativeApplication.nativeApplication.openedWindows[i];
    winClosingEvent = new air.Event(air.Event.CLOSING,false,true);
    win.dispatchEvent(winClosingEvent);
    if (!winClosingEvent.isDefaultPrevented()) {
    win.close();
    } else {
    exitingEvent.preventDefault();
    if (!exitingEvent.isDefaultPrevented()) {
    //perform cleanup
    function onInvoke(e)
    //apparg=event.applauncharg.toString();
    //alert ('oK'+apparg);
    applauncarg = event.arguments;
    air.trace("onInvoke : " + event.applauncharg);
    //air.Introspector.Console.log( applauncarg );
    alert (applauncarg);

    sory, there is mistake here......
    the question isn't finish yet.
    function onInvoke(e)
    //my code
    applauncarg = event.arguments;
    air.trace("onInvoke : " + event.applauncharg);
    alert (applauncarg);//just to make sure the variable had been sent correctly
    My application running smoothly but there is no alert that show applauncharg variable.
    then I am trying to know if invoke event run correctly or not by adding code
    alert ("OK");
    and it works, so there is no problem with the event listener.
    does any one know if I missing something or any thing wrong with my code?
    sory, there is mistake here......
    the question isn't finish yet.
    function onInvoke(e)
    //my code
    applauncarg = event.arguments;
    air.trace("onInvoke : " + event.applauncharg);
    alert (applauncarg);//just to make sure the variable had been sent correctly
    I have get the answer. If someone need the source code, just Pm me and I'll give you my Source to help you.
    The first is to make sure that your action scipt code can handle the argument that passed by javascript.
    Make attention between invoke event and browser invoke event! it is almost same but they are different.
    If you type browser invoke event, it seems browser invokeevent doesn't recognized, but it works.
    The second is my mistake on source code. onInvokeevent shold be like this :
    function onInvoke(e)
    //my code
    applauncarg = .arguments;
    alert (applauncarg);
    -closed-

  • My iPad 1 closes my apps when I use them.

    So basically, when I use my apps on my iPad 1 64gig, they just randomly shut down. This happens to every app. Safari, Skype, Angry birds, Garageband... Every app.
    Help Apple, please fix this! This started happening after iOS5 update.

    These are user-to-user forums, they are not monitored by Apple (there are too many forums/threads/messages for that to happen).
    Have you tried closing the app completely ? From the home screen (i.e. not with iTunes 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the iTunes app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work then you could try a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • CRViewer crashes app when 2nd report is requested

    I have an app developed in VB6 using Crystal Reports XI. Reports are viewed within the app using the CRViewer. Everything works fine on XP. My app works fine on Vista also, but the reports do not. The first time I view a report all is well, but when I try to load a second one (even if I've done other functions in between) it crashes the entire app. Also when trying to print the report using the viewer, the app crashes. I have to export to a txt file in the application and then print it from there. Any ideas how to correct these issues?

    Crystal Reports XI release 1 (11.0.0.x) has not been tested on Vista. See [this|https://www.sdn.sap.com/irj/scn/wiki?path=/pages/viewpage.action&pageid=64259646] wiki for more details.
    I recommend upgrading to CR XI release 2 (11.5.x). Follow these steps:
    1) Download CR XI r2 from here:
    https://smpdl.sap-ag.de/~sapidp/012002523100006008462008E/crxir2.zip
    2) Uninstall your current version of CR before installing CR XI r2.
    3) Install CR XI r2. Use the keycode from CR XI r1.
    4) Download and apply the latest Service Pack for CR XI r2 from here:
    https://smpdl.sap-ag.de/~sapidp/012002523100013876392008E/crxir2win_sp5.exe
    5) Update the Crystal Reports references in your project.
    6) Use the CR XI r2 msm files for your deployment.See [this|https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsReportDesignerComponentRuntimeDistribution-Versionspre8.0.xto12.0] wiki for more details.
    Ludek

  • CRViewer on Vista crashes app when 2nd report is requested.

    I have an app developed in VB6 using Crystal Reports XI. Reports are viewed within the app using the CRViewer.  Everything works fine on XP.  My app works fine on Vista also, but the reports do not.  The first time I view a report all is well, but when I try to load a second one (even if I've done other functions in between) it crashes the entire app.  Also when trying to print the report using the viewer, the app crashes.  I have to export to a txt file in the application and then print it from there.  Any ideas how to correct these issues?

    Hi,
    Give it a try by turning off the DEP service of Vista.
    Also is the Vista is 64 bit?
    It seems that you are having issue with Crystal reports SDK's.
    Post your question in [Crystal Reports .NET SDK forum|SAP Crystal Reports, version for Visual Studio;.
    That forum is monitored by qualified technicians and you will get a faster response there. Also, all SDK queries remain in one place and thus can be easily searched in one place.
    Thank you for your understanding,
    Amit

  • Snip tool for OneNote app when not using OneNote via desktop

    When using the OneNote app (not the OneNote program via the desktop) from my Asus Transformer Book t100, I can't use the snip tool. Or even find it. I can use it if I open OneNote from my desktop, rather than as an app from the Start display. Which kind
    of defeats the purpose of using the OneNote app. 
    Help please! I want to screenshot a pdf document (which opens via the adobe pdf app) but I can only take snips of stuff open in the desktop app.
    Thanks.

    Hi,
    The snip tool is not included in OneNote app for Windows in the Windows store. But we can capture your screen with the
    Share Charm. With Windows 8.1, anytime you see something on your screen, you can capture it and send it to OneNote by using the Windows Share Charm.
    To do this, in a Windows Store app, use the Share Charm and choose Screenshot from the dropdown menu. When you’re using the desktop, it will always create a screenshot for you. OneNote will show you a preview of the screenshot before you
    send it to OneNote.
    For more information, please refer:
    http://blogs.office.com/2013/11/25/a-big-onenote-update-for-windows-note-taking-devices/
    Regards,
    Steve Fan
    TechNet Community Support

  • Issues with Apps when not using Wi-Fi

    I just recently got the Droid RAZR and I've been having trouble using some of the apps (GPS Navigation, Pandora, Play Store, Browser, etc.) when I am not using Wi-Fi. Yesterday I tried to go for a run in while the phone stated I had a full 5 bars of 4G service, my connection to the server continued to timeout. This re-occurred when I tried to search for directions to an address. I have verified that GPS is enabled... I was easily able to do run these apps without Wi-Fi on my old Droid 1...
    Does anyone have any ideas why this may be happening?

    Thanks for your contribution, Wildman.
    Hello Snunners,
    I know how frustrating it is experiencing difficulties with applications you use on a daily basis. I ask that you clear the cache on these applications by going to Settings> Applications> Manage Applications> All> Select the application and Clear Cache. Please make sure you have the latest software update installed on your device. Let us know if you continue to experience difficulties.
    DaisyP_VZW
    Follow us on Twitter @VZWSupport

  • How can i let people make adjustings in my app when they use it

    I want people to adjust their wishes in my app. 
    So if I would set 4 website links to 4 random websites. Then people that download my app should be able to adjust the website to any of their favourites. This way it works best for them.
    Can anyone please explain how it's possible to do this with Dreamweaver CS6
    Thanks in advance

    It's a little clearer, but not 100%. The application needs to allow the user to store their favorites in a database table on your server. For example, the database might have two tables - one to store the user's credentials and other related data, and another table to store their favorite url's. DW has some built in server behaviours for inserting, deleting and displaying data from a database that can help with this, but you really need to be familar with programming in the server side language you are using as well as SQL.
    But I'm still confused as to how you are building this. This forum is for server side appliation development, but you mentioned that people would download your app? What are they downloading? Have you started building this? What server side scripting language are you using?

  • Why did iso7.1.1 change the ability to see your apps when you use four fingers to partly close the app your in. In 7.1 you could use four fingers to partly close a app and see all the apps on that home screen. I used this all the time to check the date

    Why did ISO 7.1.1 change the feature where you could use four fingers to close an app and see if he other apps on your home screen as you were closing an app. This was the handiest feature I thought because I could partially close the app I was working in and see the  date or other things on my home screen and then released the four finger position and be right back to the app I'm working in. Please change this in the next update back to the way it was!!!!!

    I get the multitasking list (all prior apps, scrollable) and can switch to an app, swipe up to force it closed instead of "at rest" and can click back to the originating app in the same place i was prior to the swipe,

  • Just upgraded from FrameMaker 7.2 to version 12. When I try to create a pdf of a book using .ps file, this crashes. When I use the SaveAsPDF option, the graphics either missing or only partially shown in the resulting PDF. Any ideas?

    I just upgraded from FrameMaker 7.2 to version 12. When I create the .pdf of a book using the SaveAsPDF option, the many of the graphics are either missing or partially missing. Any ideas why?

    1. Check to see whether you're fully patched (the latest release is 12.0.4 - you need to install the patches in order).
    2. Use the RGB option instead of the CMYK (unless you are creating output for press production).

  • CS4 Crash's when I use Vanishing Point

    I am using the Adobe Photoshop CS4 Class room in a book. Every time I am using the Vanishing Point Filter the program crashes.

    hello
    Today I experience just the same :Working on Lesson 9 in Classroom in a Book resulting in a Photoshop crash.
    I get this volapyk message:   Application Error: The instruction at 0x33f84a2d referenced memory at 0xffffffff. the memory could not be read. Clikk OK to terminate the program.
    In this threads the latest advice, which maybe solved it, was:
    ""Try turning off any of the Aero themes you're using. Switch to a Windows 7 Basic theme.""
    Can anyone explain that to me?
    Earlier today  I at long last responded to Photoshop's daily invitation to install the latest graphic card acceleration driver, ( just mentioned it)
    T.

  • When I updated my iPad to iOS 6.1, it crashes when i use the keyboard. What should I do?

    Hi, when I updated to iOS 6.1, I noticed that I crash sometimes when I use the keyboard. Otherwise it's fine. What should I do?

    I was on the phone earlier with apple care for some questions regarding safari, and I mentioned to him about all the problems people are have with the 6.1 upgrade, and asked what could they do if their ipad is out of warranty. He said anyone with an ipad that has problems with a upgrade, has up to 30 after it was released to call apple support for help at no cost.
    This is the route I would take next. let us know how you make out.

  • CS3 file crashing CS4 when trying to open

    I have a CS3 file that I created on the Mac and when I try to open it on my PC in CS4 it crashes.  When I use an older version of the same FLA file it opens in CS4.  Are there known issues of things that cause a file to crash going from CS3 to CS4?

    I believe I solved it. I fixed the issue through some combo of deleting all Palm files, reinstalling and overwriting the User data via my handheld. All was good with the world, and then it just happened again. I tried to launch the desktop software and just got the spinning beachball of death. I hadn't installed anything since I last successfully synched and opened the Palm software. But I remembered something...Prior to both of these incidents, I had done something different in my To Do list. When you open a To Do item, you can enter a primary category. I have all my To Dos associated with a category. But there is another category list to the right of the primary one. I have never used it before. But I was organizing some project work To Dos by associating them as a Primary category Projects and a secondary category with different names. This is helpful for creating views without cluttering my To Do categories unduly. EXCEPT...I think this is what somehow corrupted my file and caused the Desktop to hang. Each time we reinstalled and resynched from the handheld, it stripped out those secondary categories...and it works.
    Post relates to: Zire 72
    Post relates to: Zire 72

  • HT201401 My iPhone3GS has started crashing. I'll be mid-phone call, or using an app, when the screen will go dark. I have to restart it. Then it shows low battery sign (even though it was 100%). Within 1 minute of charging, iphone starts. Pl. resolve.

    My iPhone3GS has started crashing. I'll be mid-phone call, or using an app, when the screen will go dark. I'll have to do a restart. It dumps to the warning screen that there's no power and needs to be plugged in.
    Once I connect the phone to a power source, in a couple of minutes it's ready to roll again, and displaying a "full battery" icon.
    The phone is almost always fully charged when this happens, and I don't get a crash when the phone is plugged into a power source.
    Took my iphone to apple store, they informed that battery is very good and there is no need for replacement. Might be there is a problem with iphone motherboard. But they can't repair it as my 3GS crossed warranty.
    Where should I go to repair this. Within 2 years...this 32GB 3GS is almost garbage for me with no support from apple. I am ready to send it to apple for repairs and pay the repair charges.
    I tried everything... deep reset ... factory settings .... nothing is working... Apple staff pl. take care of your customers ...

    This is a User to User Forum... You are Not Addressing Apple here...
    iPhone User Guide
    The Basic Troubleshooting Steps are:
    Restart... Reset... Restore from Backup...  Restore as New...
    Restart / Reset
    http://support.apple.com/kb/ht1430
    Backing up, Updating and Restoring
    http://support.apple.com/kb/HT1414

Maybe you are looking for