EXC_BAD_ACCESS when reading file in viewWillAppear

Hi,
When I'm loading my main view in loadView function I show a modal view with list of file names. When the user chooses the file name I show a modal view with password request. If the password was correct, I dismiss password view and in the viewWillAppear of the chooseFileView open the requested file and immediately call
[self.parentViewController.navigationController dismissModalViewControllerAnimated:YES];
in order to return to the main view controller and update it with the data I've got from the file.
For some reason, I get the following stack:
#0 0x925f1907 in __forwarding__
#1 0x925f1a12 in _forwarding_prep_0__
#2 0x964ea20f in NSPopAutoreleasePool
#3 0x30a65502 in _UIApplicationHandleEvent
#4 0x31699522 in SendEvent
#5 0x3169b88c in PurpleEventTimerCallBack
#6 0x92572615 in CFRunLoopRunSpecific
#7 0x92572cf8 in CFRunLoopRunInMode
#8 0x31699d38 in GSEventRunModal
#9 0x31699dfd in GSEventRun
#10 0x30a5dadb in -[UIApplication _run]
#11 0x30a68ce4 in UIApplicationMain
#12 0x00002646 in main at main.m:14
with EXCBADACCESS in
2008-11-13 21:57:28.349 SafeWallet[4822:20b] * -[NSConcreteData release]: message sent to deallocated instance 0x4707d50
How do I trace this exception? I don't have any data of type NSConcreteData. What it can be?
May be all these modal views should be handled in other way?
Thanks,
Nava
P.S. I found on some thread, that I can enable Zombie environmental variables, but how can I see a proper stack on debugger?

Well - I'll shoot straight with you... I hate looking at that stack stuff. I walk paths through my code until I've isolated the problem area - and look at the objects I'm using - it usually revolves around "over-Release]-ing". and remember to break in drawRect and stuff - it's on a separate thread.
I use diagnostics like...
NSInteger huh = [dumbObject retainCount];
and look at that var after i pass through it in debug mode... Odds are I thought I'd retained something after ripping it's lifeless form out of an array and oops... I killed the poor thing.

