×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    15

    Question ParseFileL Panic KERN-EXEC 3 When file not exist

    iDomParser.ParseFileL crash when the xml file does not exist

    Code:
    RXmlEngDocument document;    
          TBuf<KFilePathSize> filepath(iDrive);
         _LIT(KFilename,"\\xedomexample\\input\\XML_parsing_001.xml");
         filepath.Append(KFilename);
         TFileName srcFileName(filepath);
         document = iDomParser.ParseFileL(srcFileName); 
       	  if(document.NotNull())
    	 	{
    	 	    QMessageBox msgBox;
    	 		
    	 		msgBox.setText("Existe");
    	 		msgBox.exec();
    	 		document.Close();
    	       
    	 	}
    file .h

    Code:
    ...
    private:
    
        Ui::testXMLClass ui;
    	// DOM Implementation, needed for initializing XmlEngine library once
    	RXmlEngDOMImplementation iDomImpl;
    	RXmlEngDOMParser iDomParser;
    };

    constructor:
    Code:
    testXML::testXML(QWidget *parent)
        : QDialog(parent)
    {
    	iDomImpl.OpenL();
    	// Instantiate the parser
    	TInt err = iDomParser.Open( iDomImpl );
    	if(KErrNone != err)
    	    User::Leave(err);
    thank you in advance for your answers

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: ParseFileL Panic KERN-EXEC 3 When file not exist

    Are you sure that iDomParser.ParseFileL() will gives panic? it may be possible that iDomParser.ParseFileL() leave with KErrNotFound and not returned valid handle to RXmlEngDocument, so next line if(document.NotNull()) may gives you a panic.

    What would i suggest is call iDomParser.ParseFileL() in TRAP harness, so that you can handle if leave occures.

  3. #3
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: ParseFileL Panic KERN-EXEC 3 When file not exist

    between, it will be better to let us know which exact line is the reason for the panic.... !
    Amit Kankani
    Nokia Developer Champion

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: ParseFileL Panic KERN-EXEC 3 When file not exist

    anyway, would it be easy to check if the file exists, and only if it does continue with your code.. Then you would never get to the point where it crashes..

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    15

    Thumbs up Re: ParseFileL Panic KERN-EXEC 3 When file not exist

    Thank all..

    Quote Originally Posted by savaj View Post
    Are you sure that iDomParser.ParseFileL()....
    Quote Originally Posted by amitkankani View Post
    between, it will be better to let us know which exact line is the reason for the panic.... !
    If yes when I put the following code in the comment I also crash in debug mode.



    Quote Originally Posted by symbianyucca View Post
    anyway, would it be easy to check if the file exists, and only if it does continue with your code.. Then you would never get to the point where it crashes..
    yes, it can be the solution must be just that I find how to test the existence of a file


    I think I found my code is based on "C:\S60\devices\S60_5th_Edition_SDK_v1.0\S60CppExamples\XeDomExample"
    and call functions using ParseFileL occurs with the TRAP instruction:
    Code:
    TRAP(err, ParseExampleL());

    I run to apply this to my code,

    thank you all again

  6. #6
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: ParseFileL Panic KERN-EXEC 3 When file not exist

    Quote Originally Posted by bbil
    If yes when I put the following code in the comment I also crash in debug mode.
    I have not suggested to put that line in comment. i just said that put that line in TRAP harness so that if leave can occur that you can handle it.

  7. #7
    Registered User
    Join Date
    May 2009
    Posts
    15

    Thumbs up Re: ParseFileL Panic KERN-EXEC 3 When file not exist

    Quote Originally Posted by savaj View Post
    I have not suggested to put that line in comment. i just said that put that line in TRAP harness so that if leave can occur that you can handle it.
    Yes sorry I do not (I have trouble with my English)

Similar Threads

  1. Listbox in dialog gives 'Kern Exec 3' on mobile
    By hansapariya in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-07-24, 07:01
  2. Contacts fields order??
    By timatima in forum Symbian
    Replies: 1
    Last Post: 2007-06-08, 13:51
  3. Replies: 1
    Last Post: 2005-05-26, 14:22
  4. nokia 7210 modem via IR doesn't work !
    By oussamaaiadi in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-03-06, 10:46
  5. Replies: 0
    Last Post: 2002-06-10, 12:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×