PHPStorm Intermittently Prompting "File Cache Conflict" Dialog on Save - ide

Using v2.1.5. About half the time I save I get the dialog below.
Two questions:
Why does this happen intermittently? Maybe because I'm using CVS and my local storage is in another drive?
Is there a setting where I can default to "Keep Memory Changes" so that this dialog doesn't show up anymore?

It can happen if file time stamp changes externally or when you store files not on a local drive.

I'm now using version 3.0 and don't have this issue anymore.

Related

Arena (Rockwell) simulator crashes everytime I click check model or run

I'm using Arena simulator (by Rockwell), in particular the "Arena training and Evaluation Mode" for students.
After using it without any problems for a few months, since yesterday every time I click on "check model" or "run the model" Arena closes automatically. I have no idea what could be the cause (I haven't made any changes to the PC, the only thing I did was to add a new video card).
Has anyone had the same problem? Any suggestions?
Arena works with access software, it is likely that the version of access you have on your computer is not compatible with the version Arena needs to work properly.
Go to the unzipped folder you extracted from the zip you downloaded, go to MediaImage, then Redist, then AccessDataBaseEngine and finally install the file found there.
These steps should solve your problem.
I was having the same issue and what I did to fix it was reinstalling. The only thing I made differently this time was to tick on the "repair" option rather than "update" when prompted with the access runtime window.
Hope this helps!
i had the same problem and it worked.
installed a file called "AccessRuntime_x64_en-us"
Thanks for the solution:)
Fix in a few seconds: Just double click on the .accdb file in the same folder as you simulation file and click open on the pop up screen. Then try running your model. İt will fix it.
For details check the link below.
https://youtu.be/V7KvyRtMiho

Sandbox and Saving files

