Jump to content

scriptmaster is stuck on an error


This topic is 2803 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi
I 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 ?

Link to comment
Share on other sites

 
 
 
 
 

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 by ericire
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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)

 

Link to comment
Share on other sites

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). 

Link to comment
Share on other sites

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')

 

Link to comment
Share on other sites

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 by ericire
Link to comment
Share on other sites

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
}

 

Link to comment
Share on other sites

This topic is 2803 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.