iTrace-Dev / iTrace-VisualStudio

Visual Studio plugin to identify textual and interface elements based on iTrace Core gaze data
GNU General Public License v3.0
4 stars 1 forks source link

Incomplete XML output when closing Visual Studio #41

Open clayness opened 4 years ago

clayness commented 4 years ago

I recently ran a trace with the Visual Studio plugin, and after I closed everything down, I noticed that the last of my output files did not include the closing </gaze> or </itrace_plugin> tags.

I reproduced it on a different computer using these steps:

  1. Open iTrace Core
  2. Setup the session with an output directory
  3. Run Visual Studio Community 2017 (as administrator)
  4. Open iTrace window
  5. Connect to core
  6. Start session in core
  7. Wiggle mouse around, etc.
  8. Stop session in core
  9. Close Visual Studio

It appears from the code that there is no management of the lifecycle for the plugin/tool window, so the closing tag is only written when (a) the user disconnects from core or (b) a new session is started.

shbonita commented 4 years ago

@clayness thanks for submitting this issue. The repro steps are very helpful. We will get to assigning this to a developer soon.

clayness commented 4 years ago

For reference, there is some sample code available on this StackOverflow question that demonstrates how to wire up some of the relevant lifecycle events.

Be warned that the garbage collector will try to collect these COM objects if they are local variables, so you'll likely need to save the DTE object and the relevant events object as members of the package class.

dtg3 commented 4 years ago

@cabryant20 Review this issue. If the issue is not resolved by the Weds meeting, be prepared to discuss your approaches/ideas to resolve the problem at that time.

If there will be no Weds meeting (12/11), plan for the next meeting time (SDML or iTrace whichever is first).

cabryant20 commented 4 years ago

Added Issue-41 branch. OnClose event added that checks if the writer/timer are still active and calls the xmlClose function if they are.

shbonita commented 2 years ago

@Joshua2000B is this fixed?