Page MenuHomePhabricator

[Dashboard] VirtualTrackingDeviceTest fails
Closed, ResolvedPublic

Description

The mitkVirtualTrackingDeviceTest fails with the following output:

Test output

Testing if tracking is producing new position values in tool 1. [PASSED]
Testing if tracking is producing new position values for 'while running' tool. [FAILED]
In ..\..\..\..\..\..\MITKsrc\MITK\Modules\IGT\Testing\mitkVirtualTrackingDeviceTest.cpp, line 111: mitk::Equal(posBefore0, posAfter0) == false : [FAILED]
"VirtualTrackingDevice": [DONE FAILED] , subtests passed: 21 failed: 1

Event Timeline

We run the test on my machine:

Testing instantiation
[PASSED]
Checking tracking device state == setup.
[PASSED]
Testing behavior of method CloseConnection(). [PASSED]
Testing behavior of method StartTracking(). [PASSED]
Testing Set-/GetRefreshRate() [PASSED]
Testing GetToolCount() before AddTool() [PASSED]
Testing AddTool() for tool 0. [PASSED]
Testing GetToolCount() after AddTool() [PASSED]
Testing GetTool() for tool 0. [PASSED]
Testing GetTool() equals GetToolByName() for tool 0. [PASSED]
Testing Set-/GetBounds() [PASSED]
Testing AddTool() for tool 1. [PASSED]
Testing GetToolCount() after AddTool() [PASSED]
Caught an expected 'std::invalid_argument' exception. [PASSED]
Caught an expected 'std::invalid_argument' exception. [PASSED]
Testing OpenConnection(). [PASSED]
Testing GetSplineChordLength() after initalization [PASSED]
Testing if position value is constant before StartTracking() [PASSED]
Testing behavior of method StartTracking(). [PASSED]
Testing if tracking is producing new position values in tool 0. [PASSED]
Testing if tracking is producing new position values in tool 1. [PASSED]
Testing if tracking is producing new position values for 'while running' tool. [PASSED]
"VirtualTrackingDevice": 22 tests [DONE PASSED]

Everything ok so far ...

We double-checked it on Alfreds windows machine. The test also passed.

[423d89]: Merge branch 'bug-8033-VirtualTrackingDeviceTest'

Merged commits:

2011-05-04 16:19:21 Thomas Kilgus [cbe0fd]
Added initial delay for the tool WhileRunning-Tool to avoid getting only 0 values as output. Furthemore we added output for debugging purposes. If the test fails again, the two compared values will be displayed on the dashboard.

The test failed again on the continuous linux dartclient with the following output:

[0.170] Value of posBefore0 [0.7278350591659546, 4.880780696868896, 7.55601978302002]
[0.170] Value of posAfter0 [0.7278350591659546, 4.880780696868896, 7.55601978302002]
Testing if tracking is producing new position values for 'while running' tool. [FAILED]
In /local/sascha/dartclient/MITK-MBI-Superbuild-Release-continuous/CMakeExternals/Source/MITK/Modules/IGT/Testing/mitkVirtualTrackingDeviceTest.cpp, line 119: randomNumberFail == false : [FAILED]
"VirtualTrackingDevice": [DONE FAILED] , subtests passed: 21 failed: 1

So the random generator actually generates the same values (or is just called once in 100 ms).

Our assumption is that in some rare cases the thread generating the new position of the tracking tool is not called by the operating system during the 100 ms.

[37347c]: Merge branch 'bug-8033-VirtualTrackingDeviceTest'

Merged commits:

2011-05-18 14:07:52 Thomas Kilgus [896a3f]
Added documentation


2011-05-11 16:35:24 Thomas Kilgus [41e245]
Now the ITK modified time is set during the virtual tracking tool positioning. The test checks wether the MTime changed or not and compares the position of the tools according to that.

[faf01d]: Merge branch 'bug-8033-VirtualTrackingDeviceTest'

Merged commits:

2011-06-20 09:00:02 Alexander Seitel [50573e]
COMP: retrigger continuous

[8c4776]: Merge branch 'bug-8033-VirtualTrackingDeviceTest'

Merged commits:

2011-06-29 16:39:45 Diana Wald [f4b27c]
Added output of position and time for debugging purposes.

[3029c2]: Merge branch 'bug-8033-VirtualTrackingDeviceTest'

Merged commits:

2011-06-29 16:52:08 Diana Wald [0c9a2b]
Added Bug ID as output

We added output of position and time for debugging purposes. If the test fails again, we will have a look at the actual values and try to solve the issue.

Reopen bug, because problem still occurs

[601ab0]: Merge branch 'bug-8033-FixVirtualTrackingDeviceTest'

Merged commits:

2011-08-24 13:50:27 Alexander Seitel [f85f9e]
Added check for modification of tool using the modified time.

[ea0c9b]: Merge branch 'bug-8033-FixVirtualTrackingDeviceTest'

Merged commits:

2011-08-24 18:52:37 Alexander Seitel [26ecd9]
Correctly lock and unlock TrackingFinishedMutex

Test is failing again :-(

It looks like a threading problem... for example have a look at

mitkVirtualTrackingDevice:235 :

if (!localStopTracking) MutexLockHolder trackingFinishedLockHolder(*m_TrackingFinishedMutex); // keep lock until end of scope

The "end of scope" is line 236. So unless this line is meant to bleak execution until the mutex is unlocked, it has no effect (it just locks and immediately unlocks the mutex again).

[83755e]: Merge branch 'bug-8033-FixVirtualTrackingDeviceTest'

  • bug-8033-FixVi

Merged commits:

2011-08-26 16:47:11 Sascha Zelzer [496434]
COMP: disable randomly failing test

[3eff2d]: Merge branch 'bug-8033-FixVirtualTrackingDeviceTest'

Merged commits:

2011-08-31 13:47:35 Alexander Seitel [9c9d69]
Reenabled VirtualTrackingDeviceTest and Fixed Problems

[502091]: Merge branch 'bug-8033-FixVirtualTrackingDeviceTest'

Merged commits:

2011-09-07 14:14:06 Alexander Seitel [1ae7f3]
Use higher update rate for virtualTrackingDevice in TrackingDeviceSourceTest


2011-09-07 14:02:23 Alexander Seitel [b7c3c0]
Use higher framerate for update of VirtualTrackingDevice in VirtualTrackingDeviceTest.