yawcam 5 loses track of yawcam_settings.xml

Report and discuss bugs here!
Post Reply
jxoco
Posts: 40
Joined: Sat Mar 26, 2011 8:50 pm

yawcam 5 loses track of yawcam_settings.xml

Post by jxoco »

I am running multiple instances of Yawcam 5, I used to run Yawcam 4 with no problems so this appears to be a new issue with the new version.
Sometimes when starting up the 5th or so instance the instance will start up with the default or first run settings. All of the settings for FTP and Motion etc will be lost. This has happened so many times that I have written a batch file to store off the .yawcam/2/yawcam_settings.xml etc so that I can recover without having to re-type everything. Once only the first instance started up properly, all the next instances started as default and I had to re-enter all configurations.
And many times the last instance opened will not completely shut down. you click on the X box and the modal box says saving windows etc and then just stalls at the 'good bye!' with the bar showing about 95% compete. I have to use the task manager to kill off the java process.
I'm quite happy with your program and I have work-arounds and I just thought that you would like to know.
jxoco
Posts: 40
Joined: Sat Mar 26, 2011 8:50 pm

Re: yawcam 5 loses track of yawcam_settings.xml

Post by jxoco »

After playing around some more, it appears that the lock-up when exiting only happens to instances that are running motion detection.
malun
Site Admin
Posts: 1589
Joined: Sun Jan 04, 2004 1:29 pm

Re: yawcam 5 loses track of yawcam_settings.xml

Post by malun »

Strange! This is the first report of that something could be wrong with the new way of detecting and handling multiple instances of Yawcam.

Could you please check the name of Yawcam's windows? Let's use the preview window as example.
In the first instance of Yawcam the window will be named: "Yawcam - Preview".
In the second instance, the window will be named: "Yawcam #2 - Preview"
In the third instance, the window will be named: "Yawcam #3 - Preview"

When you get an instance that won't load the settings as expected, what name do you see in the preview window?


Regarding the shut down problem... it could perhaps be a memory related.
Running multiple instances of Yawcam can be quite memory intense. Anyway, best way to find out is if you ran one instance of Yawcam in debug mode. Note that you only can run one instance in debug mode at a time since all instances running in debug mode will try to write the debug information to the same log file. More info on how to create debug info here:
http://www.yawcam.com/forum/viewtopic.php?f=2&t=1495

We would also need a bit of luck, so that it is the instance you started in debug mode that got the problem... :D

/malun
jxoco
Posts: 40
Joined: Sat Mar 26, 2011 8:50 pm

Re: yawcam 5 loses track of yawcam_settings.xml

Post by jxoco »

I'll try the debug thing and let you know.
I think the window name was 'default' or 'yawcam - default'.
But I think I have solved it by putting a bigger delay in the script I use to start up multiple instances.
I now I have an additional 1 second delay after closing the XML file

The freezing on shut down has been happening to me with just one instance running that's why I started to look elsewhere and found that it appeared to be when 'motion detection' was on.
So that is the more important thing to try the debug feature on.
jxoco
Posts: 40
Joined: Sat Mar 26, 2011 8:50 pm

Re: yawcam 5 loses track of yawcam_settings.xml

Post by jxoco »

I've tried and tried to capture the errors with the debug feature but to no avail.
The debug feature has some voodoo that the straight running does not.
Like another poster here I do not get 24 hours of continuous use, I have cameras going dead and I have to use the task manager to close down the YAWCAM instances as they are unresponsive to anything else.
I have abandoned your yawcamsettings\ .yawcam and then yawcamsettings\.yawcam\2\ directory structure as unmanageable.
I have returned to yawcamsettings\yawcam1\.yawcam and then yawcamsettings\yawcam2\.yawcam as is just makes sense.
I'll switch back to version 4.2 till version 5.x sorts this out.

I still think it something to do with motion sensing as almost all of the sessions that I have to kill have motion sensing turned on.
I just restarted and opened the preview window of the motion sensing instances. maybe that will tell me something.
malun
Site Admin
Posts: 1589
Joined: Sun Jan 04, 2004 1:29 pm

Re: yawcam 5 loses track of yawcam_settings.xml

Post by malun »

I found a scenario where the device error monitor in Yawcam could make the program freeze.
When this happened the exit dialog would get stuck at "Good bye". I guess this could be related to the problem you are facing.

It would be great if you could try this new beta version that contains a fix:
yawcam_BETA_2016-03-27.exe

Do you get the same problem as before with this version?

/malun
jxoco
Posts: 40
Joined: Sat Mar 26, 2011 8:50 pm

Re: yawcam 5 loses track of yawcam_settings.xml

