Alan,<div><br></div><div>Can you please share a test case / hint of reproducing the bug.</div><div>If you have a setup where we can review that would useful too.</div><div><br></div><div>Regards,</div><div>Prasad<br><br><div class="gmail_quote">

On Thu, Nov 29, 2012 at 8:47 PM, Alan Lord <span dir="ltr">&lt;<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Well,<br>
<br>
I have no idea why this broke at all.<br>
<br>
But after a great deal of digging, I discovered that if I remove all<br>
data from the &quot;cond&quot; field of the vtiger_entityhandlers table, then it<br>
all seems to work. It means I must do the testing in my handler to check<br>
I am being triggered by the right module(s) but at least it seems to work.<br>
<br>
Has something changed in PHP recently to break this?<br>
<br>
There are two other reports of this error:<br>
<br>
<a href="https://forums.vtiger.com/viewtopic.php?f=139&amp;t=54986" target="_blank">https://forums.vtiger.com/viewtopic.php?f=139&amp;t=54986</a><br>
<br>
<a href="http://permalink.gmane.org/gmane.comp.web.vtigercrm.devel/5668" target="_blank">http://permalink.gmane.org/gmane.comp.web.vtigercrm.devel/5668</a><br>
<br>
But no solutions - other than *don&#39;t* specify a condition value in your<br>
Entity Registration as is decribed here:<br>
<a href="https://wiki.vtiger.com/index.php/510:Eventing" target="_blank">https://wiki.vtiger.com/index.php/510:Eventing</a><br>
<br>
Can one of the vtiger devs confirm this or not?<br>
<br>
I&#39;m sure this was working for me up until very recently, but I could<br>
have missed it, or it was due to a recent upgrade of the system (perhaps<br>
a PHP minor version hike? Currently on 5.3.10-1ubuntu3.4 with<br>
Suhosin-Patch (cli) (built: Sep 12 2012 18:59:41) )<br>
<br>
Cheers<br>
<br>
Al<br>
<br>
<br>
On 29/11/12 12:30, Alan Lord wrote:<br>
&gt; Anyone seen this before?<br>
&gt;<br>
&gt; Fatal error: Uncaught exception &#39;Exception&#39; with message &#39;Deadlock<br>
&gt; occured for events: CompaniesHandler&#39; in<br>
&gt; /var/www/vtiger/include/events/VTEventTrigger.inc:155 Stack trace: #0<br>
&gt; /var/www/vtiger/include/events/VTEventsManager.inc(118):<br>
&gt; VTEventTrigger-&gt;trigger(Object(VTEntityData)) #1<br>
&gt; /var/www/vtiger/data/CRMEntity.php(812):<br>
&gt; VTEventsManager-&gt;triggerEvent(&#39;vtiger.entity.a...&#39;,<br>
&gt; Object(VTEntityData)) #2 /var/www/vtiger/modules/Accounts/Save.php(103):<br>
&gt; CRMEntity-&gt;save(&#39;Accounts&#39;) #3 /var/www/vtiger/index.php(749):<br>
&gt; include(&#39;/var/www/vtiger/mo...&#39;) #4 {main} thrown in<br>
&gt; /var/www/vtiger/include/events/VTEventTrigger.inc on line 155<br>
&gt;<br>
&gt; I can&#39;t work out what has caused it to stop working :-(<br>
&gt;<br>
&gt; Now I can&#39;t save any entity, even though the Event Handler registration<br>
&gt; record has<br>
&gt;<br>
&gt; event_name:    vtiger.entity.aftersave<br>
&gt; handler_path:  modules/Companies/CompaniesHandler.php<br>
&gt; handler_class: CompaniesHandler<br>
&gt; cond:          moduleName in [&#39;Companies&#39;, &#39;Quotes&#39;, &#39;SalesOrder&#39;,<br>
&gt; &#39;Invoice&#39;]<br>
&gt; is_active:     1<br>
&gt; dependent_on:  []<br>
&gt;<br>
&gt; so it shouldn&#39;t be triggered at all when I am trying simply to save a<br>
&gt; Lead or an Account for example.<br>
&gt;<br>
&gt; In the CompaniesHandler class I also have a check:<br>
&gt;<br>
&gt; class CompaniesHandler extends VTEventHandler {<br>
&gt;<br>
&gt;       function handleEvent($eventName, $data) {<br>
&gt;               if($eventName == &#39;vtiger.entity.aftersave&#39;) {<br>
&gt;                       $module = $data-&gt;getModuleName();<br>
&gt;                       if ($module == &quot;Companies&quot;) {<br>
&gt;                               self::coPreProccessor($data);<br>
&gt;                       } else if ($module == &quot;Invoice&quot; || $module == &quot;Quotes&quot; || $module ==<br>
&gt; &quot;SalesOrder&quot;) {<br>
&gt;                               self::updateCoSeqData($data);<br>
&gt;                       }<br>
&gt;               }<br>
&gt;       }<br>
&gt;<br>
&gt; This was all working until recently (I think) but something seems to<br>
&gt; have caused it to break and I can&#39;t work out what...<br>
&gt;<br>
&gt; But firstly, why on earth is my event handler even being called when I<br>
&gt; am saving an entity which is not in the event registration condition field?<br>
&gt;<br>
&gt; The entity does actually get saved by the way. So this error is<br>
&gt; definitely happening on the &quot;aftersave&quot; event trigger...<br>
&gt;<br>
&gt; Cheers<br>
&gt;<br>
&gt; Al<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; <a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br></div>