<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jozef Chúťka&#039;s blog &#187; bug</title>
	<atom:link href="http://blog.yoz.sk/tag/bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.yoz.sk</link>
	<description>My life, my work</description>
	<lastBuildDate>Tue, 31 Jan 2012 12:40:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Flex 3 profiling not working (update)</title>
		<link>http://blog.yoz.sk/2009/10/flex-3-profiling-not-working/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flex-3-profiling-not-working</link>
		<comments>http://blog.yoz.sk/2009/10/flex-3-profiling-not-working/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 16:03:53 +0000</pubDate>
		<dc:creator>Jozef Chúťka</dc:creator>
				<category><![CDATA[Flash / Flex]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[debug player]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[mm.cfg]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[PreloadSwf]]></category>
		<category><![CDATA[profiler]]></category>
		<category><![CDATA[web browser]]></category>

		<guid isPermaLink="false">http://blog.yoz.sk/?p=527</guid>
		<description><![CDATA[The profiler is a part of the Flex Builder IDE, that listens for messages from the profiler agent. The profiler agent is a swf launched in parallel to your main swf. It is located in your Flex workspace at .metadata/.plugins/com.adobe.flash.profiler/ProfilerAgent.swf. Your IDE gets this agent to start by editing your mm.cfg and adding a “PreloadSwf” [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>The profiler is a part of the Flex Builder IDE, that listens for messages from the profiler agent. The profiler agent is a swf launched in parallel to your main swf. It is located in your Flex workspace at .metadata/.plugins/com.adobe.flash.profiler/ProfilerAgent.swf. Your IDE gets this agent to start by editing your mm.cfg and adding a “PreloadSwf” line. The agent uses the flash.sampler.* API to gather data on your main swf, and sends it to the IDE using TCP on a preconvened port. This port is 9999 by default, you can change it in Preferences/Flex/Profiler/Connections.</p></blockquote>
<p>If you can not get your profiler working, there are few methods you should try:</p>
<ul>
<li>close all other tabs</li>
<li>install debug player</li>
<li>change browser</li>
<li>change port</li>
<li>disable firewall / antivirus</li>
<li>define PreloadSwf path</li>
<li>localhost / 127.0.0.1</li>
<li>allocate console</li>
<li>ultimate methods (what worked for me)</li>
</ul>
<p><span id="more-527"></span></p>
<h3>Update (Feb 12, 2010): Close all other tabs</h3>
<p>Fastest thing to do is to close all other tabs in your browser, close all other instances of browser and than try profile again.</p>
<h3>Install debug player</h3>
<p>Make sure you have installed <a href="http://www.adobe.com/support/flashplayer/downloads.html">debug version of flash player</a>. Well, you probably have&#8230; so skip this one.</p>
<h3>Change browser</h3>
<p>It may seem to be weird but it works. All browsers (chrome, opera, ff) except for internet explorer use same flash player, switching to any other browser may fix your profiling. You can change browser in flex / window / preferences / general / web browser / use external / add &#8230; </p>
<h3>Change port</h3>
<p>Try change default port (flex / window / preferences / flex / profiler / connections / port number) to something else (7777, 8888), there were reports that simple port change helped to solve problem.</p>
<h3>Disable firewall / antivirus</h3>
<p>Do this on your own, if you are not sure about what you are doing call admin. The aim is to unblock port that is used for profiling. Try disable default windows (os) firewall or make exception. To make exception on your eset smar security use following procedure:</p>
<ul>
<li>Open Smart Security.</li>
<li>If you are in standard mode and do not see a menu in the top right hand corner click Setup->Toggle Advanced Mode.</li>
<li>Click on the ‘Enter entire advanced setup tree…’ link at the bottom.</li>
<li>Click Personal Firewall->Protocol Filtering.</li>
<li>Make sure ‘Enable application protocol content filtering’ is selected.</li>
<li>Below that select Redirect traffic for filtering->HTTP and POP3 ports.</li>
</ul>
<h3>Define PreloadSwf path</h3>
<p>If your IDE does not edit your <strong>mm.cfg</strong> file properly, change PreloadSwf property in manually. This is undocumented, but adding the property manually is reported as working solution. Try add the following line to the file</p>
<pre>PreloadSwf= C:/...flexworkspace/.metadata/.plugins/com.adobe.flash.profiler/ProfilerAgent.swf?host=localhost&#038;port=9999</pre>
<p>If you got the the path to the profile agent wrong. You can check this by looking in the flash text logs. If the preload went wrong, you should see a message like:</p>
<pre>PreloadSwf paths must be local trusted: C:/...flexworkspace/.metadata/.plugins/com.adobe.flash.profiler/ProfilerAgent.swf?host=localhost&#038;port=9999</pre>
<p>Make sure path directs to local trusted area!</p>
<h3>localhost / 127.0.0.1</h3>
<p>If the profiler in Flash Builder does not work, check if localhost does resolve to 127.0.0.1 on your machine. If not fix the hosts file. &#8211; <a href="http://twitter.com/quasimondo">Mario Klingemann (quasimondo)</a></p>
<h3>allocate console</h3>
<p>If the Flash Profiler does not start: switch off &#8220;Allocate Console&#8221; in the Profile Configurations Common tab. &#8211; <a href="http://twitter.com/quasimondo">Mario Klingemann (quasimondo)</a></p>
<h3>Ultimate methods (what worked for me)</h3>
<p>I spent almost hour trying to figure out why my profiler wont connect in one workspace and works just fine in another even with same settings. I tried every mentioned method but niether worked. While randomly trying all methods I finally came to something new:</p>
<blockquote><p>Profiling can only be performed on the debug version of an application.</p></blockquote>
<p>What the hell? Of course I am using debug player and pushing &#8220;profile it&#8221; button so what is wrong? I tried reinstall player to <a href="http://kb2.adobe.com/cps/142/tn_14266.html">other versions</a> but did not worked. Well, if you were able to came this far you may wonder what solution I finally figurd out. It is definitely not elegant solution nor correct but works, thats why I called it ultimate <img src='http://blog.yoz.sk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  . <strong>Click profile button as fast as you can (5 times in row)</strong> and behold! Randomly you get your profile perspective connected and working (if not, try few times)! So definitely a flex bug.</p>
<p>Sources:</p>
<ul>
<li><a href="http://www.grindstonemedia.net/2008/06/29/flex-profiler-connection-problems/">http://www.grindstonemedia.net/2008/06/29/flex-profiler-connection-problems/</a></li>
<li><a href="http://arielsommeria.com/blog/2008/12/22/getting-the-flex-profiler-to-work/">http://arielsommeria.com/blog/2008/12/22/getting-the-flex-profiler-to-work/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.yoz.sk/2009/10/flex-3-profiling-not-working/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

