Event not loading

Discussions related to the 1.36.x series of ZoneMinder
User avatar
iconnor
Posts: 2862
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Event not loading

Post by iconnor »

Well you're analysis has given me some ideas where to look.

The frames count is updated at the same time the endtime is updated and the event name changed. It is the final db query for that event. If zmc crashes, the frames count will not get updated. So we need to figure out why zmc is crashing.

Meanwhile I will go make this situation happen intentionally and see why zms is crashing.
whoop
Posts: 22
Joined: Fri Sep 04, 2020 7:08 pm

Re: Event not loading

Post by whoop »

iconnor wrote: Wed Oct 13, 2021 5:17 pm Well you're analysis has given me some ideas where to look.

The frames count is updated at the same time the endtime is updated and the event name changed. It is the final db query for that event. If zmc crashes, the frames count will not get updated. So we need to figure out why zmc is crashing.

Meanwhile I will go make this situation happen intentionally and see why zms is crashing.
Thank you very much for your response.
I have a lot of ERR's in the log when using the Zoneminder user interface in the browser stating zms did not run or exited early. When I'm not using Zoneminder manually the logs are relatively calm. Mostly packet warnings.

The last hundred events contained two broken events for me. I compared the time of the broken events with the time in the log and there was no errors or warnings written to the log at these specific times. So maybe something did not crash or my log settings are not set correctly for this problem.

As I understand you correctly you are theorizing that (eat least) the last db query somehow does not get executed (correctly). Does this also explain why the prev and next buttons take me to a non existing event (id=0) and I then have to return to the index page without knowing where a was (basically)?

A noticed that a broken event does have an endtime in the db (or maybe I am looking in the wrong place):

Code: Select all

SELECT Frames, EndDateTime FROM Events WHERE Id=70512;
+--------+---------------------+
| Frames | EndDateTime         |
+--------+---------------------+
|    101 | 2021-10-13 22:19:02 |
+--------+---------------------+
1 row in set (0.000 sec)
What I find interesting is that Frames states 101 in the db but I have 106 working jpegs captured on the filesystem marked 00001-capture.jpg through 00106-capture.jpg (and alarm and snapshot jpgs).

Hope this helps.
Kind regards
whoop
Posts: 22
Joined: Fri Sep 04, 2020 7:08 pm

Re: Event not loading

Post by whoop »

Iconnor, please don't get mad but I just had to try :oops:

Code: Select all

update Events set Frames=106 WHERE id=70512;
Now the event is working, also the prev and next button are working.

So basically I changed the Frames value from 101 to 106 for the broken event and it works now.
There are 106 captured jpegs on the filesystems not 101. I don't know why 101 was the last value written to the database for this event. I also don't know why a slightly wrong value wreaks havoc so much in this case.

Hope this helps (some more)
Kind regards
Post Reply