View Issue Details

IDProjectCategoryView StatusLast Update
0002348Slicer4Core: Extensionspublic2017-06-07 23:27
Reporterlassoan Assigned Tojcfr  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.2.0Fixed in VersionSlicer 4.2.0 
Summary0002348: Extension tests all fail on Windows in Debug mode
Description

If Slicer and the extension is built in Debug mode then all the Extension tests fail (either using the Experimental or ExperimentalUpload target).

An error popup is displayed for each test:

Debug Error!
Program: ...port/Testing/Cxx/Debug/qSlicerDicomImportModuleCxxTest.exe
Module: 4.7.4
File: global\qglobal.cpp
Line: 2271
ASSERT: "This->isInstalled(slicerHome)?this->IntDir.isEmpty():!this->IntDir.isEmpty()" in file ........\Slicer4\Base\QTCore\qSlicerCoreApplication.cxx, line 331
(Press Retry to debug the application)
[Abort] [Retry] [Ignore]

I've attached to the process with the debugger and found the following problem:

The QString qSlicerUtils::pathWithoutIntDir(const QString& path, const QString& subDirWithoutIntDir, QString& intDir) method is called with these parameters:

Path=”c:/Users/lasso/devel/SlicerRtExtension-win64dbg/DicomRtImport/Testing/Cxx/Debug”
subDirWithoutIntDir=”bin”
intDir=””

As the subDirWithoutIntDir in this case is Cxx instead of bin, the pathWithoutIntDir method returns with intDir="", and therefore the assert is triggered.

When I changed the "bin" string to "Cxx" in the memory before calling pathWithoutIntDir the test was completed successfully.

It would be important to fix this issue, as currently it's almost impossible to run the tests on debug builds (you need to add a delay to the startup of qSlicerDicomRtImportModuleGenericTest to have time for attaching the debugger, then for each run you have to start the test process, quickly attach the debugger, put a breakpoint in pathWithoutIntDir, and overwrite the "bin" constant in memory).

TagsNo tags attached.

Relationships

has duplicate 0002401 closedjcfr CTest generic module tests fail in debug mode 

Activities

jcfr

jcfr

2012-10-03 14:23

administrator   ~0006372

Fixed in topic "2348-fix-windows-assert-in-extension-test"
See https://github.com/jcfr/Slicer/compare/4bcb511...jcfr:2348-fix-windows-assert-in-extension-test

Let me know if it solves the issue.

As explained in the commit message, ideally you should set the target property RUNTIME_OUTPUT_DIRECTORY

jcfr

jcfr

2012-10-09 06:51

administrator   ~0006458

Hi Andras, Did you get a chance to test the topic ?

jcfr

jcfr

2012-10-15 14:48

administrator   ~0006554

Reminder sent to: lassoan, pinter

Hi Guys,
It would be great to integrate that change into the trunk so that it make it for 4.2.
Thanks for your help,
Jc

pinter

pinter

2012-10-15 14:54

developer   ~0006555

Oh sorry, it slipped my attention somehow.
Yes, I'll try it tomorrow!

pinter

pinter

2012-10-16 08:34

developer   ~0006567

Jc,

The generic loadable tests pass now in debug mode.

Our only python generic test fails, but I think that's a different issue. I'll try to investigate it myself.

Thanks for the fix!

jcfr

jcfr

2012-10-16 11:39

administrator   ~0006576

Fixed in r21200
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21200

jcfr

jcfr

2014-03-06 04:50

administrator   ~0010736

Closing resolved issues that have not been updated in more than 3 months

jcfr

jcfr

2017-06-07 23:27

administrator   ~0014547

Fix committed to 1683-launcher-with-output branch.

Related Changesets

Slicer: 1683-launcher-with-output 4bfdbba6

2012-10-16 15:39:23

jcfr

Details Diff
BUG: Fix windows assert associated with extension tests

To ensure existing tests pass, the Cxx folder has been added to the list
of sub dirs to consider when looking up IntDir.

That said, the recommended solution is to set the target property
RUNTIME_OUTPUT_DIRECTORY for the test executable. The value of this property
should be ${CMAKE_BINARY_DIR}/${Slicer_BIN_DIR}

See http://na-mic.org/Mantis/view.php?id=2348

Fixes 0002348

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21200 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Base/QTCore/qSlicerCoreApplication.cxx Diff File
mod - CMakeLists.txt Diff File
mod - Extensions/Testing/LoadableExtensionTemplate/Testing/Cxx/CMakeLists.txt Diff File
mod - Extensions/Testing/SuperBuildLoadableExtensionTemplate/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/Annotations/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/Cameras/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/Colors/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/CropVolume/Testing/CMakeLists.txt Diff File
mod - Modules/Loadable/Data/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/DoubleArrays/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/Measurements/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/Models/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/MultiVolumeRendering/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/Reformat/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/SceneViews/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/SlicerWelcome/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/TractographyDisplay/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/TractographyFiducialSeeding/Testing/CMakeLists.txt Diff File
mod - Modules/Loadable/Transforms/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/ViewControllers/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/VolumeRendering/Testing/Cxx/CMakeLists.txt Diff File
mod - Modules/Loadable/Volumes/Testing/Cxx/CMakeLists.txt Diff File

Issue History

Date Modified Username Field Change
2012-07-25 10:31 lassoan New Issue
2012-07-25 10:31 lassoan Status new => assigned
2012-07-25 10:31 lassoan Assigned To => jcfr
2012-08-21 13:01 jcfr Target Version => Slicer 4.2.0 - Feature freeze Sept 1st 2012
2012-10-03 14:23 jcfr Note Added: 0006372
2012-10-03 14:23 jcfr Status assigned => feedback
2012-10-09 06:51 jcfr Note Added: 0006458
2012-10-15 14:48 jcfr Note Added: 0006554
2012-10-15 14:54 pinter Note Added: 0006555
2012-10-16 08:34 pinter Note Added: 0006567
2012-10-16 11:39 jcfr Note Added: 0006576
2012-10-16 11:39 jcfr Status feedback => resolved
2012-10-16 11:39 jcfr Fixed in Version => Slicer 4.2.0 - coming release
2012-10-16 11:39 jcfr Resolution open => fixed
2014-03-06 04:50 jcfr Note Added: 0010736
2014-03-06 04:51 jcfr Status resolved => closed
2015-11-02 05:19 jcfr Relationship added has duplicate 0002401
2017-06-07 23:27 jcfr Changeset attached => Slicer 1683-launcher-with-output 4bfdbba6
2017-06-07 23:27 jcfr Note Added: 0014547