I know about Sandbox limitations and and my usual technique of having the user save a file is via the NSSavePanel, which automagically grants the app the necessary priviliges to the location, as indicated by the user.
Now, here's the... not-so-uncommon scenario :
User creates a new file, in my app
Saves is for the first time (so, there's a good reason for the NSSavePanel to show up)
Then edits the contents of the document (please, note that my app is not a typical NSDocument-compliant one)
And finally he want to re-save it. (not "Save (it) as.." but just... "Save (it)" - since he's already specified a location, right?)
How is this doable? What's the "approved" way of achieving that? I've read about bookmarks but a) I'm not sure whether it is what I need, b) I haven't managed to find any real code example.
So, any ideas?
Please, note : no-matter-what, the solution must be fully-functional for 10.6 as well.
UPDATE : Hmm... That's just weird (or at least unexpected). Just tried re-saving at a previous location already selected via NSSavePanel and it seems to be working (without doing anything). Is that possible? (And yep, just re-checked it twice : the app is sandboxed)
You provided your own answer - “which automagically grants the app the necessary priviliges to the location, as indicated by the user” - when the user selects the file in the file panel the sandbox is extended to include the selected location and for the rest of the current execution your app my access it.

Mac Sandboxed App Loses File Permissions to Other Apps

I'm developing an app that is currently sandboxed. It acts as a basic text editor. Recently, I wanted to test what happens when I open a file in my app and another app at the same time, make an update in one app, then then see the updated in the other. I'm using Coda or BBEdit as my alternative editors. If I turn off sandboxing -- then this issue does not exist. However, since apps are required to be sandboxed as of March 1, I would rather implement a solution rather than wait and see.
When I open both files and make an edit in my app and then switch to the other app, the changes are reflected so that those editors have the version just saved from my app. However, if I perform the converse of saving from their app and then moving to mine -- no joy. Without performing any action, the console reports two specific errors: deny file-issue-extension and deny file-write-data. The app appears to be losing privileges to edit the document since it was changed by an external editor after the document was opened in my app. If I try to save the file in my app, it asks to duplicate the document because it has lost access to the original document. This doesn't happen the other way around because those apps have not been sandboxed and therefor have permissions that my app does not. It also doesn't appear that you can prevent the other app from making the changes if you don't want this behavior.
The documentation on developer.apple.com mentions nothing of this type of situation. I am not sure if this is intended behavior. If it is, then I can just tell my user that the document permissions have been lost and they should either save a new version or re-open the file. If it is NOT intended behavior, then what method in the NSDocument API would grant permission to the file once it has been lost? I'm assuming the answer is the former, that this is intended, but can anyone confirm and is there documentation?
Without performing any action, the console reports two specific errors: deny file-issue-extension and deny file-write-data. The app appears to be losing privileges to edit the document since it was changed by an external editor after the document was opened in my app. If I try to save the file in my app, it asks to duplicate the document because it has lost access to the original document
The correct behavior in a situation like this is to not overwrite the file, but to prompt the user if they want to reload the document, if so reload it and then write it.
The OS is doing the right thing by not allowing a blind write over a file that has changed.
See NSFilePresenter - (void)presentedItemDidChange to see if it changed. Reread the file and then see if you can save it. You dont say you have been denied a read on the file.
Also, since you havent posted any code it might be helpful to show what code you are using to access the file and to save it. NSDocument has built in handling for some types of file changes in the sandbox.
Lets call your App ScottEdit and your competitor as StackEdit
There could be several things going on. NSDocument has a lockDocument method. StackEdit may have locked the document and did NOT unlock it after save. If you quit the app, the file should be unlocked and available for your app. If this is the case, you will need to create a notification for when the file attributes change using kqueue or another.
If the other app is "blocking" access to your app. You can send an email to that developer and ask him to update his app so it unlocks the document after save. This last step is in addition to setting up notifications because another developer may come along and do the same thing (breaking your app).

When to delete files in NSTemporaryDirectory

I am building a multitasking application which includes a functionality for viewing large pdf files. In order to avoid downloading the file each time the user wants to view the file, i download the file in the NSTemporaryDirectory and use the UIDocumentInteractionController to provide "Quick Look" and "Open in iBooks".
I wish to clear all temporary files when the user exits the application in order to avoid consuming space on user's device. Since my application is multitasking and my applicationWillTerminate method never gets called, the files are never deleted. When is it best to clear the NSTemporaryDirectory and how can i do it? Am i missing something?
Thanks in advance
You can make use of an old UNIX trick that also works fine on iOS (I know since I make use of it):
Save the files.
Open them.
Remember the filedescriptors.
Delete the files (this is the magic part).
The effect is that the files remain open as long as you don't close them. But their directory entries are gone, i.e. the files won't show up in a directory listing any more. The cool thing is now that as soon as you close one of those filedescriptors the corresponding file automatically gets completely deleted from disk. It doesn't matter whether you explicitly call close on them or whether your app terminates or crashes, in all those cases the files get deleted by the OS and you don't need to worry about it.
The downside is that you need to change your code so that it can work with the filedescriptors as you cannot access the files by name any longer.
applicationWillResignActive
in your Appdelegate is the best place to do.

"File Save Failed" error when working with Crystal Reports in VS2008

Occasionally while attempting to save a Crystal Report that I'm working on in VS2008, a dialog titled "File Save Failed" pops up saying "The document could not be saved in C:\Users\Phillip\AppData\Local\Temp{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.rpt. It has been saved in C:\Users\Phillip\AppData\Local\Temp\~zzz{YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY}.tmp."
If I OK the dialog, I get a "Save File As" dialog. If I specify the correct location of the report file, I'm asked if I want to replace the existing file. If I say "Yes", I get an error message saying "The operation could not be completed. The system cannot find the file specified." Even if I specify a completely different filename, in a different folder (e.g. C:/test.rpt) I get the same "operation could not be completed" error.
Sometimes if I wait a moment, then try to save again, it works fine. More frequently, however, I keep getting the "Save File As" dialog. My only option then is to close the report and discard my changes.
This is an intermittent problem - much of the time, saving the report works just fine. Any ideas?
Copernic Desktop Search sometimes locks files so that they can't be written. Closing the program resolves the problem. Perhaps the same problem occurs with other search engines too.
I had a problem VS2010 and Crystal which may be related
Suddenly saving was not working (asterisk never went away) - then VS would crash on trying to exit the report form (presumably trying to save).
I found that by changing the tab to preview the report (at the bottom) which I rarely do due to the fact that it is rarely accurate enough - I could save from there.
Saving during the preview removed the (dirty) astersisk in the top tab and allowed me to exit the form cleanly.
Too early to tell if the report is still ok - I too have had to recreate reports in the past.
Though once I did download the demo for the full Crystal which allowed me to mend a report so that is sometimes worth it too.
sounds like a job for process moniter. you should be able use process moniter to see what's really hapening and why.
http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
Or you could install VS2008 sp1 and cross your fingers. (I'd do both)