Skip to content

Bug with macro in large files #834

@mellamanjorge

Description

@mellamanjorge

I think I found a bug in NPP (possibly windows version only, didn't try others) when executing a macro that simply puts commas in fixed width data to be able to save it as CSV, so I can analyze it with R. The data files I've used are freely available from NOAA (example: ftp://ftp.ncdc.noaa.gov/pub/data/noaa/2014/873440-99999-2014.gz ; the explanation for the format used is at http://www1.ncdc.noaa.gov/pub/data/ish/ish-format-document.pdf) and in the video below I block-copied a subset of the file to a new document for the comma-treatment. The outcome would be similar with the whole file, though.

Here's a video that shows what I did: https://youtu.be/0EZ4VBLm6JQ

In it, I create the macro and it works great for a number of lines, so I had it repeat 100 lines at a time (it's 12.000+ in the file). After a couple repetitions, all of a sudden some character in the middle of a line gets deleted and a CR LF appears at the end of all remaining lines, while the first character of all following lines becomes invisible. I can delete the CR LF - and the first character appears again, but the one deleted is still gone. Also I'd still have 10.000 lines or so to go, so I won't do that manually for every following line.

Instead I undid (CTRL-Z) the last batch of 100, thinking that that would repair my file as well. But it doesn't. The commas disappear but the CR LF stays and the deleted part of the line also does not reappear. I've tried that several times, the error reappears at different lines in different tries, but it always does (yay: a reproduceable bug!), essentially corrupting the file I'm working with.

I've since found a way around NPP for MY needs, but still wanted to point this out as it might make use of macros in NPP risky.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions