Hi Sascha et. al.

As an update, in the unit test i mention here:
https://github.com/MattClarkson/MITK/commit/2514bfad99ea3bc627362e235104438550231d8b

to get it to work, I first had to add US_INITIALIZE_MODULE. In addition to 
this, I had to set my DYLD_LIBRARY_PATH to include all ITK, VTK, GDCM 
libraries. I believe this is due to MitkCore itself requiring these libraries, 
and we are building our code and linking against libraries kept within the 
install folder, which don’t have the RPATHs compiled in.

Also, I noticed that there were two readers for .trk files registered. Would 
you expect this to be the case?

So, does every unit test, and every executable need to have 
US_INITIALIZE_MODULE? We have many many command line apps. Do they all need one 
if they want to do IO via MitkCore?

So, once I got the above MITK based unit test to work, I similarly got my unit 
test to work for our NifTK code, so its the same problem. So, maybe I just need 
to understand more about what is required for getting the microservices to run, 
when I am running a non GUI application, or a 3rd party applications. Im also 
surprised that most MITK unit tests don’t require this… I only see 
US_INITIALIZE_MODULE in mitkOclResourceServiceTest.cpp (as of 2014.10 release).

Thanks as always.

Matt




On 16 Feb 2015, at 20:19, Clarkson, Matt 
<[email protected]<mailto:[email protected]>> wrote:

Hi Sascha,

I just did this unit test with a fresh clone of MITK.
https://github.com/MattClarkson/MITK/commit/71aea5ebd1a00b9ae442fba256771aab40d70583

Same problem occurs when trying to write a unit test load load one of the 
diffusion imaging file formats.
Any idea?

Its entirely possible that I’m doing something wrong. i.e. the Unit test needs 
to have other services up and running at the time you ask the File Reader 
Registry to return something.
But when I was writing my unit test, I based it on an existing mitk::PointSet 
reader unit test, and did that same sort of thing. So I can’t see anything that 
Im meant to add.
i.e. I dont know what I dont know.

So, that said, the provided unit test seg-faults in an identical (to my eyes) 
way as previously described.

Hope that helps.
Thanks

Matt


On 13 Feb 2015, at 14:01, Sascha Zelzer 
<[email protected]<mailto:[email protected]>> wrote:

Okay, this is bad news.

Is the stack trace still the same (with the CoreServicePointer changes) for the 
crash you are experiencing?

Thanks,
Sascha

On 02/11/2015 04:14 PM, Miklos Espak wrote:
I am afraid, the clean build did not solve the problem. Moreover, this is not 
clang-specific, our unit test crashes on Linux as well, with gcc.

It seems to me that the problem is the order in which modules are initialised 
and accessed.

Miklos


On 10 February 2015 at 21:11, Sascha Zelzer 
<[email protected]<mailto:[email protected]>> wrote:
That sould do it. At least it fixed similar issues for me when building with 
clang on Fedora...


On 02/10/2015 09:59 PM, Clarkson, Matt wrote:
Hi there,

I pulled that branch, and re-built MITK, and rebuilt our code, and can’t see 
any difference.
I also changed into the source folder to check that I had got the updated file 
and I have.

Do I need a full clean build?

M

On 10 Feb 2015, at 17:45, Sascha Zelzer 
<[email protected]<mailto:[email protected]>> wrote:

Hi,

I pushed branch 
bug-18731-hide-template-definitions-with-special-default-arguments based on the 
2014.10 release. Could you give it a try please and report back?

Thanks,
Sascha

On 02/09/2015 09:00 PM, Clarkson, Matt wrote:
Currently, Mac OSX 10.9.5 and

/usr/bin/c++ --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix


Thanks

M

On 9 Feb 2015, at 19:53, Sascha Zelzer 
<[email protected]<mailto:[email protected]>> wrote:

Hi,

before going into details, on which OS and compiler are you getting this?

Thanks,

Sascha

On 02/09/2015 01:23 PM, Clarkson, Matt wrote:
Hi there,

Im trying to change one of our file reader/writes to the new framework.

I have code like this:
   mitk::FileReaderRegistry readerRegistry;
  std::vector<mitk::IFileReader*> readers = 
readerRegistry.GetReaders(mitk::FileReaderRegistry::GetMimeTypeForFile("4x4"));
  MITK_TEST_CONDITION_REQUIRED(readers.size() == 1, "Testing for 1 registered 
readers”)

that fails (seg fault) on call to readerRegistry.GetReaders(..)

But the GUI program successfully loads/saves these files.
The unit test is for our own file type in our own module.

I based my code on the mitkPointSetReaderTest.cpp. In the diffusion modules 
there are examples of new file readers/writers, but no unit tests that i could 
find that use the FileReaderRegistry. So, I must be missing something in my 
unit test, failing to instantiate some class/service. Is it possible that the 
PointSetReaderTest works because the mitkCoreActivator is instantiating a lot 
of stuff, whereas my unit test is not? i.e. I dont know what Im supposed to 
look for.

Can anyone help? See 2 screenshots of stack trace.

Thanks

Matt







------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
mitk-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/mitk-users




------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to