Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47649 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57078 invoked from network); 27 Mar 2010 06:06:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Mar 2010 06:06:27 -0000 Authentication-Results: pb1.pair.com header.from=thruska@cubiclesoft.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=thruska@cubiclesoft.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain cubiclesoft.com designates 217.160.255.148 as permitted sender) X-PHP-List-Original-Sender: thruska@cubiclesoft.com X-Host-Fingerprint: 217.160.255.148 u15187375.onlinehome-server.com Windows 2000 SP4, XP SP1 Received: from [217.160.255.148] ([217.160.255.148:1325] helo=mail.cubiclesoft.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DC/B3-28635-160ADAB4 for ; Sat, 27 Mar 2010 01:06:26 -0500 Received: from [192.168.2.102] ([174.18.34.159]) by cubiclesoft.com with MailEnable ESMTP; Sat, 27 Mar 2010 02:06:05 -0400 Message-ID: <4BADA03F.6010301@cubiclesoft.com> Date: Fri, 26 Mar 2010 23:05:51 -0700 User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: internals@lists.php.net References: <4BAB0190.8090103@cubiclesoft.com> <1269507195.1737.2.camel@guybrush> <4BAB281F.3030807@rowe-clan.net> <4BAC1C7E.2090409@cubiclesoft.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] How to trace a crash bug? From: thruska@cubiclesoft.com (Thomas Hruska) Pierre Joye wrote: > hi, > > Can you please tell use the function causing the crash? That would be helpful. Funny thing: After about 2 days of wrestling with this issue and only when I copied and pasted the code into this reply did I notice: function BB_CreatePropertiesLink($title, $bbaction, $extra = array(), $confirm = "", $useprops2 = false, $parentwindow = false) { ... } ... function BB_CreateWidgetPropertiesLink($title, $bbaction, $extra = array(), $confirm = "", $useprops2 = false) { global $bb_widget; $extra["wid"] = $bb_widget->GetID(); return BB_CreateWidgetPropertiesLink($title, $bbaction, $extra, $confirm, $useprops2, true); } ... I kept reading the function that the second function was calling as being the first function. Recursion = stack overflow = crash. While it is obvious above, there is a lot of similar code surrounding it. Huge waste of your time. Apologies. Haven't had a crazy debugging session like this in a long time. One thought: Has a way to track call depth been considered (perhaps _execute())? If the number of calls exceeds a certain (reasonable) number, a warning or notice could be displayed and the output buffer flushed. That way, when it crashes, there is a log of some sort for the function. Then again, I don't know Zend well enough to make that sort of judgment call and such a thing could affect performance. BTW, my endeavor to create a Debug PHP build for Windows failed. Successfully built Apache and the PHP configuration said everything was good to go but the actual build failed (unresolved externals). I half-expected that to happen despite my best efforts. A recent *NIX PHP build of mine was a nightmare but successful (after compiling a zillion updated versions of all the libraries PHP wanted to link against). Has anyone thought about making a build system for public consumption that includes the "kitchen sink"? That is, every possible package and a build system that builds everything in one go - maybe powered by an INI file of some sort. I know the snapshots for Windows seemed to do that but that system wasn't packaged up for consumption as far as I know. Everyone I've ever encountered who has built PHP found it rather difficult because of all the dependencies. Just a thought I've had. -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/