do-file corruption?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

do-file corruption?

Tatyana Deryugina
Hi everyone,

I've now several times experienced a problem where I open a previously
saved do-file and find large parts of it missing (sometimes replaced
by characters that Stata does not recognize). This has not happened to
me until I started using Stata 11. It has happened on my XP machine
and on my Vista machine. Is this a problem that others have
experienced as well? If anyone has any ideas about how to solve it,
please let me know. I have to currently save two copies of every file
in order to prevent this.

Best,
Tatyana

---------------------------------------------------------------
Tatyana Deryugina

MIT PhD Student, Department of Economics
MIT Energy Initiative Energy Fellow
(925) 349 - 8999 (cell)
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
Reply | Threaded
Open this post in threaded view
|

Re: do-file corruption?

Michael I. Lichter
How are you editing the files? Are you using the built-in do-file
editor? Are you using more than one editor?
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
Reply | Threaded
Open this post in threaded view
|

Re: do-file corruption?

Tatyana Deryugina
In reply to this post by Tatyana Deryugina
I'm using Notepad++ and the built-in editor. The problem only happens
when I open a file with the built-in editor, after which I also cannot
open it normally with Notepad++. There is no relationship (as far as I
can tell) between opening it in Notepad++ and subsequent corruption.

Best,
Tatyana

---------------------------------------------------------------
Tatyana Deryugina

MIT PhD Student, Department of Economics
MIT Energy Initiative Energy Fellow
(925) 349 - 8999 (cell)
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
Reply | Threaded
Open this post in threaded view
|

Re: do-file corruption?

Maarten buis
--- On Wed, 24/11/10, Tatyana Deryugina wrote:
> I'm using Notepad++ and the built-in editor. The problem
> only happens when I open a file with the built-in editor,
> after which I also cannot open it normally with Notepad++.
> There is no relationship (as far as I can tell) between
> opening it in Notepad++ and subsequent corruption.

That is obviously serious. I have not experienced this
problem, and I have extensively used the built-in editor.
However, I have not used Notepad++. Anyhow, I would contact
Stata's techsupport:
<http://www.stata.com/support/tech-support/tech2.html>

It would be very helpful if you can give them a sequence
of opening and closing files that on your computer leads
to corruption of the .do file. It is easier for them to
track down a problem if it also happens on their computer.

-- Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


     

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
Reply | Threaded
Open this post in threaded view
|

Re: do-file corruption?

Hua Peng
In reply to this post by Tatyana Deryugina
her saved do-file being corrupted:

 >I'm using Notepad++ and the built-in editor. The problem only happens
 >when I open a file with the built-in editor, after which I also cannot
 >open it normally with Notepad++. There is no relationship (as far as I
 >can tell) between opening it in Notepad++ and subsequent corruption.

We have not heard of any similar issue from users.  If Tatyana
would contact Stata Technical Services at [hidden email]
or me directly, we will track down the issue and report back to
the list.


--Hua
[hidden email]

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
Reply | Threaded
Open this post in threaded view
|

RE: do-file corruption?

Trelle Sven
In reply to this post by Tatyana Deryugina
I am also using Notepad++ with Stata 10 (for Stata 11 I am using the
built-in editor) without any problems.

Sven

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Tatyana Deryugina
> Sent: Wednesday, November 24, 2010 4:04 PM
> To: [hidden email]
> Subject: Re: st: do-file corruption?
>
> I'm using Notepad++ and the built-in editor. The problem only
> happens when I open a file with the built-in editor, after
> which I also cannot open it normally with Notepad++. There is
> no relationship (as far as I can tell) between opening it in
> Notepad++ and subsequent corruption.
>
> Best,
> Tatyana
>
> ---------------------------------------------------------------
> Tatyana Deryugina
>
> MIT PhD Student, Department of Economics MIT Energy
> Initiative Energy Fellow
> (925) 349 - 8999 (cell)
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
>


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
Reply | Threaded
Open this post in threaded view
|

Re: do-file corruption?

Sergiy Radyakin
In reply to this post by Maarten buis
Need more info. Here are some approaches.

1. Who is guilty, Stata or Notepad++? Create a do-file in regular
Notepad. Back it up
(copy somewhere). Open in it in Stata, close, compare with the
original. Open in Notepad++,
close, compare with the original. Thus you will find whom to blame.

2) Try to find out what is triggering the problem?
a) Is it only do-files from Notepad++ or from any program that are
exhibiting the problem in Stata
(or conversely is it only do-files or any files that are exhibiting
the problem in Notepad++)?
b) If you are using unicode (non-ASCII) characters, try to avoid them
and see if the problem persists.
c) Eliminate the hardware failures (make sure your HDD is working properly).

3) Is the problem replicatable? On another computer, other versions of
software? Install all the updates
for Notepad++, Stata and your operating system. Report all versions.

4) If you can make do-files available for investigation, that could
help, e.g. someone can spot a
suspicious combination of bytes.

Best, Sergiy Radyakin

On Wed, Nov 24, 2010 at 10:19 AM, Maarten buis <[hidden email]> wrote:

> --- On Wed, 24/11/10, Tatyana Deryugina wrote:
>> I'm using Notepad++ and the built-in editor. The problem
>> only happens when I open a file with the built-in editor,
>> after which I also cannot open it normally with Notepad++.
>> There is no relationship (as far as I can tell) between
>> opening it in Notepad++ and subsequent corruption.
>
> That is obviously serious. I have not experienced this
> problem, and I have extensively used the built-in editor.
> However, I have not used Notepad++. Anyhow, I would contact
> Stata's techsupport:
> <http://www.stata.com/support/tech-support/tech2.html>
>
> It would be very helpful if you can give them a sequence
> of opening and closing files that on your computer leads
> to corruption of the .do file. It is easier for them to
> track down a problem if it also happens on their computer.
>
> -- Maarten
>
> --------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
>
> http://www.maartenbuis.nl
> --------------------------
>
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
Reply | Threaded
Open this post in threaded view
|

Re: do-file corruption?

Michael N. Mitchell
In reply to this post by Tatyana Deryugina
Greetings

If both editors are being used simultaneously to edit the same file, this can happen. File
xyz.do is opened in the do-file editor, and then also opened in notepad++. Neither of
these programs perform "file locking", so they allow you to edit the same file twice. Here
is a potential scenario...

   * open xyz.do in both the do-file editor and notepad++.
   * In the do-file editor, make lots of changes and additions to xyz.do.
   * Save xyz.do in the do-file editor.
   * Quit the do file editor.
   * In notepad++ save xyz.do.

The last step kills all changes saved in the do-file editor. Even if this is not Tatyana's
problem, it is a cautionary tale for anyone who uses two editors on a do-file
simultaneously. I have personally lost changes this way.

Best regards,

Michael N. Mitchell
Data Management Using Stata      - http://www.stata.com/bookstore/dmus.html
A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html
Stata tidbit of the week         - http://www.MichaelNormanMitchell.com



On 2010-11-24 7.03 AM, Tatyana Deryugina wrote:

> I'm using Notepad++ and the built-in editor. The problem only happens
> when I open a file with the built-in editor, after which I also cannot
> open it normally with Notepad++. There is no relationship (as far as I
> can tell) between opening it in Notepad++ and subsequent corruption.
>
> Best,
> Tatyana
>
> ---------------------------------------------------------------
> Tatyana Deryugina
>
> MIT PhD Student, Department of Economics
> MIT Energy Initiative Energy Fellow
> (925) 349 - 8999 (cell)
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/