bothlab / pomidaq

Portable Miniscope Data Acquisition
GNU Lesser General Public License v3.0
20 stars 7 forks source link

New version (0.3.0+git121) is "Unable to get valid timestamps for initialization" #3

Closed oddclot closed 3 years ago

oddclot commented 4 years ago

Hi! I have been testing PoMiDAQ for a while and when trying to run release 0.3.0+git121 (in the present moment, the last one) I keep getting this error when connecting to the Miniscope. I thought it could be something related with Windows 10 permissions not letting the program access the clock/date or something, but everything seems to be fine. The bug happens both in "Start at Zero" and "UNIX timestamps" modes, so there is no way for me to initialize the camera with this last release. Never had this issue with the two former releases, which right now run fine!

Has something changed in the code and I need to adapt something in my PC?

And just a question regarding PoMiDAQ daily use (please let me knor if I should open a different thread or contact you via email for this). Right now it seems there is no way to set default parameters, mainly video container format and data folder. I know PoMiDAQ is portable and these parameters may vary from one computer to another, but, when using the software in the same PC, maybe it would be convenient to have some file with default configuration in order to not needing to set the folder in every new use! I have to teach every new user to set the folder first and we had some video loss because of Windows cleaning the Temp folder!

Thanks!

ximion commented 4 years ago

Has something changed in the code and I need to adapt something in my PC?

Interesting! There was a code change to discard timestamps from the device that were zero, and make the acquisition fail if that happened too often. Are you able to recompile PoMiDAQ on Windows? If you switch on the log (via the "Info" menu), do you get lots of Frame with timestamp of zero ignored for timer initialization. messages, or anything else that looks interesting? A hardware defect is also always a possibility, but in this case I think it's not unlikely that the software is to blame.

we had some video loss because of Windows cleaning the Temp folder!

Ha, we fell into the same trap with our Syntalos tool, and that now marks any temp folder in bright red and displays a warning if you are writing to it ^^ PoMiDAQ will already save the video slice interval and the timestamps setting for the current computer, there is no reason why it shouldn't also save the encoding and path preferences (you just need to be careful when you are moving the application to a new device, as that will reset all settings).

If you are feeling adventurous, you could also flash one DAQ board with the new v4 firmware for the v3 Miniscopes and use the Git master version of PoMiDAQ. I am using that exclusively without issues, but it hasn't yet received much (or any...) testing on Windows.

ximion commented 4 years ago

There's one more thing you can try: Use this snapshot build from the daq-v3 branch: https://ci.appveyor.com/project/ximion/pomidaq/builds/33098108/job/j3nk396nmdvv30gh/artifacts - there is a (low!) chance that this helps, as it gives the device slightly more time to produce a useful timestamp than before (bringing it more on-par with the code master uses).

ximion commented 4 years ago

Is this crash still a thing with the latest Miniscope firmware version and version of PoMiDAQ? I can not reproduce it at all, so in order to fix it I need more information (otherwise I'll need to close this bug as unreproducible). The other issue raised here, with PoMiDAQ not remembering the data storage location, has been fixed in the latest version (to be released once I have tested it with a v4 Miniscope as well, and not just with v3 Miniscopes).