Post by jxoco »

I will try the beta and let you know. I have reverted to 4.2 as it runs for weeks with no problems.
I installed 4.2 in a separate set of directories so i can switch back and forth. 5.0 would not stay running for 24 hours.
I'll type back to you and let you know.
malun
Site Admin
Posts: 1589
Joined: Sun Jan 04, 2004 1:29 pm

Re: yawcam 5 loses track of yawcam_settings.xml

Post by malun »

Perfect. Thanks!
/malun
jxoco
Posts: 40
Joined: Sat Mar 26, 2011 8:50 pm

Re: yawcam 5 loses track of yawcam_settings.xml

Post by jxoco »

Ran the beta install
I think it installed in program files yawcam
I changed the start.bat, put service on the end of the line
(actually had to move it to the desktop, change it and move it back,because of access rights)

I changed service_profile.cfg to c:\yawcamsettings\yawcam
went to c:\yawcamsettings\yawcam and deleted .yawcam folder
(noticed a bunch of .lck files ??)

ran it twice
shut them both down
copied 'disable running check to the new .yawcam\2\ folder

ran it again for testing
the disable running check does not seem to work with the beta version.

It is running now, we'll see if it holds on for 24 hours
malun
Site Admin
Posts: 1589
Joined: Sun Jan 04, 2004 1:29 pm

Re: yawcam 5 loses track of yawcam_settings.xml

Post by malun »

So I guess you are using the "service trick" to be able to use separate settings folders between your instance running Yawcam 0.4.2 and your instance running Yawcam 0.5.0 ?
Just to clarify for other users: When you are running Yawcam 0.5.0 and above there is no need to create separate folders for settings files when you run multiple instances of Yawcam.

Now for your question:
The lock files (.lck) are used to keep track on how many instances of Yawcam that is running. Normally you shouldn't need to worry about them. :-)

One thing I might forgot to mention is that the "text file hack" disablerunningcheck.txt, has been "upgraded" to a real setting in the beta version. You can now enable or disable the check by using the option: "Settings -> Edit Settings... -> Startup -> Confirm multiple instances".

/malun
jxoco
Posts: 40
Joined: Sat Mar 26, 2011 8:50 pm

Re: yawcam 5 loses track of yawcam_settings.xml

Post by jxoco »

eleven hours later still running.
I'm keeping my fingers crossed but it seems good.

Thanks for the "Settings -> Edit Settings... -> Startup -> Confirm multiple instances".
I'll try using it, later, after this test.

So far I'm really not feelin the folder structure of the multiple instances. There should be a yawcam\.yawcam\1\ before yawcam\.yawcam\2\

plus I like being able to shut down instance 3 and open instance 5. Now to do it i have to open up 1,2,3,4,5 and then close done 3.
before I could just run 1 and 5 if I wanted.
So to explain, 1 and 2 may be the same camera, an IP camera, instance 1 has a very small movement sensing area and is used in the daytime to prevent false positive emails. instance 2 is used at night time and has a large movement sensing area.
jxoco
Posts: 40
Joined: Sat Mar 26, 2011 8:50 pm

Re: yawcam 5 loses track of yawcam_settings.xml

Post by jxoco »

Twenty six hours later, still running. So your Beta fixes what was broke for me.
I left the console window open on the camera that sees pitch black and sure enough it is restarting about every three minutes.
it's up to 993 restarts.
And I'm getting alot of 550 FTP errors, so I've changed a couple of instances to NOT upload a temporary file and rename.
Those three instances haven't had a 550 since I did that about two hours ago.

Thanks for what the beta has in it.
jxoco
Posts: 40
Joined: Sat Mar 26, 2011 8:50 pm

Re: yawcam 5 loses track of yawcam_settings.xml

Post by jxoco »

One of the instances locked up after 34 or so hours.
This is OK as I normally reboot the pc every night and restart the cameras.
malun
Site Admin
Posts: 1589
Joined: Sun Jan 04, 2004 1:29 pm

Re: yawcam 5 loses track of yawcam_settings.xml

Post by malun »

Ah, I see why it can make sense to still use the "service trick" to manage the settings folders.
Good thing then, that this trick still works, for the users that need more control over the settings in a scenario like yours.

Okay, so at least the beta version made some difference. Thanks for trying it out and reporting the results! :)
I will try to see if I can find any more scenario where the program can lock up.

Since your camera does produce pitch black images without noise during night time, you might want to disable the "Device error monitor" in Yawcam. Restarting the device repeatedly so many times, is far from recommended :? It could perhaps cause other problems :roll:
What kind of behavoir do you get if you disable the "Device error monitor"?

/malun
Post Reply