Thread and memory issues of NAVISWORKS API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have implemented two main functions in my plugin. The first one is to monitor in real-time whether the source file has changed and automatically update the model through Timer. The second step is to obtain the specified properties of all components of all models, and then connect to the database to automatically save the obtained data to the database. To avoid blocking the UI thread, I have performed asynchronous operations or semaphore methods on almost all methods that traverse to obtain component properties. However, my plugin function can run smoothly when there are few models, but whenever there are a large number of models, the code will always report errors in various places after running for a period of time. The most common error is System AccessViolationException:: Attempt to read or write to protected memory. This usually indicates that other memory is damaged
May I ask if the NAVISWORKS. net framework API does not support asynchronous operations to traverse and obtain information about all components? Or is there a problem with my method? I would greatly appreciate it if you could assist me through email(yufei0205@gmail.com) or remote means.