Live Mode Hangs with ProEM12+ camera

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Live Mode Hangs with ProEM12+ camera

bill_whitney
We are using a Princeton Instruments ProEM512+ camera. We had been using the Princeton software LightField to control the camera. But recently, we decided to try to run the camera using micro-manager because we wanted to be able to control other devices as well (shutters) in a coordinated fashion.

So far, I have been unable to get Live Mode to work in micro-manager (Live Mode works fine in LightField).

Here are some details of our system:
 - Windows 7 Professional SP 1 (64-bit)
 - 32 GB RAM
 - MM version 1.4.22

I can "Snap" individual images fine. But when I click on "Live", the system hangs up, and never comes back. I end up having to kill MM and ImageJ using the Windows Task Mgr.

I am using the demo shutter. When I switch to using the demo camera, Live Mode works fine again. When I switch back to using ProEM512+ camera, Live Mode hangs again.

I will upload the full log file, and config file, but here is the tail-end of the log file, showing the error:

2017-02-13T10:35:44.892960 tid5252 [dbg,Core] Will start continuous sequence acquisition from current camera
2017-02-13T10:35:44.894960 tid5252 [dbg,dev:ProEM+] ResizeImageBufferContinuous singleFrameModeReady_=false
2017-02-13T10:35:44.894960 tid5252 [dbg,Core] Waiting for device Shutter...
2017-02-13T10:35:44.894960 tid5252 [dbg,Core] Finished waiting for device Shutter
2017-02-13T10:35:44.959964 tid5252 [dbg,dev:ProEM+] Process took: 0 seconds and 65.004 msec
2017-02-13T10:35:44.959964 tid5252 [IFO,dev:ProEM+] Started sequence on ProEM+, at 540297344 959964, with 2147483647 and 0 ms
2017-02-13T10:35:44.959964 tid5252 [dbg,Core] Did start continuous sequence acquisition from current camera
2017-02-13T10:35:55.068542 tid5252 [IFO,App] Couldn't start live mode.
                                   [       ] java.lang.Exception: Camera did not send image within 10100ms in Thread[AWT-EventQueue-0,6,main]
                                   [       ]   at org.micromanager.acquisition.LiveModeTimer.begin(LiveModeTimer.java:259)
                                   [       ]   at org.micromanager.SnapLiveManager.setLiveMode(SnapLiveManager.java:106)
                                   [       ]   at org.micromanager.MMStudio.enableLiveMode(MMStudio.java:2342)
                                   [       ]   at org.micromanager.MainFrame$10.run(MainFrame.java:328)
                                   [       ]   at org.micromanager.utils.GUIUtils$4.actionPerformed(GUIUtils.java:477)
                                   [       ]   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
                                   [       ]   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
                                   [       ]   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
                                   [       ]   at javax.swing.JToggleButton$ToggleButtonModel.setPressed(Unknown Source)
                                   [       ]   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
                                   [       ]   at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
                                   [       ]   at java.awt.Component.processMouseEvent(Unknown Source)
                                   [       ]   at javax.swing.JComponent.processMouseEvent(Unknown Source)
                                   [       ]   at java.awt.Component.processEvent(Unknown Source)
                                   [       ]   at java.awt.Container.processEvent(Unknown Source)
                                   [       ]   at java.awt.Component.dispatchEventImpl(Unknown Source)
                                   [       ]   at java.awt.Container.dispatchEventImpl(Unknown Source)
                                   [       ]   at java.awt.Component.dispatchEvent(Unknown Source)
                                   [       ]   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
                                   [       ]   at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
                                   [       ]   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
                                   [       ]   at java.awt.Container.dispatchEventImpl(Unknown Source)
                                   [       ]   at java.awt.Window.dispatchEventImpl(Unknown Source)
                                   [       ]   at java.awt.Component.dispatchEvent(Unknown Source)
                                   [       ]   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
                                   [       ]   at java.awt.EventQueue.access$000(Unknown Source)
                                   [       ]   at java.awt.EventQueue$1.run(Unknown Source)
                                   [       ]   at java.awt.EventQueue$1.run(Unknown Source)
                                   [       ]   at java.security.AccessController.doPrivileged(Native Method)
                                   [       ]   at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
                                   [       ]   at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
                                   [       ]   at java.awt.EventQueue$2.run(Unknown Source)
                                   [       ]   at java.awt.EventQueue$2.run(Unknown Source)
                                   [       ]   at java.security.AccessController.doPrivileged(Native Method)
                                   [       ]   at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
                                   [       ]   at java.awt.EventQueue.dispatchEvent(Unknown Source)
                                   [       ]   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
                                   [       ]   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
                                   [       ]   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
                                   [       ]   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                                   [       ]   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                                   [       ]   at java.awt.EventDispatchThread.run(Unknown Source)
2017-02-13T10:35:55.068542 tid5252 [IFO,App] Stop called in LiveModeTimer, first attempt
2017-02-13T10:35:55.068542 tid5252 [dbg,Core] Will stop sequence acquisition from current camera


