Menu

unable to open files not created in Notepad++

2008-05-18
2012-11-13
  • Jackie Keiser

    Jackie Keiser - 2008-05-18

    I can't open files that I didn't originally create in Notepad++ myself. 

    If I do any of the following, I get this message: Notepad++ : a free (GNU) source code editor has encountered a problem and needs to close.  We are sorry for the inconvenience.

    -click on the file
    -right click and select Edit with Notepad++
    -right click and select Open with Notepad++
    -drag and drop the file onto the Notepad++ icon
    -drag and drop the file into the open Notepad++ window
    -try to open the file within Notepad++

    If I created it myself however, it opens just fine.

    Anyone have any solutions?

     
    • John Griswold

      John Griswold - 2008-05-29

      I figured out at least my part of the problem... It took most of the afternoon, but it was really starting to bother me.

      I noticed, finally, that in a Windows Explorer window, the files that were bothersome didn't have dates listed. Some or most of the files like that are coming from an embedded Linux system that doesn't have a real-time clock, and doesn't bother to use NTP to find out what time it really was. Turns out that Notepad++ has a huge problem with files that were "created" before January 1, 1970, which is, after all, when time began ;)

      I'm 99.8% convinced that that's the problem... Don't know what part of the code is doing that, so I might have to check it out.

      I used a utility named FileDate.exe ( http://www.nirsoft.net/utils/filedatech.html ) to bring the file date into the present, and I was able to open the file. Back to May 29, 1970, and I was able to open the file. May 29, 1969, and Notepad ++ crashes.

       
      • Harry

        Harry - 2008-05-29

        1970 is that awesome date where the time sometimes is zero, see:
        http://en.wikipedia.org/wiki/Time_t

        Since Notepad++ makes use of time_t to check if a file has been changed outside, this could very well be the source of the crash.
        I'll take a peek at it, I'm working on the file loading system anyway so I may as well take that into account.

        There's probably a better alternative to time_t to fix the problem.

        -Harry

         
    • Jackie Keiser

      Jackie Keiser - 2008-05-22

      Any help at all? I would really like to be able to use the text editor that I've come to love but it's kind of hard when you can't open anything.

       
    • Don HO

      Don HO - 2008-05-22

      Look like this file is locked by another process.
      Did you try to open it from another application?

      Don

       
      • Jackie Keiser

        Jackie Keiser - 2008-05-22

        It's not just one file, it's files that didn't originate in Notepad++.  If I can't open it in Notepad++ I can open it in Dreamweaver or Notepad with no problem.

         
        • Harry

          Harry - 2008-05-22

          Could you check if there are any differences in the Properties dialog of each of the files (Notepad++ files and non-Notepad++ files).
          This like Compressed options, marked for archiving, read-only etc.

          If it doesn't seem to matter, could you see if a clean copy of Notepad++ helps? Download the latest binary package (zip file, not installer), and run Notepad++ from there (all plugins disabled if possible).

           
    • Jackie Keiser

      Jackie Keiser - 2008-05-24

      I created two files with nothing in them, one in notepad and another in notepad++.  Both could be opened in notepad++ so I guess being unable to open files that didn't originate in notepad++ is not the problem.

      When I compared the properties of a file I made and a file I had downloaded the only difference was that the one I downloaded was not marked for archiving.  When I check it however, it still doesn't open in notepad++.

      I copied the text over from a file I downloaded (and was unable to open with notepad++) into dreamweaver and saved it then tried to open it in notepad++ and it worked.

      Now I'm just confused -_-

       
    • John Griswold

      John Griswold - 2008-05-29

      I have a similar problem but it's not just files that I didn't create in NP++. I can make changes to a file on an embedded Linux box (XML configuration files), and after uploading them to my XP box, I can't open the file. I can copy the file to a .txt file and open it. I do fc /b to compare the two files and the txt file is identical. I can open an identical XML file with no problem. If I rename an offending XML to TXT, the crash occurs, too.

      Very bizarre - any clues? Any bug fixes around the corner?

      Thanks

       
      • Fool4UAnyway

        Fool4UAnyway - 2008-05-29

        Instead of renaming a file, try the type command to create a new copy and see if that one can be opened.

        type filename.xml >filename.txt