Inventor sleeping??

Inventor sleeping??

jan.pomplun
Contributor Contributor
861 Views
7 Replies
Message 1 of 8

Inventor sleeping??

jan.pomplun
Contributor
Contributor

Hi,

 

I wrote and addin which creates a large amount of sketches, extrusions, etc. (100 - 1000)

 

We somtimes observe a strange behaviour on a number of workstations: it seems inventor is pausing / sleeping unless the mouse is moved.

So, the runtime for the automated construction is much faster when the mouse is moved constantly, then also the mouse arrow frequently changes to "i am working" mode (the blue circle in Windows10).

When the mouse is not moved the mouse arrow indicates no working - even if Inventor window is active - and the addin stands more or less still - runtime is much longer.

 

Has anyone observed something similar? Any directions what this could be related to?

 

Thanks and best,

 

Jan

 

862 Views
7 Replies
Replies (7)
Message 2 of 8

JamieVJohnson2
Collaborator
Collaborator

Just because its a default, and you have a long running process, make sure WINDOWS is not playing with you in a power setting that is timing-in, because there is no user interaction.  Set power settings to everything on - full max, all the time.

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
0 Likes
Message 3 of 8

Anonymous
Not applicable

As a software consultant of 45 years, who's worked in hundreds of different environments with written thousands of programs over the years, I have NEVER seen a software problem this peculiar before. It's as if the guys who wrote this thing were primarily concerned about saving system resources while the console appears to be unattended.

This an undeniable problem with Inventor, which, frankly, makes me question its suitability for any task not involving a person sitting in front of it while it works. This behavior is highly reproducible, having been demonstrated here on multiple workstations running two completely different application developed by different programming teams over the course of the last three years.

 

There is no question that the behavior exists: Set up a long-running automated process which generates a new part file, generates hundreds of elements within it, moves onto the drawing stage, and creates your final result all without human interaction. About a half hour into the process, Inventor slows to a halt, and then stops completely.

You can clearly observe this behavior by generating timestamped logs of program activity, and also by simply opening the Task Manager, and observing that Inventor's share of CPU has dropped to zero, even though it is in the middle of the process. It may have been sitting there literally overnight, after falling asleep at any random point in the program. All you need to do wake it up is move the mouse pointer around the screen WITHOUT EVEN CLICKING ANYTHING and Inventor suddenly pops back into action.

 

It's like the boss just walked into the room.

 

One thing that does seem to help a bit is keeping the Task Manager open. This seems to fool Inventor into thinking someone is watching.

 

The problem seems even worse, however, on machines without a physical monitor or keyboard, which are strictly accessed via Remote Desktop. I'm thinking the next step is to write a routine which somehow simulates a user performing random mouse activity of no purpose other than to keep Inventor awake.

 

A related problem is the fact that Inventor has no garbage collection. This results in long running processes eventually consuming all available memory. This behavior is easily reproducible as well. Simply run your code which does all sorts of things for an hour or so on an automatic basis, and then have it automatically close out all documents, including the invisible ones. The result will be a copy of Inventor which has consumed most of the memory on the workstation and yet has absolutely nothing open.

 

This behavior is so bad it's become necessary to incorporate checkpoint processing into the application, which writes out all current state information, then launches a second instance of Inventor which picks up processing from that checkpoint, while the first instance then performs an Application.Quit to release that memory. This byzantine architecture is the only we we've found so far to keep Inventor working in a fully automated manner for more than a few minutes.

 

We'll just skip over the fact that Inventor does not use multiple processor cores. You can get the most powerful workstation there is, with the fastest disk, and the most memory, but Inventor just plods along like some relic from the 1980s using a single core.

 

So there you have it: Inventor is fundamentally flawed on so many levels when your goal is fully automated engineering:

 

* A truly bizarre user interface model which appears to have the goal of saving processor time for OTHER applications
* No garbage collection
* Single-core processing

 

We have a comparable automated engineering process which runs in AutoCAD, and there is NOTHING remotely like this behavior. AutoCAD start working, stays on working at full speed, releases memory when it's done and moves on the next task, working all night long if the queue is that long.

 

We have spent decades here developing long-running automated engineering routines with the sole purpose of saving valuable personnel time. The irony is that the peculiar design of Inventor seems to make that impossible. Inventor appears incapable of execution without constant human interaction: essentially making it pointless as a labor saving device.

Message 4 of 8

JamieVJohnson2
Collaborator
Collaborator

Inventor (as of 2019 for sure) does use multi-threaded processing.  I have written parallel task, .net code and when properly structured Inventor handles it on all 6 (12 hyperthreaded) cores at a total 100% cpu (I though my machine was going to over heat!).  Not just for rendering, but even simple tasks such as perusing an assembly tree, probing design data, and modifying files.  If not written properly (sync lock will be required at times), Inventor will have a conniption fit and crash.  I have posted said code on this forum in the past.

 

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
0 Likes
Message 5 of 8

Anonymous
Not applicable

Jamie, that is a fascinating solution you came up with, and it's yet another indication of how desperate we Inventor users are for a modern system from AutoDESK instead of yet another work-around kluge piled on top of 1990's technology.

 

I've found the mouse-jiggler program to be quite helpful (do a google to find it). That keeps this foolish program from falling asleep.

 

Another problem I've discovered in my recent mass testing of engineering cases is that once certain sizes of the model in the .ipt file are reached, code which behaved properly at smaller dimensional values starts to fail with the usual obtuse error messages from Inventor (i.e. "something's wrong with your code here. We'll let you guess about why this line doesn't work even though our system had a specific reason for rejecting your API call").  I ultimately traced that back through many routines and determined that ultimately some code which worked fine at a certain scale was apparently blowing out array limits or causing some other kind of overflow errors deep within the bowels of Inventor (probably all sorts of antique code in there). I had to break up my logic into smaller pieces so Inventor could digest it all in smaller mouthfuls, I guess.

 

Anyway, your programming heroics have not gone unnoticed, by me at least. Now if we could just get the system architect of Inventor replaced and get AutoDESK to hire his replacement and give him a bunch of money to rewrite the core of this thing, then maybe we can finally start using it in a fully automated 21st Century kind of way.

Message 6 of 8

Hochenauer
Autodesk
Autodesk

Hi,

 

would you be able to share a dataset and some demo code where we can reproduce the issue?

 

kind regards,

Gerald

 



Gerald Hochenauer
Senior Principal Engineer, Inventor
Autodesk, Inc.

0 Likes
Message 7 of 8

jan.pomplun
Contributor
Contributor

Dear Gerald,

 

would the compiled addin and an example be OK?

 

The source code is 20.000+ lines, this will be difficult to share.

 

Jan

0 Likes
Message 8 of 8

Hochenauer
Autodesk
Autodesk

Thanks,

 

I will ask Johnson Shiue from our QA department to contact you about the specifics.

 

Feel free to email either of us at <gerald.hochenauer@autodesk.com> or <johnson.shiue@autodesk.com>.

Thanks,

Gerald

 

 




Gerald Hochenauer
Senior Principal Engineer, Inventor
Autodesk, Inc.

0 Likes