micromanager in c++

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

micromanager in c++

Fu-Der Chen

Dear Micro-manager community,


I am trying to load a config file to my c++ code, but I am not successful yet. I am able to setup all the dependency and the code actually compiled. However, it was able to detect the version of micromanager,but the code breaks at loading the config file.  I do not know how to debug this problem since the error did not provide any useful information. Here is the log message.

2019-01-12T00:37:55.956712 tid7072 [IFO,LogManager] Enabled primary log file test.log
2019-01-12T00:37:57.260013 tid7072 [IFO,Core] Did unload all devices
2019-01-12T00:37:57.930168 tid7072 [IFO,Core] Unloading all devices after failure to load system configuration

Your help is greatly appreciated. Thanks



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: micromanager in c++

Kyle Douglass-2
Hi Fu-Der,

I am trying to load a config file to my c++ code, but I am not successful yet. I am able to setup all the dependency and the code actually compiled. However, it was able to detect the version of micromanager,but the code breaks at loading the config file.  I do not know how to debug this problem since the error did not provide any useful information. Here is the log message.


Are you using Windows, Linux or Mac?

I would suggest compiling your code and the MM static libraries with debug symbols. Then, use your debugger to set a breakpoint around the point of failure to better investigate the problem. On Linux you pass the `-g` flag to the compiler to include debug symbols, then use the `gdb` program to launch the interactive debugger. In Visual Studio I think you choose to compile the "Debug" configuration, but I forget how to run the debugger.

I think you can also increase the verbosity level of log messages in your core logs. Unfortunately I am not sure how to do this when you're only linking against the MM static libraries in custom C++ code.

Good luck,
Kyle




_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: micromanager in c++

Fu-Der Chen

Hello Kyle, 


Thanks for the suggestion.

I have made some progress but this is where it failed. Do you know any reason why? Would it be the extra slash at the end? I am just loading the default demo config.

"Failed to load device \"DHub\" from adapter module \"DemoCamera\""


Thanks,


Fred



From: Kyle Douglass <[hidden email]>
Sent: January 14, 2019 12:43:08 PM
To: Micro-Manager General
Subject: Re: [micro-manager-general] micromanager in c++
 
Hi Fu-Der,

I am trying to load a config file to my c++ code, but I am not successful yet. I am able to setup all the dependency and the code actually compiled. However, it was able to detect the version of micromanager,but the code breaks at loading the config file.  I do not know how to debug this problem since the error did not provide any useful information. Here is the log message.


Are you using Windows, Linux or Mac?

I would suggest compiling your code and the MM static libraries with debug symbols. Then, use your debugger to set a breakpoint around the point of failure to better investigate the problem. On Linux you pass the `-g` flag to the compiler to include debug symbols, then use the `gdb` program to launch the interactive debugger. In Visual Studio I think you choose to compile the "Debug" configuration, but I forget how to run the debugger.

I think you can also increase the verbosity level of log messages in your core logs. Unfortunately I am not sure how to do this when you're only linking against the MM static libraries in custom C++ code.

Good luck,
Kyle




_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: micromanager in c++

Fu-Der Chen

Sorry for another email. Here is the full error message .


Failed to load device adapter "DemoCamera" from "mmgr_dal_DemoCamera" [ Incompatible device interface version (required = 69; found = 68)]


Fred


From: Fu-Der Chen <[hidden email]>
Sent: January 14, 2019 1:08:39 PM
To: Micro-Manager General
Subject: Re: [micro-manager-general] micromanager in c++
 

Hello Kyle, 


Thanks for the suggestion.

I have made some progress but this is where it failed. Do you know any reason why? Would it be the extra slash at the end? I am just loading the default demo config.

"Failed to load device \"DHub\" from adapter module \"DemoCamera\""


Thanks,


Fred



From: Kyle Douglass <[hidden email]>
Sent: January 14, 2019 12:43:08 PM
To: Micro-Manager General
Subject: Re: [micro-manager-general] micromanager in c++
 
Hi Fu-Der,

