<?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>bug &#8211; Alessandro Crugnola &#8211; sephiroth.it</title>
	<atom:link href="https://blog.sephiroth.it/tag/bug/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.sephiroth.it</link>
	<description>programmer by pure chance</description>
	<lastBuildDate>Sat, 12 Apr 2014 04:24:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://blog.sephiroth.it/wp-content/uploads/2019/03/cropped-sepy-big-32x32.png</url>
	<title>bug &#8211; Alessandro Crugnola &#8211; sephiroth.it</title>
	<link>https://blog.sephiroth.it</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>java.lang.UnsatisfiedLinkError workaround</title>
		<link>https://blog.sephiroth.it/2014/04/12/java-lang-unsatisfiedlinkerror-workaround/</link>
					<comments>https://blog.sephiroth.it/2014/04/12/java-lang-unsatisfiedlinkerror-workaround/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Sat, 12 Apr 2014 04:21:52 +0000</pubDate>
				<category><![CDATA[android]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[chromium]]></category>
		<category><![CDATA[packagemanager]]></category>
		<category><![CDATA[UnsatisfiedLinkError]]></category>
		<category><![CDATA[workaround]]></category>
		<category><![CDATA[xperia]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=1668</guid>

					<description><![CDATA[If you ever worked with native shared libraries in Android you&#8217;ve probably already faced the &#8220;java.lang.UnsatisfiedLinkError&#8221; java exception which randomly seems to happen on certain devices ( actually it&#8217;s happening on xperia phones mostly, based on my reports ). There are a bunch of bug reports in the android project like this: https://code.google.com/p/android/issues/detail?id=35962 or this &#8230; <a href="https://blog.sephiroth.it/2014/04/12/java-lang-unsatisfiedlinkerror-workaround/" class="more-link">Continue reading <span class="screen-reader-text">java.lang.UnsatisfiedLinkError workaround</span></a>]]></description>
										<content:encoded><![CDATA[<p>If you ever worked with native shared libraries in Android you&#8217;ve probably already faced the <strong>&#8220;java.lang.UnsatisfiedLinkError&#8221;</strong> java exception which randomly seems to happen on certain devices ( actually it&#8217;s happening on <strong>xperia</strong> phones mostly, based on my reports ).<br />
There are a bunch of bug reports in the android project like this: <a href="https://code.google.com/p/android/issues/detail?id=35962" target="_blank">https://code.google.com/p/android/issues/detail?id=35962</a> or this <a href="https://code.google.com/p/android/issues/detail?id=64111" target="_blank">https://code.google.com/p/android/issues/detail?id=64111</a>.<br />
The problem is that Google basically marked all of them as &#8220;resolved&#8221;, even if developers are still complaining about it.</p>
<p><span id="more-1668"></span></p>
<p>The fun thing is that it seems that they are aware of the problem and in fact they&#8217;re trying to use a workaround internally in the chromium source code.<br />
For instance, this is the first workaround I found:<br />
<a href="https://codereview.chromium.org/180273005/patch/80001/90003" target="_blank">https://codereview.chromium.org/180273005/patch/80001/90003</a></p>
<p>which is basically looking into the <em>&#8220;/data/app-lib/{packagename}-1/&#8221;</em> folder for the missing libraries.<br />
And in fact, inside the comments of that file you can read this:</p>
<blockquote><p><cite>Native library directory in an updated package is a symbolic link<br />
to a directory in /data/app-lib/, for example:<br />
/data/data/com.android.chrome/lib -&gt; /data/app-lib/com.android.chrome[-1].<br />
When updating the application, the PackageManager create a new directory,<br />
e.g., /data/app-lib/com.android.chrome-2, and remove the old symlink and<br />
recreate one to the new directory. However, on some devices (e.g. Sony Xperia),<br />
the old directory was deleted, but deleting the old symlink failed,<br />
and that makes system loading library from the /system/lib directory.</cite></p></blockquote>
<p>Then I noticed another approach which is probably better: <a href="http://goo.gl/cbCAmC">http://goo.gl/cbCAmC</a></p>
<p>which is basically doing what the PackageManager was supposed to do, unzip the shared libraries from the apk file to the &#8220;lib&#8221; dir of the application itself.</p>
<p>Btw, I&#8217;m gonna try both of them and verify if they actually work so I can finally stop seeing that annoying bug in the Google Play Console!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2014/04/12/java-lang-unsatisfiedlinkerror-workaround/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>Playing with a LocalActivityManager bug</title>
		<link>https://blog.sephiroth.it/2010/11/26/playing-with-a-localactivitymanager-bug/</link>
					<comments>https://blog.sephiroth.it/2010/11/26/playing-with-a-localactivitymanager-bug/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Fri, 26 Nov 2010 09:55:18 +0000</pubDate>
				<category><![CDATA[android]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[localactivitymanager]]></category>
		<category><![CDATA[reflection]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=1405</guid>

					<description><![CDATA[If you already used the&#160;ActivityGroup class you probably used also the LocalActivityManager instance to manage your group&#8217;s activities. I was creating my activity which should also manages its internal history ( using a ViewFlipper for animating the activity views ). The problem came out once I tried to destroy an activity from the history using &#8230; <a href="https://blog.sephiroth.it/2010/11/26/playing-with-a-localactivitymanager-bug/" class="more-link">Continue reading <span class="screen-reader-text">Playing with a LocalActivityManager bug</span></a>]]></description>
										<content:encoded><![CDATA[<p>If you already used the <a href="http://developer.android.com/reference/android/app/ActivityGroup.html">ActivityGroup</a> class you probably used also the <a href="http://developer.android.com/reference/android/app/LocalActivityManager.html">LocalActivityManager</a> instance to manage your group&#8217;s activities. I was creating my activity which should also manages its internal history ( using a ViewFlipper for animating the activity views ).<br />
 The problem came out once I tried to destroy an activity from the history using the LocalActivityManager <a href="http://developer.android.com/reference/android/app/LocalActivityManager.html#destroyActivity(java.lang.String, boolean)">destroy</a> method. After an activity was removed from both my internal history and from the local activity manager I was unable to create a new instance of the same activity.</p>
<p>After googling for my problem I found that it was because a bug in the LocalActivityManager class: <a href="http://code.google.com/p/android/issues/detail?id=12359">http://code.google.com/p/android/issues/detail?id=12359</a><br />
 This is exactly my problem! In fact, debugging the android code ( see <a title="Eclipse attach android source code" href="http://android.opensourceror.org/2010/01/18/android-source/">this post</a> for debugging android code ) at that point it was clear that the record it&#8217;s not removed from the internal <strong>mActivities</strong> map.</p>
<p>Fortunately there are Reflections which can help me! I added this piece of code after the call to the destroy method:</p>
<p><code lang="java"><br />
Field mActivitiesField = getLocalActivityManager().getClass().getDeclaredField( "mActivities" );<br />
mActivitiesField.setAccessible( true );<br />
((Map) mActivitiesField.get( getLocalActivityManager() )).remove( id );<br />
</code></p>
<p>and that trick does the job</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2010/11/26/playing-with-a-localactivitymanager-bug/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Flex sdk 3.5.0 problem with ternary operators</title>
		<link>https://blog.sephiroth.it/2010/03/25/flex-sdk-3-5-0-problem-with-ternary-operators/</link>
					<comments>https://blog.sephiroth.it/2010/03/25/flex-sdk-3-5-0-problem-with-ternary-operators/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Thu, 25 Mar 2010 23:42:26 +0000</pubDate>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[ternary]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=294</guid>

					<description><![CDATA[I&#8217;ve got problems to isolate the problem into a very big project with many linked sources. After hours inspecting and commenting lines of code trying to figure out the reason why flex gave me an &#8220;internal error&#8221; I found the problem. This very simple script was crashing the flex compiler if using the 3.5.0 sdk &#8230; <a href="https://blog.sephiroth.it/2010/03/25/flex-sdk-3-5-0-problem-with-ternary-operators/" class="more-link">Continue reading <span class="screen-reader-text">Flex sdk 3.5.0 problem with ternary operators</span></a>]]></description>
										<content:encoded><![CDATA[<div>I&#8217;ve got problems to isolate the problem into a very big project with many linked sources. After hours inspecting and commenting lines of code trying to figure out the reason why flex gave me an &#8220;internal error&#8221; I found the problem.</div>
<div>This very simple script was crashing the flex <a class="zem_slink freebase/en/compiler rdfa" title="Compiler" rel="ctag:means wikipedia" href="http://en.wikipedia.org/wiki/Compiler">compiler</a> if using the <strong>3.5.0 sdk</strong> ( revision 3.5.0.12683 ).</div>
<div>Fortunately the 4.0.0 compiler works fine. At the end it seems to be the combination of &#8220;+&#8221; and &#8220;-&#8221; and the ternary operator.</div>
<pre>package
{
   import flash.display.Sprite;
   public class ternary_test extends Sprite
   {
      public function ternary_test()
      {
         var n: Number = 0;
         var d: int = 3;
         var k: int = 5;
         var j: int = 10;
         n = 1 + ( -( d == 0 ? k : j ) );
         trace( "n=" + n );
      }
   }
}</pre>
<p>will cause the compiler to crash with the following stack trace:</p>
<pre><span style="text-decoration: underline;">compile</span><span style="color: #85afff;">:</span>

    [<span style="text-decoration: underline;">mxmlc</span>] Loading configuration file /Applications/Adobe Flash Builder 4 Plug-in/sdks/3.5.0/frameworks/flex-config.xml

    [<span style="text-decoration: underline;">mxmlc</span>] Error: null

<span style="color: #fd7a00;">    [</span><span style="text-decoration: underline;">mxmlc</span><span style="color: #fd7a00;">] </span><span style="text-decoration: underline;">java.lang.NullPointerException</span>

    [<span style="text-decoration: underline;">mxmlc</span>] <span style="white-space: pre;">	</span>at macromedia.asc.semantics.ConstantEvaluator.evaluate(<span style="text-decoration: underline;">ConstantEvaluator.java:1290</span>)

    [<span style="text-decoration: underline;">mxmlc</span>] <span style="white-space: pre;">	</span>at macromedia.asc.parser.UnaryExpressionNode.evaluate(<span style="text-decoration: underline;">UnaryExpressionNode.java:51</span>)

    [<span style="text-decoration: underline;">mxmlc</span>] <span style="white-space: pre;">	</span>at macromedia.asc.semantics.ConstantEvaluator.evaluate(<span style="text-decoration: underline;">ConstantEvaluator.java:2153</span>)

    [<span style="text-decoration: underline;">mxmlc</span>] <span style="white-space: pre;">	</span>at macromedia.asc.parser.ListNode.evaluate(<span style="text-decoration: underline;">ListNode.java:44</span>)

    [<span style="text-decoration: underline;">mxmlc</span>] <span style="white-space: pre;">	</span>at macromedia.asc.semantics.ConstantEvaluator.evaluate(<span style="text-decoration: underline;">ConstantEvaluator.java:1497</span>)

    [<span style="text-decoration: underline;">mxmlc</span>] <span style="white-space: pre;">	</span>at macromedia.asc.parser.BinaryExpressionNode.evaluate(<span style="text-decoration: underline;">BinaryExpressionNode.java:56</span>)

    [<span style="text-decoration: underline;">mxmlc</span>] <span style="white-space: pre;">	</span>at macromedia.asc.semantics.ConstantEvaluator.evaluate(<span style="text-decoration: underline;">ConstantEvaluator.java:2124</span>)

    [<span style="text-decoration: underline;">mxmlc</span>] <span style="white-space: pre;">	</span>at macromedia.asc.parser.ArgumentListNode.evaluate(<span style="text-decoration: underline;">ArgumentListNode.java:45</span>)...</pre>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img decoding="async" class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=cc432a65-0505-44c1-b8fe-35dab7bb5dda" alt="" /><span class="zem-script more-related more-info pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2010/03/25/flex-sdk-3-5-0-problem-with-ternary-operators/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Vector.splice bug</title>
		<link>https://blog.sephiroth.it/2010/01/27/vector-splice-bug/</link>
					<comments>https://blog.sephiroth.it/2010/01/27/vector-splice-bug/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Wed, 27 Jan 2010 08:28:54 +0000</pubDate>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[JIRA]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[splice]]></category>
		<category><![CDATA[tamarin]]></category>
		<category><![CDATA[vector]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=288</guid>

					<description><![CDATA[Usually people complain about opensource projects because they lack of documentation ( that&#8217;s true most of the times.. ), but this doens&#8217;t happen only there&#8230; Today I&#8217;ve spent a lot of time trying to understand why I was so stupid because I wasn&#8217;t able to concatenate 2 vectors of int using splice. But for what &#8230; <a href="https://blog.sephiroth.it/2010/01/27/vector-splice-bug/" class="more-link">Continue reading <span class="screen-reader-text">Vector<T>.splice bug</span></a>]]></description>
										<content:encoded><![CDATA[<p>Usually people complain about opensource projects because they lack of documentation ( that&#8217;s true most of the times.. ), but this doens&#8217;t happen only there&#8230;</p>
<div>Today I&#8217;ve spent a lot of time trying to understand why I was so stupid because I wasn&#8217;t able to concatenate 2 vectors of int using splice.</div>
<div>But for what you can read from the *official* Adobe <a href="http://livedocs.adobe.com/flex/3/langref/Vector.html#splice()">documentation</a>, which says (about the third parameter for the splice method):</div>
<blockquote><p>&#8230; items &#8212; An optional list of one or more comma-separated values, **or a Vector**, to insert into the Vector at the position specified in the startIndex parameter.</p></blockquote>
<div>Ok, that&#8217;s why I didn&#8217;t know why I couldn&#8217;t manage to make it work! This simple code gives wrong results:</div>
<p>
<code lang="actionscript"><br />
var v1: Vector.<int> = new Vector.</int><int>();<br />
v1.push(1);<br />
v1.push(2);<br />
v1.push(3);<br />
v1.push(4); </p>
<p>var v2: Vector.</int><int> = new Vector.</int><int>();<br />
v2.push(100);<br />
v2.push(200);<br />
v1.splice( 1, 1, v2 );  </p>
<p>// Expected result: [1,100,200,3,4]<br />
// Actual result: [1,0,3,4] </int></code>
</p>
<p>It seems that the third parameter is being casted into int and so only &#8216;0&#8217; has been inserted into the first Vector!</p>
<p>I tried to look into Adobe jira bugbase and what I&#8217;ve found <a href="http://bugs.adobe.com/jira/browse/FP-1349">there</a> is that it was a known bug since long time and it has been also moved to the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=472207">tamarin bugbase</a>.</p>
<p>The problem is that at the end they simply closed the bug as invalid bug because the documentation was wrong!</p>
<p>Funny</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2010/01/27/vector-splice-bug/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Java 6 Update 10 breaks Flex compiler!</title>
		<link>https://blog.sephiroth.it/2008/09/12/java-6-update-10-breaks-flex-compiler/</link>
					<comments>https://blog.sephiroth.it/2008/09/12/java-6-update-10-breaks-flex-compiler/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Sat, 13 Sep 2008 00:04:39 +0000</pubDate>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[java]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=262</guid>

					<description><![CDATA[I just want to share this problem I found so maybe someone can save some time.. Today while surfing the net I received a notification of an update of my Java installation to the Update 10 in order to see correctly the contents of that site.. bla bla bla.. Sometime later I switched to Flex &#8230; <a href="https://blog.sephiroth.it/2008/09/12/java-6-update-10-breaks-flex-compiler/" class="more-link">Continue reading <span class="screen-reader-text">Java 6 Update 10 breaks Flex compiler!</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="https://blog.sephiroth.it/wp-content/uploads/2008/09/java-update-10.png"><img decoding="async" class="alignleft size-full wp-image-1127" style="margin: 4px;" title="java-update-10" src="https://blog.sephiroth.it/wp-content/uploads/2008/09/java-update-10.png" alt="" width="50" height="59" /></a>I just want to share this problem I found so maybe someone can save some time..</p>
<p>Today while surfing the net I received a notification of an update of my Java installation to the Update 10 in order to see correctly the contents of that site.. bla bla bla..</p>
<p>Sometime later I switched to Flex and at the first execution of my ant script for compiling a flex project I suddenly received this beautiful error:<br />
<code>[exec] Error: java/security/MessageDigest<br />
[exec] java.lang.NoClassDefFoundError: java/security/MessageDigest<br />
[exec]     at java.io.ObjectStreamClass.computeDefaultSUID(Unknown Source)<br />
[exec]     at java.io.ObjectStreamClass.access$100(Unknown Source)<br />
[exec]     at java.io.ObjectStreamClass$1.run(Unknown Source)<br />
[exec]     at java.security.AccessController.doPrivileged(Native Method)<br />
[exec]     at java.io.ObjectStreamClass.getSerialVersionUID(Unknown Source)<br />
[exec]     at java.io.ObjectStreamClass.initNonProxy(Unknown Source)<br />
[exec]     at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)<br />
[exec]     at java.io.ObjectInputStream.readClassDesc(Unknown Source)<br />
[exec]     at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)<br />
[exec]     at java.io.ObjectInputStream.readClassDesc(Unknown Source)<br />
[exec]     at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)<br />
[exec]     at java.io.ObjectInputStream.readObject0(Unknown Source)<br />
[exec]     at java.io.ObjectInputStream.readObject(Unknown Source)<br />
[exec]     at flex.util.SerializedTemplateFactory.load(SerializedTemplateFactory.java:30)<br />
[exec]     at flex2.compiler.util.VelocityManager.getTemplate(VelocityManager.java:162)<br />
[exec]     at flex2.compiler.util.VelocityManager.getTemplate(VelocityManager.java:151)<br />
[exec]     at flex2.compiler.util.VelocityManager.getTemplate(VelocityManager.java:137)<br />
[exec]     at flex2.compiler.as3.genext.GenerativeSecondPassEvaluator.generateSupportCode(GenerativeSecondPassEvaluator.java:256)<br />
[exec]     at flex2.compiler.as3.genext.GenerativeSecondPassEvaluator.modifySyntaxTree(GenerativeSecondPassEvaluator.java:355)<br />
[exec]     at flex2.compiler.as3.binding.BindableSecondPassEvaluator.evaluate(BindableSecondPassEvaluator.java:102)<br />
[exec]     at macromedia.asc.parser.ClassDefinitionNode.evaluate(ClassDefinitionNode.java:106)<br />
[exec]     at flash.swf.tools.as3.EvaluatorAdapter.evaluate(EvaluatorAdapter.java:338)<br />
[exec]     at macromedia.asc.parser.StatementListNode.evaluate(StatementListNode.java:60)<br />
[exec]     at flash.swf.tools.as3.EvaluatorAdapter.evaluate(EvaluatorAdapter.java:923)<br />
[exec]     at macromedia.asc.parser.ProgramNode.evaluate(ProgramNode.java:80)<br />
[exec]     at flex2.compiler.as3.genext.GenerativeExtension.parse2(GenerativeExtension.java:114)<br />
[exec]     at flex2.compiler.as3.Compiler.parse2(Compiler.java:386)<br />
[exec]     at flex2.compiler.API.parse2(API.java:2390)<br />
[exec]     at flex2.compiler.API.parse2(API.java:2348)<br />
[exec]     at flex2.compiler.API.batch2(API.java:375)<br />
[exec]     at flex2.compiler.API.batch(API.java:1117)<br />
[exec]     at flex2.compiler.API.compile(API.java:1290)<br />
[exec]     at flex2.compiler.API.compile(API.java:1210)<br />
[exec]     at flex2.tools.Compc.compc(Compc.java:158)<br />
[exec]     at flex2.tools.Compc.main(Compc.java:41)</code><br />
so I tried also to compile another project before go crazy, but I got this another java funny error, which was more or less unreadable as the previous one!</p>
<p>Fortunately I remembered the update I did of Java! And in fact after remove that update everything worked again!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2008/09/12/java-6-update-10-breaks-flex-compiler/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>cacheAsBitmap hell</title>
		<link>https://blog.sephiroth.it/2008/03/30/cacheasbitmap-hell/</link>
					<comments>https://blog.sephiroth.it/2008/03/30/cacheasbitmap-hell/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Sun, 30 Mar 2008 20:38:15 +0000</pubDate>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[aviary]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[cacheasBitmap]]></category>
		<category><![CDATA[concatednatedMatrix]]></category>
		<category><![CDATA[matrix]]></category>
		<category><![CDATA[Phoenix]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=248</guid>

					<description><![CDATA[Last week I spent a whole day trying to solve an issue in Phoenix due to a strange problem which comes up suddenly after some code changes. The problem was that now using the transformation tool the bounds of the selected bitmap were not detected correctly and the tool itself didn&#8217;t work. So I spent &#8230; <a href="https://blog.sephiroth.it/2008/03/30/cacheasbitmap-hell/" class="more-link">Continue reading <span class="screen-reader-text">cacheAsBitmap hell</span></a>]]></description>
										<content:encoded><![CDATA[<p>Last week I spent a whole day trying to solve an issue in <a href="http://aviary.com" target="_blank">Phoenix</a> due to a strange problem which comes up suddenly after some code changes.<br />
The problem was that now using the transformation tool the bounds of the selected bitmap were not detected correctly and the tool itself didn&#8217;t work.<br />
So I spent a lot of time in checking out all the recent code changes ( and they were a lot! ) to find out the possible cause&#8230;<br />
Anyway, I was lucky to figure out the problem by accident and the problem was <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html#cacheAsBitmap" target="_blank"><strong>cacheAsBitmap</strong></a>!</p>
<p>The problem with the tool is because in order to find the correct bounds of any element on the stage it use the <a href="http://livedocs.adobe.com/flex/2/langref/flash/geom/Transform.html#concatenatedMatrix" target="_blank">.concatenatedMatrix</a> property of the element itself ( which represents the combined transformation matrixes of the    display object and all of its parent objects, back to the root level ).<br />
BUT if any of its parent display object ( not the root itself ) has the cacheAsBitmap property set to true then the concatenatedMatrix returns a wrong value!</p>
<p>I put a real simple flash example of what I mean. Just click on any of the 2 colored objects to activate the transform tool, then click on the &#8220;cache&#8221; button and click again on those objects to see the difference.</p>
<p><script src="/assets/javascript/swfobject.js" type="text/javascript"></script></p>
<p>[kml_flashembed publishmethod=&#8221;static&#8221; fversion=&#8221;10.0.22&#8243; movie=&#8221;https://blog.sephiroth.it/wp-content/uploads/2008/03/cacheasbitmap_hell.swf&#8221; width=&#8221;450&#8243; height=&#8221;450&#8243; targetclass=&#8221;flashmovie&#8221; bgColor=&#8221;#ffffcc&#8221;]</p>
<p><a href="http://adobe.com/go/getflashplayer"><img decoding="async" src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
<p>[/kml_flashembed]</p>
<p><strong>P.S.</strong> I&#8217;ve reported the bug in the flash player <a href="https://bugs.adobe.com/jira/browse/FP-121">bugbase</a>, if anyone is interested in watch or vote for it.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2008/03/30/cacheasbitmap-hell/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>Flex Canvas bug when it is zoomed in and &#8220;horizontalCenter = 0&#8221;</title>
		<link>https://blog.sephiroth.it/2007/11/14/flex-canvas-bug-when-it-is-zoomed-in-and-horizontalcenter-0/</link>
					<comments>https://blog.sephiroth.it/2007/11/14/flex-canvas-bug-when-it-is-zoomed-in-and-horizontalcenter-0/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Wed, 14 Nov 2007 20:37:19 +0000</pubDate>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[bug]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=238</guid>

					<description><![CDATA[Recently I came across a Flex bug when working on canvas. If you have a canvas with an object centered inside ( horizontal or vertical, it&#8217;s the same ) and scale this object the result is that the canvas will clip left and top its contents! To understand what I mean see this example and &#8230; <a href="https://blog.sephiroth.it/2007/11/14/flex-canvas-bug-when-it-is-zoomed-in-and-horizontalcenter-0/" class="more-link">Continue reading <span class="screen-reader-text">Flex Canvas bug when it is zoomed in and &#8220;horizontalCenter = 0&#8221;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Recently I came across a Flex <strong>bug</strong> when working on canvas. If you have a canvas with an object centered inside ( horizontal or vertical, it&#8217;s the same ) and scale this object the result is that the canvas will clip left and top its contents!<br />
To understand what I mean see this example and try to scale the image:</p>
<p>[kml_flashembed publishmethod=&#8221;static&#8221; fversion=&#8221;10.0.22&#8243; movie=&#8221;https://blog.sephiroth.it/wp-content/uploads/2007/11/canvas_bug.swf&#8221; width=&#8221;250&#8243; height=&#8221;290&#8243; targetclass=&#8221;flashmovie&#8221;]</p>
<p><a href="http://adobe.com/go/getflashplayer"><img decoding="async" src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
<p>[/kml_flashembed]</p>
<p>And this is the code used:</p>
<p><code lang="xml"><br />
< ?xml version="1.0" encoding="utf-8"?><br />
<mx:application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundAlpha="0"><br />
	<mx:number id="scale">1</mx:number><br />
	<mx:vbox horizontalCenter="0" verticalCenter="0"><br />
		<mx:hbox width="100%" horizontalCenter="0"><br />
			<mx:label text="Zoom" /><mx:hslider value="{scale}" change="{scale = HSlider(event.target).value}" width="100%" /><br />
		</mx:hbox><br />
		<mx:canvas width="200" height="200"
				   backgroundColor="#EEEEEE" borderColor="#666666"
				   borderStyle="solid" verticalCenter="0" horizontalCenter="0" ><br />
			<mx:image id="image" source="@Embed('../assets/test.png')" scaleX="{scale}" scaleY="{scale}"
					  verticalCenter="0" horizontalCenter="0" /><br />
		</mx:canvas><br />
	</mx:vbox><br />
</mx:application><br />
</code></p>
<p>As you can see once the image is scaled and it&#8217;s bigger that its parent, you wont be able to see it top left corner anymore. <strong>This is an annoying bug for me!</strong></p>
<p>Later I found that someone opened a ticket in the Flex bug management system here: <a title="JIRA-13009" href="http://bugs.adobe.com/jira/browse/SDK-13009" target="_blank">http://bugs.adobe.com/jira/browse/SDK-13009</a><br />
A couple of days ago I received a notification that the bug has been closed&#8230; and incredible they closed it as NOT A BUG!<br />
I can understand that finding the bug in a file with 5000 and more lines of code it&#8217;s not easy and can cause horrible headache, but the reason they gave it&#8217;s nosense! It&#8217;s completely a different thing that the reason of this bug.</p>
<p>Moreover what&#8217;s the connection between flash and html?</p>
<p>Flex have been designed since the 1.0 version as a framework for building RIA (Rich Internet Applications).<br />
A RIA have to behave as a desktop application that runs using the web browser. One of the advantages of Flex agains Ajax is that the first technology provide to the user a behaviour which is much more similar to desktop applications that the one provided using HTML+Javascript. And so my questions is: why should Flex behave like HTML when one of its most important features is to be different from HTML ?<br />
Flex behaves like other SDKs used to develop desktop apps in many situations which are much less important than the one hilighted above. So why close this bug (yes. it is a bug) providing as explanation that it is correct because it behaves like HTML ?</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2007/11/14/flex-canvas-bug-when-it-is-zoomed-in-and-horizontalcenter-0/feed/</wfw:commentRss>
			<slash:comments>16</slash:comments>
		
		
			</item>
		<item>
		<title>SharedObject reader plugin for FD3</title>
		<link>https://blog.sephiroth.it/2007/09/22/sharedobject-reader-plugin-for-fd3/</link>
					<comments>https://blog.sephiroth.it/2007/09/22/sharedobject-reader-plugin-for-fd3/#respond</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Sun, 23 Sep 2007 02:44:33 +0000</pubDate>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[fdplugins]]></category>
		<category><![CDATA[flashdevelop]]></category>
		<category><![CDATA[sharedobject]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=231</guid>

					<description><![CDATA[In the past week I was working on the SharedObject plugin for FlashDevelop 3. First I just made a port of my previous sepy sharedobject reader python code into C#, but then for the new AMF3 sharedobject encoding I found this java class very useful. By the way, after coding and coding.. I finally managed &#8230; <a href="https://blog.sephiroth.it/2007/09/22/sharedobject-reader-plugin-for-fd3/" class="more-link">Continue reading <span class="screen-reader-text">SharedObject reader plugin for FD3</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="http://fdplugins.googlecode.com/svn/trunk/images/so_reader.png" target="_blank"><img decoding="async" src="http://fdplugins.googlecode.com/svn/trunk/images/so_reader.png" border="0" alt="" hspace="4" vspace="4&quot;" width="200" height="165" align="left" /></a> In the past week I was working on the <a href="http://code.google.com/p/fdplugins/wiki/SharedObjectReader">SharedObject</a> plugin for <a href="http://www.flashdevelop.org/">FlashDevelop</a> 3.<br />
First I just made a port of my previous sepy sharedobject reader <strong>python </strong>code into <strong>C#</strong>, but then for the new AMF3 sharedobject encoding I found this <a href="http://xk72.com/blog/2006/04/28/amf3-reference-deserializer-in-java/">java class</a> very useful.<br />
By the way, after coding and coding.. I finally managed to create a good solution (ok, I have to test it a lot again&#8230;).<br />
You can find the plugin here: <a href="http://code.google.com/p/fdplugins">http://code.google.com/p/fdplugins</a><br />
<strong></strong></p>
<p><strong>But the interesting thing</strong> I found was another!<br />
Flash does not read the sharedojects correctly (at least the amf0 ones)!</p>
<p>To reproduce this bug follow these steps:</p>
<p>Create a new document (flash8 / as2)<br />
&#8211; Add this code in the timeline:<br />
<code lang="actionscript">var so:SharedObject = SharedObject.getLocal("flash8", "/");<br />
so.clear();<br />
so.data.obj1 = new XML("");<br />
so.data.obj2 = new Date();<br />
so.data.obj3 = so.data.obj2;<br />
so.data.obj4 = {a:1, b:so.data.obj1, c:[1,2,3], d:so.data.obj2};<br />
so.data.obj5 = so.data.obj4.c;<br />
so.flush();</code><br />
you will see this in the debug view variables:<br />
<code>Variabile _level0.so = [oggetto #1, classe 'SharedObject'] {<br />
data:[oggetto #2, classe 'Object'] {<br />
obj1:[oggetto #3] {<br />
<root />;<br />
},<br />
obj2:[oggetto #4, classe 'Date'] {Sat Sep 22 19:31:31 GMT+0200 2007},<br />
obj3:[oggetto #4, classe 'Date'],<br />
obj4:[oggetto #5, classe 'Object'] {<br />
d:[oggetto #4, classe 'Date'],<br />
c:[oggetto #6, classe 'Array'] [<br />
0:1,<br />
1:2,<br />
2:3<br />
],<br />
b:[oggetto #3],<br />
a:1<br />
},<br />
obj5:[oggetto #6, classe 'Array']<br />
}<br />
}</code><br />
ok, now remove all the code you just written and leave just this line:<br />
<code>var so:SharedObject = SharedObject.getLocal("flash8", "/");</code><br />
and see the variables list again, you will see this:<br />
<code>Variabile _level0.so = [oggetto #1, classe 'SharedObject'] {<br />
data:[oggetto #2, classe 'Object'] {<br />
obj1:[oggetto #3] {<br />
<root />;<br />
},<br />
obj2:[oggetto #4, classe 'Date'] {Sat Sep 22 19:31:31 GMT+0200 2007},<br />
obj3:[oggetto #5, classe 'Date'] {Sat Sep 22 19:31:31 GMT+0200 2007},<br />
obj4:[oggetto #6, classe 'Object'] {<br />
d:[oggetto #7, classe 'Date'] {Sat Sep 22 19:31:31 GMT+0200 2007},<br />
c:[oggetto #8, classe 'Array'] [<br />
0:1,<br />
1:2,<br />
2:3<br />
],<br />
b:[oggetto #6, classe 'Object'],<br />
a:1<br />
},<br />
obj5:non definito<br />
}<br />
}</code><br />
they are different! (both data.obj5 and data.obj4.b changed)</p>
<p>For what I understand during my experiments it seems that flash does not write into its internal references table the XML objects while reading back the file and so next time it open the sharedobject all the references after the xml are broken or just they point to a different object.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2007/09/22/sharedobject-reader-plugin-for-fd3/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Bug in BitmapData ?</title>
		<link>https://blog.sephiroth.it/2007/05/18/bug-in-bitmapdata/</link>
					<comments>https://blog.sephiroth.it/2007/05/18/bug-in-bitmapdata/#respond</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Fri, 18 May 2007 18:21:34 +0000</pubDate>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[bitmapdata]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[getpixel32]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=218</guid>

					<description><![CDATA[<p>What happens using getPixel32 with 0x00FFFFFF ?<br /><br /> Read more here: <a target="_blank" href="http://aprogrammerdiary.com/2007/05/bug_in_bitmapdata.html ">http://aprogrammerdiary.com/../bug_in_bitmapdata.html</a></p>
]]></description>
										<content:encoded><![CDATA[<p>What happens using BitmapData <span style="font-weight: bold;">getPixel32</span> with 0x00FFFFFF ?</p>
<p>Read the full post: <a href="http://aprogrammerdiary.com/2007/05/bug_in_bitmapdata.html " target="_blank">http://aprogrammerdiary.com/../bug_in_bitmapdata.html</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2007/05/18/bug-in-bitmapdata/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Flex 2.0.1 SDK Hotfix 1 (bug fix)</title>
		<link>https://blog.sephiroth.it/2007/03/23/flex-2-0-1-sdk-hotfix-1-bug-fix/</link>
					<comments>https://blog.sephiroth.it/2007/03/23/flex-2-0-1-sdk-hotfix-1-bug-fix/#respond</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Fri, 23 Mar 2007 21:24:52 +0000</pubDate>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[hotfix]]></category>
		<category><![CDATA[sdk]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=208</guid>

					<description><![CDATA[<p>Adobe just released an update for Flex 2.0.1 SDK, download it from <a target="_blank" href="http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=kb401224">http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=kb401224</a><br /> </p><p style="font-style: italic">Flex 2.0.1 SDK hotfix 1 (build 159086) is a collection of bug fixes that have been completed since the Flex 2.0.1 release on January 5, 2007. This hotfix release is being made available to Flex customers who are experiencing any of the issues described in this document and require the provided bug fixes. Installation of this hotfix release is not recommended for customers who are not experiencing one of the described issues.</p>
]]></description>
										<content:encoded><![CDATA[<p>Adobe just released an update for Flex 2.0.1 SDK, download it from <a href="http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=kb401224" target="_blank">http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=kb401224</a></p>
<p style="font-style: italic;">Flex 2.0.1 SDK hotfix 1 (build 159086) is a collection of bug fixes that have been completed since the Flex 2.0.1 release on January 5, 2007. This hotfix release is being made available to Flex customers who are experiencing any of the issues described in this document and require the provided bug fixes. Installation of this hotfix release is not recommended for customers who are not experiencing one of the described issues.</p>
<table border="0">
<tbody>
<tr>
<th class="mceVisualAid" colspan="2" scope="col">
<div>Cell Renderers</div>
</th>
</tr>
<tr>
<td>192854</td>
<td>itemEditors on DataGrid don&#8217;t correctly commit data when dragEnable=true</td>
</tr>
<tr>
<td>192558</td>
<td>Combo renderer in a DataGrid causes problems on the DataGrid scroll</td>
</tr>
<tr>
<th class="mceVisualAid" colspan="2" scope="col">
<div>DataGrid</div>
</th>
</tr>
<tr>
<td>193316</td>
<td>DataGrid with headerRenderer and selectedIndices becomes uneditable</td>
</tr>
<tr>
<td>194284</td>
<td>DataGrid incorrectly focuses hScrollbar</td>
</tr>
<tr>
<td>194311</td>
<td>After clearing data from DataGrid, RTE occurs</td>
</tr>
<tr>
<td>183325</td>
<td>When set verticalScrollPolicy=&#8221;off&#8221; in datagrid, can&#8217;t move up/down to show more rows</td>
</tr>
<tr>
<td>192117</td>
<td>DataGrid whose width depends on the size change of Browser gets RTE</td>
</tr>
<tr>
<td>196149</td>
<td>DataGrid with lockedColumnCount incorrectly displays using vScrollbar</td>
</tr>
<tr>
<td>193106</td>
<td>Horizontal scrolling DataGrid cannot display the updated width</td>
</tr>
<tr>
<td>194972</td>
<td>DataGridColumn visibility=false doesn&#8217;t work (when set in mxml)</td>
</tr>
<tr>
<td>192466</td>
<td>The width of the last 2 columns is displayed narrower after horizontal scrolling</td>
</tr>
<tr>
<td>193641</td>
<td>If you resize the player window with a DataGrid with width=100%, the DataGrid&#8217;s last column continues to grow rather than showing more columns</td>
</tr>
<tr>
<td>192695</td>
<td>After horizontal scrolling, changing the width of DG updates the width of incorrect column</td>
</tr>
<tr>
<td>192694</td>
<td>Changing the width of DataGrid that is disappeared gets error (RTE)</td>
</tr>
<tr>
<td>192728</td>
<td>Using an itemRenderer as an editor may not update the dataProvider</td>
</tr>
<tr>
<td>195589</td>
<td>DataGrid with horizontalScrollPolicy cell and width behavior changed</td>
</tr>
<tr>
<td>193319</td>
<td>Change event doesn&#8217;t occur when moving the line using Enter and Tab key on DataGrid</td>
</tr>
<tr>
<td>195389</td>
<td>Tab key is functional even if scrollbar is focused</td>
</tr>
<tr>
<th class="mceVisualAid" colspan="2">
<div>Debugging (Macintosh only)</div>
</th>
</tr>
<tr>
<td>193086</td>
<td>Once RTE is thrown and debug session is selected to be terminated, closing browser window does not let FB release debug session</td>
</tr>
<tr>
<th class="mceVisualAid" colspan="2">
<div>Other</div>
</th>
</tr>
<tr>
<td>193354</td>
<td>CollectionChangeEventKind in CollectEvent.COLLECTION_CHANGE incorrect</td>
</tr>
<tr>
<td>192765</td>
<td>If you use MenuBar.dataDescriptor.setEnabled(&#8230;) on a top level item of a MenuBar, the item is not changed</td>
</tr>
<tr>
<td>126610</td>
<td>Binding to a static variable gives warning Unable to detect changes to &#8216;var&#8217; and does not show changes</td>
</tr>
<tr>
<td>193102</td>
<td>Parent window becomes available after close grandchild Popup</td>
</tr>
<tr>
<td>194872</td>
<td>Update PhotoViewer sample README.html file with the additional compiler arguments needed to compile</td>
</tr>
<tr>
<th class="mceVisualAid" colspan="2">
<div>Tree</div>
</th>
</tr>
<tr>
<td>192365</td>
<td>Selecting a node then collapsing its grandparent doesn&#8217;t move selection up to the grandparent</td>
</tr>
<tr>
<td>192347</td>
<td>RTE when tweening occurred while opening nodes in Tree (in Flex Explorer sample)</td>
</tr>
</tbody>
</table>
<p><strong>BTW</strong>, it seems they haven&#8217;t fixed the Nullpointer exception caused by invalid xmllists..</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2007/03/23/flex-2-0-1-sdk-hotfix-1-bug-fix/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
