Infinite Loop

  • Last Post 16 June 2020
Andre Dias posted this 09 June 2020

Hi everyone,

a few days ago i've noticed a weird bug (bugs) happening from time to time in our office.

2020-06-08 09:569:909 | Error | Failed on deleting original(+ backup) file, message: Access to the path '\\APPL\scanner\_OCR_SCAN\Barcode\UrkNr-Jahr-Kürzel-08062020094337.pdf' is denied.

2020-06-08 076:56:437 | Detailed | Found a file to process: \\APPL\scanner\_OCR_SCAN\Barcode\UrkNr-Jahr-Kürzel04062020173025.pdf.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9.wm_9
2020-06-08 076:56:437 | Information | Creating backup of original file
2020-06-08 076:56:437 | Error | Error creating backup, reason: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Somehow my workflow, which has been working great for weeks now has created an infinite loop, which keeps overwriting the old file. I assume that's because it can't delete the old file properly. I know that it has the proper permissions, since it works 99% of the time. You guys got an idea what else i can try to fix this? I've found this to happen kinda frequently with big files which need a few minutes to get processed.


The two errors aren't directly linked to each other but i keep seeing both.

We're using Scanshare (Capture&Store, It's the latest version toshiba provided us.


Best regards,


Order By: Standard | Newest | Votes
luigi.zurolo posted this 09 June 2020

Hi Andre,


the issue is indeed related to the fact there are no rights on the shared folder to delete the source file which will fire the process to start again for that file.


Besides that there is also a temporary processing file left in the folder (the one ending in wm_9) which is produced by one of your workflow step which is also left in the folder and attempted to be processed as a regular file. Since there are no rights to delete the files also the temporary processing file will be left which will fire a new processing and a new temporary file will be created appending a new wm_9 .. this one cannot get deleted at the end of the processing and it will fire the next loop creating your situation.


So no there are no errors linked to each other because everything depends by the fact there are no permissions to delete the files from that folder which leaves both the source file, backup file and temporary files all attempted to reprocessed again.


Please check if you require specific permissions for the folder which you can specify in the Watch Folder permission settings or maybe something else is accessing the same shared folder at the same time locking the file while C&S is using it, this will also fire an access denied.


Version isn't the latest one (current is 4.11.0520), however there are no changes on this matter neither reported problems fixed.

  • Liked by
  • Andre Dias
Andre Dias posted this 10 June 2020

Hi Luigi,

could this be related to the m-files connector? This is our current Workflow.

It scans from a network folder on Drive F:, reads the barcode on the top right, filters for the last letter of the barcode and decides which folder to safe the document (on the same drive, just different folder) with a trigger condition. We use OCR and rename the documents with parts of the barcode.

After that we use the m-files connector to safe the pdf/a in m-files with 3 set properties.

The folder in which the scan gets processed is only visible to me. So i can rule out that anyone is accessing those documents.

I'm not sure how i should move forward from here. I don't see how permissions could be the problem, since it works most of the time. The problem seems to be with big documents which take a while to process.


On another note i've set the barcode reader to only read the first page on the top right yet the logs suggest that it's scanning for barcodes on every page which takes a good while too on a 50 page document. I've attached a recent log snippet of this happening. [REDACTED]


Best regards


Edit: I've managed to fix the loop. But the issue with the barcode remains unsolved. 


luca.scarpati posted this 11 June 2020

 Hi Andre,


perfect for the loop. 

The barcode from the attached logs seems to be searched for all pages ... are you sure it is set correctly? what settings do you have in the barcode module?


Best regards,


  • Liked by
  • Andre Dias
Andre Dias posted this 16 June 2020

Hi Luca,


i've attached an image of the workflow configurator. Let me know should you need more info on this issue.




Best regards


luigi.zurolo posted this 16 June 2020

Hi Andre,

the barcode recognition is not a problem, you will always see in logs every page logged because the module is anyway checked to see which rules are configured and if there are any rule to apply on the current page, if the rule is set to not be on that page then it will be skipped. This because there might be additional rules which are set for that specific page and they are checked only when the module is invoked.

About the speed the workflow seems to be regular, just note you are storing two times a PDF (Windows File System and M-Files) which means the PDF creation is done two times doubling the time to create the output. If that's your intention and in general when there are multiple connectors using the same "heavy" profile it could be a good practice to generate it once and use another workflow just to do with the upload without processing (original format).

Note: I've redacted the link to the logs since the forum is public and logs may contain personal information. If you need to submit those data please open a support ticket.

  • Liked by
  • Andre Dias