I am trying to load a config file to my c++ code, but I am not successful yet. I am able to setup all the dependency and the code actually compiled. However, it was able to detect the version of micromanager,but the code breaks at loading the config file.  I do not know how to debug this problem since the error did not provide any useful information. Here is the log message.


Are you using Windows, Linux or Mac?

I would suggest compiling your code and the MM static libraries with debug symbols. Then, use your debugger to set a breakpoint around the point of failure to better investigate the problem. On Linux you pass the `-g` flag to the compiler to include debug symbols, then use the `gdb` program to launch the interactive debugger. In Visual Studio I think you choose to compile the "Debug" configuration, but I forget how to run the debugger.

I think you can also increase the verbosity level of log messages in your core logs. Unfortunately I am not sure how to do this when you're only linking against the MM static libraries in custom C++ code.

Good luck,
Kyle




_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: micromanager in c++

Stuurman, Nico
On 1/14/19 10:13 AM, Fu-Der Chen wrote:
>
> Sorry for another email. Here is the full error message .
>
>
> Failed to load device adapter "DemoCamera" from "mmgr_dal_DemoCamera"
> [ Incompatible device interface version (required = 69; found = 68)]
>

There you go.  Your source code and the binary device adapter that you
are using are different versions.  Either build everything (including
the device adapters) yourself, or checkout the latest source code from
the repository and use the latest nightly build for your binaries.

Best,

Nico

>



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: micromanager in c++

Fu-Der Chen

Hello Nico,


Thanks for the feedback. I am a bit confused. How would I check the version of the device adapter and the source code match? It would be nice to know beforehand that the two pieces matched before I rebuild everything. 


Thanks,


Fred


From: Stuurman, Nico <[hidden email]>
Sent: January 14, 2019 1:26:00 PM
To: Micro-Manager General
Subject: Re: [micro-manager-general] micromanager in c++
 
On 1/14/19 10:13 AM, Fu-Der Chen wrote:
>
> Sorry for another email. Here is the full error message .
>
>
> Failed to load device adapter "DemoCamera" from "mmgr_dal_DemoCamera"
> [ Incompatible device interface version (required = 69; found = 68)]
>

There you go.  Your source code and the binary device adapter that you
are using are different versions.  Either build everything (including
the device adapters) yourself, or checkout the latest source code from
the repository and use the latest nightly build for your binaries.

Best,

Nico

>



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: micromanager in c++

Stuurman, Nico
Hi Fred,

> Thanks for the feedback. I am a bit confused. How would I check the
> version of the device adapter and the source code match? It would be
> nice to know beforehand that the two pieces matched before I rebuild
> everything.

In binary distributions of Micro-Manager, go to Help > About
Mico-Manager.  Look for "Device API version".

In your source code, open the file MMDevice/MMDevice.h, find the
constant "DEVICE_INTERFACE_VERSION".

The exact version match is needed, otherwise you would run into bad
runtime crashes when the Core or Device Adapter would call into
functions not existing on the other side.

Best,


Nico


>
> Thanks,
>
>
> Fred
>
> ------------------------------------------------------------------------
> *From:* Stuurman, Nico <[hidden email]>
> *Sent:* January 14, 2019 1:26:00 PM
> *To:* Micro-Manager General
> *Subject:* Re: [micro-manager-general] micromanager in c++
> On 1/14/19 10:13 AM, Fu-Der Chen wrote:
> >
> > Sorry for another email. Here is the full error message .
> >
> >
> > Failed to load device adapter "DemoCamera" from "mmgr_dal_DemoCamera"
> > [ Incompatible device interface version (required = 69; found = 68)]
> >
>
> There you go.  Your source code and the binary device adapter that you
> are using are different versions.  Either build everything (including
> the device adapters) yourself, or checkout the latest source code from
> the repository and use the latest nightly build for your binaries.
>
> Best,
>
> Nico
>
> >
>
>
>
> _______________________________________________
> micro-manager-general mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/micro-manager-general
>
>
> _______________________________________________
> micro-manager-general mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/micro-manager-general



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general