• AVR Freaks

Hot!Errors while reading XML from project

Author
bog_bej
New Member
  • Total Posts : 6
  • Reward points : 0
  • Joined: 2012/05/30 07:47:13
  • Location: 0
  • Status: offline
2012/05/30 09:20:33 (permalink)
4 (1)

Errors while reading XML from project

Hello!
I have this project that opened well until today.
After doing a Mercurial revert, it stopped opening, even though the project files themselves are not commited, so they shouldn't be influenced. All I get now is "Error while reading XML from [name of project]".
 
The project is attached, if anyone wants to take a look.
Any suggestions?

Attachment(s)

Attachments are not available: Download requirements not met
#1

10 Replies Related Threads

    charon
    Starting Member
    • Total Posts : 32
    • Reward points : 0
    • Joined: 2012/04/12 10:33:40
    • Location: 0
    • Status: offline
    Re:Errors while reading XML from project 2012/05/30 12:32:07 (permalink)
    0
    I was going to suggest you check your Java version but I'm having the same problem when I try to open your project, so nevermind.
    #2
    Guest
    Super Member
    • Total Posts : 80500
    • Reward points : 0
    • Joined: 2003/01/01 00:00:00
    • Location: 0
    • Status: online
    Re:Errors while reading XML from project 2012/05/31 03:41:28 (permalink)
    0
    Java version shouldn't really be relevant, since it worked fine, and the broke with no change to java
    #3
    bog_bej
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2012/05/30 07:47:13
    • Location: 0
    • Status: offline
    Re:Errors while reading XML from project 2012/05/31 07:40:27 (permalink)
    0
    Ok, fixed it.
    I did what everyone says you shouldn't do and edited configurations.xml by hand. I created a new project and used a file comparison utility to see the differences (other than the obvious, like included files). Turns out there was a bunch of XML code that somehow disappeared. A simple copy-paste of that portion did the job
     
    PS: on another project that broke at the same time, I found a pair of empty tags (i.e: <> </>). Removing them fixed the second project
    #4
    kda406
    Junior Member
    • Total Posts : 84
    • Reward points : 0
    • Joined: 2006/09/19 07:10:10
    • Location: Atlanta, GA, USA
    • Status: offline
    Re:Errors while reading XML from project 2012/09/25 05:08:28 (permalink)
    0
    For what it's worth I just had the same (devastating) problem.  I went to a backup, but it was too fresh and had the same issue.  I too decided to edit the XML file (there was nothing to lose it seems).  I too found a pair of <> near the end, but deleting it did not fix the problem.  I compared a working, similar project's XML to the one MPLabX/Netbeans had muddled and found an extra section in the broken project.  I removed this section and the project was able to open!  Here is the code I removed to get the project to open again:
    <item path="P:/My Documents/Devel/PIC/Libraries/MC/Microchip Solutions v2012-04-03/Microchip/TCPIP Stack/Delay.c" 
                ex="true"
                overriding="false">
            <>
            </>
            <C32>
            </C32>
            <C32-AS>
            </C32-AS>
            <C32-LD>
            </C32-LD>
            <C32Global>
            </C32Global>
          </item>
    I found this post while looking for a solution to my own problem.  I post this in hopes it helps either MPLabX developers or end users to be able to get around the problem.
    -Kyle
    post edited by kda406 - 2012/09/25 05:11:28
    #5
    kda406
    Junior Member
    • Total Posts : 84
    • Reward points : 0
    • Joined: 2006/09/19 07:10:10
    • Location: Atlanta, GA, USA
    • Status: offline
    Re:Errors while reading XML from project 2012/09/25 07:02:14 (permalink)
    0
    MPLabX 1.41.  In the hours since my last post, this has happened again, on a completely separate, much simpler project.
     
    This time I put configurations.xml through XML checking software and found the specific formatting problems.  The problems were: <> on line 85, </> on line 86, <> on line 208, </> on line 209, <> on line 222, and </> on line 223.  As you can see these are in separate, unrelated sections.
     
    Once I removed these 6 errors from configurations.xml I was able to open it, everything is normal, and the project readily compiles.  I have attached the XML file for developer review.  I had to rename it to .txt to allow it to be uploaded.
    -Kyle

    Attachment(s)

    Attachments are not available: Download requirements not met
    #6
    mlp
    boots too small
    • Total Posts : 738
    • Reward points : 0
    • Joined: 2012/09/10 15:12:07
    • Location: previously Microchip XC8 team
    • Status: offline
    Re:Errors while reading XML from project 2012/09/25 17:06:26 (permalink)
    0
    kda406I have attached the XML file for developer review.

    Have you also raised a support ticket?

    Mark (this opinion available for hire)
    #7
    Jose Diaz
    Administrator
    • Total Posts : 1676
    • Reward points : 0
    • Joined: 2010/06/23 11:10:56
    • Location: 0
    • Status: offline
    Re:Errors while reading XML from project 2012/10/04 11:13:48 (permalink)
    0
    We have found that a condition where the IDE looses track and has no active project causes the problem. For v1.50 and after, we will eliminate any empty tags when configurations.xml is being written.
    For now, if the error comes up, the only way to fix it is to locate the offending empty tags and remove them by hand using a text editor.
    Jose
    #8
    spitz
    New Member
    • Total Posts : 1
    • Reward points : 0
    • Joined: 2016/05/17 16:51:25
    • Location: 0
    • Status: offline
    Re:Errors while reading XML from project 2016/05/18 14:20:08 (permalink)
    +1 (1)
    I got this problem on MPLAB on v3.26.  I had been experimenting with a new configuration, and part of the process added a new header file.  I decided it was all going badly and reverted the 3 open projects using mecurial, while MPLAB was open.
     
    Then the project with the new configuration started giving xml errors.  No clue which file, which line! The nbproject\configurations.xml and project.xml files were fine.  No xml errors,
     
    Under  nbproject\private\  there are two more xml files (not under source control) and the configuration.xml file in this directory still had knowledge of the new configuration and header file.  Deleting these sections fixed the issue.
     
    Hope this helps someone else when they face the same issue.
    #9
    JoshuaHartwig
    Super Member
    • Total Posts : 357
    • Reward points : 0
    • Joined: 2014/02/10 10:58:13
    • Location: 0
    • Status: offline
    Re:Errors while reading XML from project 2016/05/19 06:43:37 (permalink)
    +1 (1)
    I've noticed that MPLab X sometimes does not save its changes to the xml files until the project is closed or MPLab X itself is closed (never investigated the exact timing).  I suggest always closing MPLab X before switching branches/reverting commits to avoid conflicts.  Same goes for any commits that change configuration or add/remove files from the project (straight up code changes are ok to commit while it's open).
     
    I would expect your VCS to detect the changes caused by a clobbered save though... unless it's caused by desynchronization of the nbproject and nbproject/private files.  Then you probably have to do as you did, or consider deleting the nbproject/private configurations and hope the nbproject is correct.

    MPLab X red squiggles can lie.  What does the Compiler output say?
    XC8 update missing PLIBs?  Now are a separate download.  Code Configurator recommended for new projects.
    #10
    follower
    Starting Member
    • Total Posts : 19
    • Reward points : 0
    • Joined: 2018/11/27 03:31:14
    • Location: 0
    • Status: offline
    Re:Errors while reading XML from project 2019/04/23 10:44:07 (permalink)
    0
    JoshuaHartwig
    I've noticed that MPLab X sometimes does not save its changes to the xml files until the project is closed or MPLab X itself is closed (never investigated the exact timing).



    From my experience it seems to be related to what one does when using the Project Configuration "Customize..." option that leads to the "Project Properties" dialog--if an option is changed and "OK" is pressed then the change won't be written to the XML file (but as I recall the option change does take effect)--the solution is to press "Apply" first and then press "OK", it seems the "Apply" step forces the changes to be written to the XML file.
     
    (I realise this is an old thread but thought I'd add this anecdata in case it was useful to people searching later.)
    #11
    Jump to:
    © 2019 APG vNext Commercial Version 4.5