ZEN Core acquisition script crashes

In this subforum specific Topics concerning ZEN Core, e.g workbenches, are discussed
Post Reply
Andrei Poliakov
Posts: 13
Joined: Tue Jan 19, 2021 7:46 am

ZEN Core acquisition script crashes

Post by Andrei Poliakov »

Seeking advice on an error message occurring during operation of an OAD acquisition script reported by a client. The script automates taking multiple images to cover a chosen sample area, so nothing terribly complex: camera frame size adjustment, stage movement, acquisition, image saving. Known to work well with multiple installations, but one client reports an intermittent error message:
Scripting Error Error in the executed macro. The ZEN Service reported the following error: An error occurred when the parameters have been applied synchronously. This maybe caused, for example, by a timeout. The ZEN Service reported the following error: An error occurred when the parameters have been applied synchronously. This maybe caused, for example, by a timeout.
(Yes, most of the text is duplicated.) No details, e.g. where exactly in the code the error occurs, available at this stage. The error message is not immediately informative either.

Can you advise what may be causing this kind of error and possible remedies?
Catherine Catherine
Posts: 1
Joined: Tue Jul 04, 2023 12:27 pm

Re: ZEN Core acquisition script crashes

Post by Catherine Catherine »

Implement proper debugging and logging mechanisms within the script. Add print statements or logging functions at different stages of the script to identify where the crash occurs. This can help pinpoint the cause of the crash and provide more specific information for troubleshooting. Ensure that all required dependencies, libraries, or modules are installed correctly and up-to-date. Check for any compatibility issues between the script and the versions of the dependencies you are using. Pay attention to resource usage within the script. If the script consumes excessive memory, CPU, or other resources, it may lead to crashes. Optimize resource management by releasing unused resources and handling large datasets efficiently. [urlhttps://www.mybalancenow.page/]Target Gift Card Balance[/url]
lesturf7 lesturf7
Posts: 1
Joined: Mon Oct 09, 2023 7:33 pm

Re: ZEN Core acquisition script crashes

Post by lesturf7 lesturf7 »

I'm currently working on improving my coding skills, and these debugging and https://lesturf.com/what-to-do-when-thi ... ing-out-2/ logging tips are really helpful. Thanks for sharing!
huel jannie
Posts: 1
Joined: Mon Dec 25, 2023 9:50 am
Contact:

Re: ZEN Core acquisition script crashes

Post by huel jannie »

Make sure the script has the right debugging and logging features. To find out where the script crashes, add print statements or logging routines at different stages. More precise information for debugging and determining the crash's cause can be obtained from this. Verify the proper and current installation of any libraries, modules, or dependencies that may be needed.
Andrei Poliakov
Posts: 13
Joined: Tue Jan 19, 2021 7:46 am

Re: ZEN Core acquisition script crashes

Post by Andrei Poliakov »

While I am kind of grateful for general debugging advice received through a couple of posts, my specific question was, sadly, never answered. Please note that I was talking about an intermittent error occurring at a remote client's site. My ability to perform proper debugging in such situation would have been extremely limited and I hoped to at least narrow down the list of possible culprits by getting the error message interpreted for me.

Anyway, based on my experience with multiple occurrences of this or similar errors in different environments, I can also share a bit of advice. Upon acquiring an image Zen seems to save it inside some temporary directory under a name that gets auto-incremented on every save; the temp image is meant to be auto-erased once, for example, saved under another name. Apparently on some occasions different Zen threads get the same number from the increment counter (or similar) and try to access (write or erase) the same image file, resulting in at least one of them failing. On other occasions (script or Zen crashes?) temp files may be left forever in the temp directory flagged as open, resulting in script errors once the auto-increment reaches their number.

So, if experiencing unexpected errors during acquisition, one can consider the following: (1) locate the temp directory (can be different depending on version, just search for ".czi"), see if there are any files left when nothing is open in Zen, and try removing them manually, and (2) introduce timeouts in the code to avoid possible conflicts between threads, 1 sec per acquisition seems to do the job and is not critical in terms of execution time.
Andrei Poliakov
Posts: 13
Joined: Tue Jan 19, 2021 7:46 am

Re: ZEN Core acquisition script crashes

Post by Andrei Poliakov »

Also, just in case: this behaviour is not Zen Core specific and can occur in Blue as well.
chicagoswirlcouple united States
Posts: 1
Joined: Mon Jan 29, 2024 1:24 pm

Re: ZEN Core acquisition script crashes

Post by chicagoswirlcouple united States »

EXPLORE PUBLIC ARTS, PLACES TO EAT AND GO BOWLING IN DUBLIN OHIO
Stop at Fado Pub & Kitchen for a true delight of Ireland. Back story: We recently honeymooned in Ireland, and when we heard the owner was actually from Dublin, we knew we had to add this restaurant to our places to eat.
The atmosphere here is laid back, and the open-concept decor gives a truly authentic Irish pub. Go ahead and have a Guinness to kick things off, we promise no one is judging!! My wife went for small plates and ordered roasted beet hummus, fried goat cheese, and chili garlic shrimp while I stuck to the brick-roasted half chicken for dinner. Every dish brought back memories of our time in Dublin. We loved connecting with the owner, sharing stories, and learning about his journey. If you’re into authentic experiences, Fado Pub & Kitchen is no doubt a must for meal.
https://chicagoswirlcouple.com/
Image[/img]
Post Reply