Page 1 of 1

clarification for use of @ob_end_clean() I'm getting an EXC_BAD_ACCESS error..

Posted: Tue Apr 08, 2008 1:33 am
by mikemcvey
I'm getting an EXC_BAD_ACCESS exception in my browsers at semi-random times..
this crashes the browser (firefox and safari on mac OSX leopard) and give the EXC_BAD_ACCESS error.

this is when browsing the site..
I can't figure out why and think it could be related to a UDT.

Code: Select all

/* user defined tag to place side_bar content on certain pages */

global $gCms;
$current = $gCms->variables['page_name'];

// add news/whatshot sidebar if needed for these pages

if($current =="flavour"||$current =="grow"||$current =="thrive"||$current =="eat"||$current =="hungry" ){

$smarty_data = "{global_content name='news'}";
$smarty->_compile_source('temporary template', $smarty_data, $_compiled );
@ob_start();
$smarty->_eval('?>' . $_compiled);
$_contents = @ob_get_contents();
@ob_end_clean();

echo $_contents;

// add whats hot content 

$smarty_data = "{global_content name='whats_hot'}";
$smarty->_compile_source('temporary template', $smarty_data, $_compiled );
@ob_start();
$smarty->_eval('?>' . $_compiled);
$_contents = @ob_get_contents();
@ob_end_clean();

echo $_contents;
}

I read on http://www.cocoabuilder.com/archive/mes ... /18/114851
This kind of problem is almost always the result of over-releasing an object.

How does this figure for me.. Should I only call @ob_start() once?
I figure since I am using it twice in a row it could be the cause...

Any ideas greatly appreciated.

Re: clarification for use of @ob_end_clean() I'm getting an EXC_BAD_ACCESS error

Posted: Tue Apr 08, 2008 6:00 am
by mikemcvey
Well after quite a bit of searching I have discovered this may be a flash plugin issue...
I am on a MAC OS x Leopard and with latest flash plugin..

ยป Leopard + Flash release 115 = Bad.

http://discussions.apple.com/thread.jsp ... ID=6631475

So pretty sure not a coding problem with cmsms ;) as I tried without my UDT and it still crashed.
Hopefully the fix,, reinstall previous flash version 9 r47 will fix the problem.