Mono version broken in 2.0.2?

62 views
Skip to first unread message

petr....@gmail.com

unread,
Apr 11, 2016, 11:11:46 AM4/11/16
to Fellow Oak DICOM
Hi All,

I tried to run my app built with fo-dicom dll's  2.0.2 on raspberry with mono and it failed with following error

Exception listening for clients, System.NullReferenceException: Object reference not set to an instance of an object
  at Dicom.Network.NetworkManager.CreateNetworkListener (Int32 port) <0x73de44d0 + 0x0002c> in <filename unknown>:0
  at Dicom.Network.DicomServer`1+<ListenAsync>d__26[T].MoveNext () <0x73de3970 + 0x00117> in <filename unknown>:0


Then I tried your mono example and when I compiled it first time it downloaded (via NuGet) dll version 2.0.1. and it worked. Then I updated dll to 2.0.2 (via nuget update-package) and it didn't work anymore.

Is there something broken related to mono version in 2.0.2?

Thank you
Petr

Anders Gustafsson Cureos AB

unread,
Apr 11, 2016, 1:27:46 PM4/11/16
to Fellow Oak DICOM
Hi Petr,

You will need the 2.0.2 Dicom.Platform DLL for Mono as well. Have you tried that? Otherwise, download it from here: https://github.com/fo-dicom/fo-dicom/releases/tag/2.0.2

Regards,
Anders @ Cureos

petr....@gmail.com

unread,
Apr 11, 2016, 2:53:27 PM4/11/16
to Fellow Oak DICOM
Hi Andres,

thanks for quick reply. It works with your dll. When I tested it I took dll for mono from packages\fo-dicom.Platform.2.0.2\lib\MonoAndroid1 (from separate "test" project made only for getting dll's with nuget). I checked now and it differs even with size from yours. What did I wrong?

Thanks
Petr

Anders Gustafsson Cureos AB

unread,
Apr 12, 2016, 2:33:53 AM4/12/16
to Fellow Oak DICOM
Hi again Petr,

I am surprised you got it to work the first time :-) The Android DLL is compiled specifically for Android, which is not equivalent to Mono. As far as I know, there is no sufficient way to include the Mono DLL in the NuGet Platform package, so therefore I have placed it under the Releases tab instead. So from now on, when you are developing for Mono, check for the Platform DLL package on the Releases tab.

Regards,
Anders

petr....@gmail.com

unread,
Apr 13, 2016, 2:28:47 AM4/13/16
to Fellow Oak DICOM
Thanks again!

It worked immediately. I get binaries I compiled on win in VS and just replaced that one dll and it worked. But without codecs for compressed images. Is there any way how to make them work on arm (raspberry)? Managed code for codecs would be great but I have found none for JPEG LS. I was considering to try some automatic translation from C++ to C# or java to C#, what do you think?

Regards,
Petr

Anders Gustafsson Cureos AB

unread,
Apr 13, 2016, 4:39:14 AM4/13/16
to Fellow Oak DICOM
Hi again Petr,

We plan to support native codecs for iOS, Android and Mono by using P/Invoke, see here: https://github.com/fo-dicom/fo-dicom/issues/128 . I am not sure right now if an ARM DLL for P/Invoke usage can be easily built, though, that is something we need to investigate.

I have previously looked into supporting the other codecs via managed code, but it is not straightforward. Managed and portable libraries for JPEG and JPEG 2000 are indeed available, but they are limited in relation to their native counterparts. In particular, to my knowledge there is no managed JPEG library that supports 12-bit images, and that would be a severe limitation in a DICOM framework.

On the other hand, native codec support on Raspberry Pi (version 2 and later) is readily available, if you are using Windows 10 IoT for Raspberry Pi. The platform build for the Universal Windows Platform does even run on Raspberry Pi with Win 10 IoT, offering also native codec support. But I suppose this is not a relevant option for you, or?

Regards,
Anders
Reply all
Reply to author
Forward
0 new messages