Form-based Javascript File Getting Clobbered

Version: 6.0.7 - build 1235
Java™ SE Runtime Environment (build 1.7.0_07-b11)

This has happened to me twice in the past week (in two different forms), and I am looking for a sanity check:

While working in a form, I change something like a form variable or modify an associated list value. After completing the modification, the variables and methods for that form suddenly disappear. When I examine the form’s corresponding JavaScript file in the workspace, the file is empty (file size is 0KB). Anyone else see this?

Hi Kim,

I haven’t seen this other then when you really alter the logic flow of the JS file (adding or forgetting curly brackets) but that usually just drops 1 method or so or simply refuses to save the file because it’s not validating.
Can you try to reproduce this by modifying something and save the whole source in a text editor before you hit save?

Hi, Robert.

It’s good to hear from you!

I have seen what you described as well and had to occasionally re-add deleted methods (I thought it was something I did that caused the deletion). Ill-formed methods should be flagged with a warning/problem marker and not deleted (I do not believe Servoy is intentionally deleting things). I suspect that whatever process is deleting the methods, under certain conditons, goes beserk and deletes the entire contents of the Javascript file.

The first time this happened, I was unaware that the contents of the Javascript file had been deleted, and was made aware when running the solution (Developer reported that it could not find a particular method). I was stunned to find that the Javascript file contents were empty. I was able to restore the file from a recent back-up. A few days later, the same thing happened, but in a different form and file and, again, I was able to restore the file.

Once the files were restored, I was able to edit/save the methods/variables with no further problem. These seemingly random events caught me off-guard, so I do not have much information to give. However, now that I know someone else has noticed, I will try to more closely notice what is happening.

If anyone else has come across these issues, would you kindly add to this post.

Thanks!

Kim,

Can you check the log files from when this happened?
Check /path/to/servoy/application_server/servoy_log.txt and /path/to/servoy_workspace/.metadata/.log

It sounds like some internal error that causes this.

Rob

kwpsd:
I was stunned to find that the Javascript file contents were empty. I was able to restore the file from a recent back-up. A few days later, the same thing happened, but in a different form and file and, again, I was able to restore the file.

Compare with local history is your friend.

Rob,

I will e-mail you the log files (I wouldn’t know what to look for regarding an internal error).

David,

I do not know what this is/means:

Compare with local history is your friend.

Would you mind elucidating (what it does/how to use it/etc.)?

Eclipse saves all file changes into local history. You can open up a compare editor with any version in local history (or on SVN for that matter) and restore the current editor that way as opposed to going to an backup. In the context menu of any editor.

Thanks, David…I was not aware of this feature. I will give it a try.

Kim,

I had a look through the log files, but could not find anything that could cause this.

Maybe the file system is (almost) full?
When Servoy wants to write a js file and the file system is full, the file may end up being emptied.

Rob

Rob,

Thanks for taking a look at the log files. The computer on which the problem occured has over 300 GB of free space, so I don’t think it’s a full disk issue.

If the problem recurs, I will continue the post.