Join 34,000+ subscribers and receive articles from our
blog about software quality, testing, QA and security.

SI Viewer and processes


#1

Hello:

In our application, I can create several processes that will run some scripts in background. Each process runs on its own thread. These processes can run multiple times a day and can even run concurrently. We need to save a log for each process execution separately. For this purpose, we create a TSmartInspect instance and a TSISession instance for each thread. This is working fine. The logs are being saved correctly.

The only issue we have now is that the Viewer seems to be mixing the processes in the Process Flow list. As you can see in the image below, the processes are in the wrong place in the viewer.

Any idea why?

Thanks in advance.


#2

Hello Jackson,

Thanks for your posting! Looking at the timestamps and IDs, are you sure that the Main Thread threads belong to the other processes? I’m asking as the Main Threads are started before the other processes. You would usually use the EnterProcess method during your process/exe initialization and then EnterThread for each thread that is started (and LeaveProcess/LeaveThread at the end).

Cheers,
Tobias


#3

This is the code we use to create the SI objects:


#4

Now I’m using GUIDs (the FIDS variable in my code) to identify the processes/threads. You can see the threads are being placed in the wrong Parent on the list


#5

Hi Jackson!

Could you also post a screenshot of a view with some log messages and the process and thread ID columns added? This would show the thread and related process IDs in a single row.

Cheers,
Tobias