I saw some posts from several years ago that made me suspect this problem might be related to the amount of memory configured for MM, so I tried several combinations. Nothing worked, though -- I always get the same log file error "Couldn't start live mode".
 - originally, ImageJ had 2000MB, and MM sequence buffer was 250MB.
 - I also tried ImageJ = 12000MB, and MM = 250MB, and
 - ImageJ = 12000MB, and MM = 25MB.

Thanks in advance for any help you can provide.
Bill Whitney
Marshall University Biological Imaging CenterCoreLog20170213T103418_pid4556.txtProEM_Basic.cfg
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Live Mode Hangs with ProEM12+ camera

Nico Stuurman-2
Hi Bill,


> We are using a Princeton Instruments ProEM512+ camera.
>
> So far, I have been unable to get Live Mode to work in micro-manager (Live
> Mode works fine in LightField).
>
> Here are some details of our system:
>   - Windows 7 Professional SP 1 (64-bit)
>   - 32 GB RAM
>   - MM version 1.4.22

Try the latest nightly build.  If that does not work, ask Princeton
Instruments (or the kind soul who wrote the device adaptor for PI
cameras) for help.

Best,

Nico


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Live Mode Hangs with ProEM12+ camera

bill_whitney
Nico Stuurman-2 wrote
Hi Bill,


> We are using a Princeton Instruments ProEM512+ camera.
>
> So far, I have been unable to get Live Mode to work in micro-manager (Live
> Mode works fine in LightField).
>
> Here are some details of our system:
>   - Windows 7 Professional SP 1 (64-bit)
>   - 32 GB RAM
>   - MM version 1.4.22

Try the latest nightly build.  If that does not work, ask Princeton
Instruments (or the kind soul who wrote the device adaptor for PI
cameras) for help.

Best,

Nico
Thanks for the prompt reply, Nico.
I did try the latest nightly build, but no joy, although MM is somewhat better behaved.
Using the nightly build, entering Live Mode still fails due to time-out, but this time, MM did not hang immediately. I got an error message that Live Mode couldn't be started. However, when I click on "OK" in the error dialog box, it puts up a a message "Stopping Live Mode" and then hangs from there.

While I was at it, I did try the MM 2.0.0 Beta3, but it hangs too.

I did a little more searching through Nabble, and I found a post that seems to be describing the exact same problem:

http://micro-manager.3463995.n2.nabble.com/Problem-with-PICAM-tt7587355.html

The person who made that post, Toshio Suzuki, seems to have narrowed down the problem to a particular section of the code, having to do with thread locking, but it looks like the problem is still unresolved.

Any suggestions?

Bill
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Live Mode Hangs with ProEM12+ camera

Nico Stuurman-2
Hi Bill,


On 2/14/17 1:01 PM, bill_whitney wrote:

> We are using a Princeton Instruments ProEM512+ camera.
> So far, I have been unable to get Live Mode to work in micro-manager
> (Live Mode works fine in LightField).
>
> I did a little more searching through Nabble, and I found a post that seems
> to be describing the exact same problem:
>
> http://micro-manager.3463995.n2.nabble.com/Problem-with-PICAM-tt7587355.html
>
> The person who made that post, Toshio Suzuki, seems to have narrowed down
> the problem to a particular section of the code, having to do with thread
> locking, but it looks like the problem is still unresolved.

It seems that nobody has looked at this problem more deeply.  Like
Toshio Suzuki suggested, I commented out that thread lock (that indeed
seems to be in a dangerous place, but like Toshio, I can not oversee all
consequences) and committed the change.  The resulting code should be in
tonight's build.  Try it out tomorrow and let us know if it made live
mode work.

Best,

Nico



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Live Mode Hangs with ProEM12+ camera

bill_whitney
Nico Stuurman-2 wrote
Hi Bill,

On 2/14/17 1:01 PM, bill_whitney wrote:
> We are using a Princeton Instruments ProEM512+ camera.
> So far, I have been unable to get Live Mode to work in micro-manager
> (Live Mode works fine in LightField).
>
> I did a little more searching through Nabble, and I found a post that seems
> to be describing the exact same problem:
>
> http://micro-manager.3463995.n2.nabble.com/Problem-with-PICAM-tt7587355.html
>
> The person who made that post, Toshio Suzuki, seems to have narrowed down
> the problem to a particular section of the code, having to do with thread
> locking, but it looks like the problem is still unresolved.

It seems that nobody has looked at this problem more deeply.  Like
Toshio Suzuki suggested, I commented out that thread lock (that indeed
seems to be in a dangerous place, but like Toshio, I can not oversee all
consequences) and committed the change.  The resulting code should be in
tonight's build.  Try it out tomorrow and let us know if it made live
mode work.

Best,

Nico
Thanks, Nico -- live mode is now working.
I can now get on with the rest of my work!

I suppose I should keep an eye out for subtle, unreproducible errors related to multi-threaded race conditions. It seems like the original author of the code thought that SOMETHING needed to be locked in this region of the code, and now we have nothing.

But this is WAY better than the previous version that crashed every time.
Thanks again,
Bill
Loading...