XF 1.3 Error - library/XenForo/Diff.php:196

Neil E.

Active member
Any ideas on what triggers this error?

ErrorException: Fatal Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 51533 bytes) - library/XenForo/Diff.php:196

#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}


array(3) {
["url"] => string(238) "http://xenforotest.odsc.on.ca/admin...8163d741c07beaeeb777d727&_xfResponseType=json"
["_GET"] => array(5) {
["templates/extra-css_725/compare"] => string(0) ""
["_xfRequestUri"] => string(39) "/admin.php?templates/extra-css.725/edit"
["_xfNoRedirect"] => string(1) "1"
["_xfToken"] => string(53) "1,1408565399,38a2024f612ae7648163d741c07beaeeb777d727"
["_xfResponseType"] => string(4) "json"
}
["_POST"] => array(0) {
}
}
 
Quite large. I've figured out what I did when this occurs. In one of my styles, looking at template EXTRA.css, I tried "view custom changes". I expected that it would simply highlight the entire code. Nothing happens, then it displays something to the effect of "error in the javascript module, check server log". Connection times for me are very slow, would this be the cause?
 
The diff process can use a fair amount of memory, depending on the number of differences mostly. How many lines did your EXTRA.css template have though?

That said, the default PHP memory limit is 128M. Your server appears to have it locked at 64M. There isn't really much that can be done aside from increasing the memory limit.
 
I used an online "remove blank lines" utility and then pasted EXTRA into notepad++. Comes in at 2206 lines less 299 comments = 1907 lines.
1907 less 296 opening brackets and 296 closing brackets = 1315 actual lines.

I use the following layout for all items.
#content .pageContent
{
padding: 10px 5px 5px 5px !important;
}
/* ~widen page content and drop content closer to footerLegal~ */
 
Yeah, 2206 lines that are entirely different will use a fair amount of memory. The memory usage is proportional to the number of differing lines.
 
Thanks Mike, I didn't see this as a big problem, it just seemed usual that an error was created. No such behaviour with any other template check.

I do have something really odd happening that I would appreciate your input on. TMcore is adding content to templates when the modification is saved. I'll start a new topic once I figure out how to describe what's happening.
 
Top Bottom