Copy link to clipboard
Copied
Hello, during the migration of a plugin from 17 to 18, I saw that the idleTask in my case I use CIdleTask did not run when the indesign desktop application is not the one used, for example I work on indesign then I switch to the terminal; in my case I use macos monterey on m1 and ventura on intel.
you can find the same problem on the sample provided in the CustomDataLink sdk in the CusDtLnkLinkResourceStateUpdaterIdleTask class by adding logs in the runtask
Copy link to clipboard
Copied
Sorry for the bad english on the first post, here is a corrected version :
Regression on Indesign 18.0 : Idle tasks don't run anymore when app is not focused.
While migrating a c++ plugin we made from Indesign 17 to 18, it seems idle task (in my case a CIdletask instance) don't run anymore when Indesign isn't focused. Tested on MacOs Monterey (M1) and MacOs Ventura (Intel).
It also seems the same problem can be reproduced with the sample provided in the CustomDataLink SDK, in the CusDtLnkLinkResourceStateUpdaterIdleTask class, in which I added logs (in the runtask) to check if the function was executed
Copy link to clipboard
Copied
I thought this is how it's designed. Quoting an excerpt from the SDK documentation below
"An idle task is a function point that can called when the application is waiting to receive user events"
This gives me an impression that the application being active but not recieving any input from the user is the condition for the Idle task to run.
Did you check it with an older version and see how it behaves.
-Manan
Copy link to clipboard
Copied
Is this a quote from the actual SDK?
"An idle task is a function point that can called when the application is waiting to receive user events"
Wow...
Copy link to clipboard
Copied
Hi @Robert Tkaczyk it is and I had already noticed what you are pointing but did not bother to change it. Afterall, humans are not infalliable š
I checked the SDK for CC2023, I am not sure when this typo crept in as I keep docs for only one copy of the SDK to save space.
-Manan
Copy link to clipboard
Copied
Our plugin has worked based on the use of the CIdleTask for a bit more than 15 years, to carry out treatments when the user doesnāt actively use the application and doing certain action types.
The SDK documentation (checked on both versions 17 (working) and 18 (not working) doesnāt mention the need for the app to be active either : āIdle tasks are given a chance to execute when there are no events in the EventQueue for the application to process. Idle tasks are a great way to defer expensive operations and allow the user to continue using the applicationā.
I found another ancient but vaguely related topic on the forum mentioning it, which shows that it used to work before :
https://community.adobe.com/t5/indesign-discussions/cs6-mac-idletask-isn-t-running-if-indesign-is-no...
Has the feature officially changed (and if so, what other way do we have to execute treatments when the app is in the background), or is it a bug introduced on InDesign CC 2023 ?
Copy link to clipboard
Copied
I ain't contesting that you are missing something. Your quote from the SDK also betters fits the assumption that the application is the one in focus, as a suspened application might halt its event queue as well.
Having said that the best possible way out of this is to use an older version of InDesign that worked for you and be exactly sure that it works the way you say, then we can provide exact information to the Adobe Engineering team as which version worked and which version is not working.
Looking at the discussion you sent I see the same behaviour(erroneuos one) being verified for CS5 onwards. If your code has been working for 15 years then surely it must be a much recent version of the application wher it worked the way you need, just identify it.
-Manan