Similar Messages

  • Error 1156 in LV7.0 when Read File

    Hello,
    we programmed a software with LV6.1.
    Now we use LV7.0 and we have a problem to open
    old binary data files with it. If we want
    to open a file with "Read File" it occurs the error
    "1156". We change nothing at these routines, everything
    works with LV6.1.
    Has anybody the same problem or know whats to do?
    Best Regards
    Patrick Frank

    Patric,
    This problem has already been reported to NI, and the LabVIEW team is currently investigating a solution. From what I can tell, it looks like the problem occurs when trying to read a datatype that is not in the file. This will result in the misleading out of memory dialog.
    Make sure that you specify the correct data type to read.
    Other than that, I have no workaround information.
    How Do I Read and Write an N-Dimensional Array to a File in LabVIEW
    Zvezdana S.
    National Instruments

  • JDOM "IllegalStateException: Root element not set" when reading file

    Hello, I am relatively new to XML. I am trying to read an xml document to parse some information out of it. I basically have a large amount of data I want to load into my program. I could program it all in as static arrays, but I thought xml would be easier, and make changes easier.
    I am trying to use JDOM, and have the project set up. My problem is when I read the document, it always gives a root element not set exception. Here is my xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <root>
        Contents
    </root>Very basic, I'm using this to get things started. Here is my code for reading it:
            SAXBuilder sb = new SAXBuilder();
            Document d = new Document();
            try {
                sb.build(new File("test1.xml"));
            catch (JDOMException jdome) {
                System.err.println(jdome);
            catch (IOException ioe) {
                System.err.println(ioe);
            d.getContent();Whenever I try to do anything with the contents of the Document, like d.getContent(), it always throws a java.lang.IllegalStateException: Root element not set. It reads the file successfully (as far as I can tell), but it's like the xml file is empty. I can't find anything on the web about this problem, and every tutorial says to do exactly what I've done, but never mention any possible problem. It can find the file, and I can write to an xml file as in other tutorials, but reading one in is a problem.
    I chose JDOM because it seemed simplest for just reading in a large amount of data and parsing it out into variables. This is a very simple project, so I don't want to spend a lot of time writing xml parsing code, I'm only using xml because it will probably be easier than hard coding the data. Would a different xml api be easier to use for my purposes?
    Message was edited by:
    hunter9000

    You must always give the browser an either an absolute URL from the top of
              the web server (not the
              web application) or a relative path from the current page.
              Sam
              "Vijay Kumar" <[email protected]> wrote in message
              news:[email protected]..
              > Hi
              >
              > I get the 'getResource is called when document root is not set.' error
              > when I access any files in the webapp with their absolute path.
              >
              > Environment: WIN/NT SP3, WL5.1 SP5 as the webserver and app server.
              >
              > My webapp located in d:\temp is deployed as foo
              > weblogic.httpd.webApp.foo=d:/temp
              >
              > For example:
              > I can access a file in d:\temp\secured\home.html using
              > test
              >
              > However if with in an html I try to access the file using the abs path
              > from doc root
              > test I get an error
              >
              > and I guess the default servlet looks for the servlet-context named
              > 'secured'
              >
              > Can someone tell me if I can set the documentRoot in the web.xml or
              > weblogic.xml
              > file OR if there is any other way to access to the file using the abs path
              > of /secured/test/test.html
              >
              >
              > Thanks in advance
              >
              > Vijay
              >
              >
              >
              >
              

  • Problem with READ DATASET when reading file from app server

    Hi,
    wondering if anyone can help, I'm using the following code to read from a file on app server, the file is of type .rtf
    OPEN DATASET file_rtf FOR INPUT IN TEXT MODE
                                 ENCODING DEFAULT
                                 WITH SMART LINEFEED.
    DO.
    READ DATASET file_rtf INTO string.
    IF SY-SUBRC = 0.
    EXIT.
    ENDIF.
    ENDDO.
    the open dataset part works sy-subrc = 0, but the read returns sy-subrc = 8 and no data is passed to string.
    Any ideas as to what is causing this problem appreciated, <removed>
    Thanks
    Edited by: Thomas Zloch on Mar 17, 2010 3:57 PM - please don't offer p...

    Hi Adam,
    The source code in the below link has details about how to read/write to application server.
    [Application server file operartions|http://www.divulgesap.com/blog.php?p=NDk=]
    Please let us know if you have any issues.
    Regards,
    Ravi

  • Dynamic folder name (when reading file in file adapter)

    Hi,
    I have to read a file always with the same name but it can be in different directories.
    For example:
    FTPHome/Folder1/file.txt
    FTPHome/Folder2/file.txt
    I've tried to define a mask for path name but it doesn't work:
    Something like this /FTPHome/Folder*/
    It's possible to do that what I'm trying

    Sudharshan nice... indeed you are right! You learn something everyday
    Advanced Selection for Source File
    If you want to set an exclusion mask for the File Name specified above, or if you want to specify multiple directories using a file name mask and exclusion mask, set the Advanced Selection for Source Fileindicator.
    ○       Specify an Exclusion Mask for the file name specified above.
    You want to process all files that have the extension '.txt', but want to exclude all files that begin with the letter 'a'. To do this, enter .txt for File Name, and a for Exclusion Mask.
    ○       You can enter additional specifications for source directories, file names, and exclusion masks in the table. This data is processed in addition to the details specified above.
    Edited by: Alex on Jul 8, 2008 11:11 AM

  • Permission denied when read file with setGID

    I'm using a NFS system. I noticed that once I set setGID to a file, e.g.
    chmod g+s myfileThe file become un-readable (even root user is not able to access it). if I try to read, i got:
    tail myfile
    cannot open `myfile' for reading: Permission deniedWhat could be problem? using ls -l or getfacl, I can see owner,group, other all have read permission though:
    ls -l
    -rw-r-Sr--+  1 oracle dba  5 Sep 19 07:51 myfile
    getfacl myfile
    # file: myfile
    # owner: oracle
    # group: dba
    user::rw-
    group::r--
    mask::rwx
    other::r--

    Using the nosuid option is a good idea and you should consider using this with all NFS mounted disks. It means that the server's root user cannot make a suid-root program on the file system, log in to the client as a normal user and then use the suid-root program to become root on the client too. http://tldp.org/HOWTO/NFS-HOWTO/security.html
    You could ask your system administrator to check file permissions on the parent directory, but it will require a more in-depth review of your configuration to analyze what's going on, and this is not possible unless you provide more information.

  • Checking for EOF when reading files

    hi all, the code below only reads from halfway through the file, and at the end it throws an EOFException. i thought that "while (os.readObject() != null)" would prevent this, but apparently i need to use something else. can someone help? thanks.
           load.addActionListener(new ActionListener()
               public void actionPerformed(ActionEvent e)
                   try
                      FileInputStream in = new FileInputStream("test.txt");                
                      ObjectInputStream os = new ObjectInputStream(in);
                   while (os.readObject() != null)
                      System.out.println((String)os.readObject());
                   os.close();
                   in.close();
                      catch (Exception ex)
                      System.out.println(ex);
           }); 

    I thought that "while (os.readObject() != null)" would prevent thisWhy did you think that? The javadoc doesn't say that anywhere.
    What you will get is a java.io.EOFException.
    As the other posters have said, you are skipping every odd-numbered object in the file with your present code.

  • Read file when runing application only having filename and without path

    Hi everyone, I am writing a simple program call ReadAP to read a text file. the text file are putting in a same directory with the Class of ReadAP when running
    To execute this program, in the DOS mode should input the following command which contain the filename :
    java ReadAP text.txt
    text.txt is the text file I want to read from this application
    The most important things is that, the filename enter in the command line when execute ReadAP should not be include the path (e.g C:\text.txt)
    The specification is that the user should not enter the pathname and filename when exceute such as
    java ReadAP C:\text.txt ------> is not allow
    It only should enter the filename when excute, and that text file should be exist in the same directory of the class of ReadAP when runningof this project such as java ReadAP text.txt ------> is allow
    It is due to RandomAccessFilem, File, InputStream when create file it should mention the path and the filename,
    if I only having the filename, I cannot read the file.
    So Is there having any method to get the path of the application runing?
    If no, Is it having any another method for doing the above?
    Can everyone be help me? Thank you very much attentation

    Look into System.getProperty("user.dir"). It provides the current working directory.
    #

  • "Unable to read file" error in Excel 2010 when downloading .xls file from IE11

    We have lots of reports that have links for our users to be able to download report results in Excel format. We accomplish this by using the Excel mime type in our .asp pages. Sporadically, we are seeing "Unable to read file" errors in Excel 2010
    after choosing Open from the IE11 save dialog. Choosing Save/Save As and the file will open just fine.
    Also, we can sometimes cause the error to occur more frequently by switching windows during the time when the file is downloading.
    If the file is opened directly from /Temporary Internet Files then it opens just fine.
    Window 7 64-bit
    Thanks in advance!

    Hi,
    I found you replied in a similar thread, did you try the workaround (Reset the IE) that provided there? Did you change a browser to test?
    Then, I suggest we use Process Monitor to do further troubleshooting. Please collect all the actions of IE.exe and Excel.exe, and check the if there are some
    error message/code during you open XLS file from IE 11.
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • How to set password for a zip file and should be checked when reading that

    Hi friends,
    how to set password for a zip file and should be checked when reading that file???
    thanks.
    Praveen Reddy.J

    Heyy man, i think, u did not get my problem.
    all i have to do is:
    i have to create a zip file, and we should secure it with password when creating. and whenever the user wants to open that zip file he should provide correct passowrd otherwise he could not read that file. So, we should check for that also.
    Tanks for reply.

  • Before, when reading PDF files, I was able to copy and paste part of the book. Now it is not possible. I can copy but when pasting gets nothing.  Antes, quando lia arquivos PDF, eu conseguia copiar e colar parte do livro. Agora isso não é possível.

    Before, when reading PDF files, I was able to copy and paste part of the book. Now it is not possible. I can copy but when pasting gets nothing.
    Antes, quando lia arquivos PDF, eu conseguia copiar e colar parte do livro. Agora isso não é possível. Eu consigo copiar, mas quando vou colar o texto, não cola nada.

    Caro Fabiano,
    Obrigado por ter contactado as Comunidades de Suporte Apple.
    Na origem do seu problema podem estar várias causas. Nomeadamente:
    O ficheiro (arquivo) que está a ler pode não ser texto, ou seja, pode ser texto transformado em imagem e exportado como PDF.
    A aplicação de destino (onde está a tentar colar o texto copiado) pode não aceitar a colagem de texto formatado.
    A aplicação que está a utilizar para abrir os ficheiros PDF pode não ser indicada para certo tipo de documentos. Experimente o iBooks, o Dropbox ou até mesmo o seu e-mail.
    No caso de nenhuma destas causas estar na origem do seu problema, forneça, por favor, mais informações sobre a origem do ficheiro (descarga pelo Safari, Mail ou outro) bem como o destino (documento Pages, Keynote ou Numbers ou outra aplicação que não o iWork).
    Atentamente,
    Gonçalo Matos
    Estou aqui para ajudar. Clique no botão "Reply" no caso de ter outra questão ou necessitar de outro esclarecimento para que eu possa ajudar da melhor forma que conseguir.

  • Intermittent 'Unable to read file' error when exporting/opening .html to .xls

    Hi, hope someone can help.
    I have an issue where I export a report from the Salesform platform to Excel. The file that is being exported is in html format and the report does not include any Pivot tables.
    The 'Unable to read file' error occurs intermittently, when Excel is already open and you export/open it from Salesforce...
    Have tried using Excel in safe mode with all the add-ins disabled and still no joy. The
    Do not save encrypted paged to disk option has been un-ticked the in Internet Options -> advanced.
    The issue happens in IE and other browsers, after raising the issue with Salesforce support they advised to raise the issue with MS instead, so here I am to see if anyone can help!
    Any help would be much appreciated

    Tools>Internet Options>Advanced tab, uncheck "Do not save encrypted files to disk"
    check your GPO settings to see if you have configured this to be unchecked.
    Thx.
    Rob^_^

  • Syn read file adapter throwing exception when file is not present directory

    Hi Team,
    Requirment is to check for a file is present in a soa directory .If present delete the existing and write a new one.
    Syn read file adapter is throwing errors when file is not present in the directory soa local.
    Any paramter we can add to skip this exception.
    any help is appreciated.
    Thanks all
    Swetha H.

    Hi:
    An alternative is that , before u try to read it, u make a list directory, and search for ur file, if it is not in the list, then u don't read; otherwise, u do.
    The list operation is part of the file adapter.
    hope this helps
    best

  • I'm trying to Ignore a file header when reading a file, but no succes?? Take a look.... please...

    I posted the question in another forum,
    Take a look at my VI,
    What is wrong
    I'm trying to ignore the Header sekvens, (the first line) when reading the data to a chart.
    but ts noyt working,, did i missed something!?
    Zamzam
    HFZ
    Attachments:
    ReadDataFile11.vi ‏87 KB

    Hi again HFZ,
    The "read file" function has an option called "line mode" which is False by default, if you link a TRUE instead, you will only read one line of your file, you can then play with the offset in a while loop to read lines until the end of the file.
    But it might be even easier to read the whole file (with line mode False) then do a "spreadsheet string to array" (look in arra palette) and then remove the first line.
    I'm sorry I don't have time to have a look/modify your VI... On top of that you'll get much more satisfaction if you get through that yourself
    have fun !
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • Is there a way to show Custom message in Outlook Mail read Inspector Window same as When a File is opened in Protected View.

    Is there a way to show Custom message in Outlook Mail read Inspector Window same as When a File is opened in Protected View.
    If we open a Document from Untrusted location,the file is opened in Protected mode and a Red Message bar is shown below the ribbon for Excel,Word apps.
    Can we show this type of similar message bar with custom Message in Outlook or any other Office App.

    Are you displaying an MSG file? Keep in mind that Outlook creates a temporary copy in one of Outlook folders, so strictly speaking your are not looking at a file.
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

Maybe you are looking for

  • CSV and PDF export in interactive report

    Hello all, how can I make some of my columns which are visible in the report, not visible in the CSV and PDF exports. And how can I customize the width of the PDF export columns. In the normal reports it is possible in the print report settings but h

  • How do I save a slideshow made in iDVD to a different video format.

    How can I convert a slideshow made in iDVD to one of these video formats: 3g2, 3gp, 3gp2, 3gpp, 3p, asf, avi, divx, dv, dvx, flv, moov, mov, mp4, mpeg4, mpg4, mpe, mpeg, mpg, qt, wmv, xvid so I can download into photobucket. Thanks!

  • How to convert the local file into unicode file?

    Hi All, I need read local file (GUI_UPLOAD) and save it as unicode file? I've found class CL_ABAP_CONV_OUT_CE but I've no idea how to use it. Should I read file in binary mode and then convert it into unicode? AT the and save it (GUI_DOWNLOAD) ? Than

  • Remove images from Library and Trash

    I would like to be able to do this with one button to speed up editing.

  • Backup of Essbase using 2nd Instance

    Hi, Can i use 2nd instance of essbase (after installing essbase on another port on same server or another server) to copy application from sourcr to target and use it as a backup. What are the compromise i am making over general backup process. Any a