August 13, 20169 yr HiI had a heap error in trying to list a voluminous folder, so I increased the memory as shown in the ProgramData folder.I redo an attempt and I have a java.io.FileNotFoundException error :, and since, all the scripts I use, the result is exactly the same error. Scriptmaster is stuck on this error. What can I do please ?
August 15, 20169 yr Because of the size of the folder you're running out of heapspace (allocated RAM). Try increasing it using these instructions: http://docs.360works.com/index.php/Heapspace_Out_of_Memory_Error
August 15, 20169 yr Author yes thank you, as mentioned in the first post, I had already increased this memory when one second error occurred "java.io.FileNotFoundException error" on which scriptmaster was blocked.Any other script ended on the same error. Edited August 15, 20169 yr by ericire
August 15, 20169 yr Apologies, I tend to jump straight to the logs (which is what I did). It has indications it's complaining about memory in the logs, but not sure if that's the actual issue. Here is an excerpt: -- java.io.FileNotFoundException: C:\Program Files (x86)\SideSlide\?C:\Users\ericire\Downloads -- For some reason the way you instructed your groovy script to find the folder you're passing two folders but not separated. See the "?" and then the next path. Can you include a screenshot of your script and the usage of it in your FileMaker script?
August 15, 20169 yr Author the script is def list = [] def dir = new File(_DIR) dir.eachFileRecurse {file -> if ( file.isFile()) { list << file } } list and _DIR is C:\Program Files (x86) and error is java.io.FileNotFoundException: C:\Program Files (x86)\SideSlide\C:\Program Files (x86)
August 16, 20169 yr Can you please also post the FileMaker script so we can see how you're calling the ScriptMaster function? It looks like you may by feeding the script an incorrect path (possibly the full path when you'd only want to send the relative path).
August 16, 20169 yr There's more to this than you are telling us.. What is _DIR??? Please poost your WHOLE function and a screensjhot fo the script as David suggests. I get a FileNotFound if I just do this. I think your heap error is then to do with a massive recursion which can not resolve. You can't make a file from a directory def list = [] def dir = new File ('/Users')
August 16, 20169 yr Author hello every body as I said before _Dir is the function argument with this folder path Quote and _DIR is C:\Program Files (x86) and that's whole of the code wich is in the original scriptmaster file, for the development of the script.what is curious is that now this java.io.FileNotFoundException error no longer occurs,while I carried the memory of scriptmaster to 1800 ( with 2048 Filemaker is unbootable ) and resulting in the wheel and filemaker not responding indefinitely.otherwise, this code works fine for small folders. So conclusion, for large directories, I give scriptmaster, because with my VBScript script, it makes the list easy in 2 minutes with this 13,9 Go and 117896 files and folders. Edited August 16, 20169 yr by ericire
August 19, 20169 yr ericire, Yeah, ScriptMaster just handles Groovy code and passes it. I think the behavior you're seeing is when the HeapSpace error occurs, Groovy bubbles it down to the "new File" and because it failed due to loss of memory, it views the "new File" as null and throws a FileNotFound. Curious behavior. You may be able to do: try { //main code here } catch (OutOfMemoryError e) { //handling code here }
Create an account or sign in to comment