Page 1 of 1

Event View (allowed memory) Fatal Error

Posted: Mon Dec 10, 2007 10:59 pm
by ammaross
I just stumbled upon what appears to be a long-standing bug/error in my RC2. http://www.zoneminder.com/forums/viewto ... wed+memory makes note of a similar occurance in 2004, as well as http://www.zoneminder.com/forums/viewto ... wed+memory in 2005.

I think these may not have been resolved due to not stating how to reproduce the error. On my install, I click the event total under 'hour', 'day', 'week', or 'month'. This brings up a list of events for that day, week, or whatever. When I click on the event name to view the event, the event window that pops up reports this error:

Code: Select all

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2 bytes) in /var/www/html/zm/zm_db.php on line 98
As you can see from the rather large number, I tested this out up to 128M script size. If the system runs in DVR streaming mode, there is no problems and the page loads just fine. Viewing events from any other locations (including event filter, recent list in monitor, or the 'events' total) all seem fine.

Is anyone else able to reproduce this error, or is mine the only one that is broken?

Posted: Tue Dec 11, 2007 8:55 pm
by ammaross
As a bump, and an update, I just upgraded to RC3. Problem still exists.

Posted: Wed Dec 12, 2007 4:37 pm
by agoodm
How many events do you have?

Posted: Wed Dec 12, 2007 8:41 pm
by ammaross
6 in the one I first noticed it on, but I checked all the others (event ones with short 3 sec motion clips as well as mocord clips) and they are all affected.

Posted: Thu Dec 20, 2007 7:07 pm
by zoneminder
This is very strange. I have a couple of suggestions.

1) Edit zm_db.php and change $db_debug to be true. Then reproduce the error and post what the SQL statement prior to it occuring is.
2) Run mysqlcheck on your DB to make sure there isn't some weird inconsistency in the DB causing it.

Posted: Thu Dec 20, 2007 8:19 pm
by ammaross
SQL statement causing the problem:

Code: Select all

select E.* from Events as E inner join Monitors as M on E.MonitorId = M.Id where E.StartTime <= '2007-12-20 12:32:08' order by E.StartTime desc
I'm not exactly sure why this statement needs to be run when I'm just trying to view a single event in non-DVR mode. I would also think there should be some AND E.MonitorId = '$monitorID' bit in there so it only runs through events for the monitor in question (since I did get to this through clicking the events for the past hour/day/etc for a specific camera...

I'll update this post if/when my manual SQL query of the above finishes... :wink: Should come up with about 122678 events.

mysqlcheck came up clean btw.

Update: You know it's bad when manually running the statement crashes a couple tables in the mysql db. :? Anyway, a little myisam repairing and db is back to normal, but problem still lurks.

I see this too

Posted: Thu Jan 24, 2008 10:21 pm
by ark
I get the same error

I'm running 1.23.1 on ubuntu

I'm upto event 9114 right now.

anything else I can do to help?

Posted: Wed Feb 13, 2008 2:41 pm
by paulf
Bump with 1.23.1 on FC4.

However if I enable the 'DVR' mode in options, I get a dialog box asking for mootools to be installed. I don't have mootools, but the viewer plays after I click OK (but the nav buttons appear to be broken - I guess that's what mootools is for?).

Posted: Wed Feb 13, 2008 6:17 pm
by cordel
Correct, you can not use the DVR interface without having mootools installed.

Posted: Wed Feb 13, 2008 9:20 pm
by zoneminder
The memory error problem has been addressed in another recent thread where I put a small patch up. However it is fixed in 1.23.2 if you can wait a few days.

Posted: Thu Feb 14, 2008 9:57 am
by paulf
zoneminder wrote:The memory error problem has been addressed in another recent thread where I put a small patch up. However it is fixed in 1.23.2 if you can wait a few days.
To be honest the DVR interface is working great here (I found and installed mootools) so this is no longer an issue for me. Take your time :D