<?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>soledad penadés &#187; bugs</title>
	<atom:link href="http://soledadpenades.com/tag/bugs/feed/" rel="self" type="application/rss+xml" />
	<link>http://soledadpenades.com</link>
	<description>repeat 4[fd 100 rt 90]</description>
	<lastBuildDate>Wed, 25 Apr 2012 21:10:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Distro/desktop (s)hopping, part 3: Lubuntu</title>
		<link>http://soledadpenades.com/2011/11/02/distrodesktop-shopping-part-3-lubuntu/</link>
		<comments>http://soledadpenades.com/2011/11/02/distrodesktop-shopping-part-3-lubuntu/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 16:12:34 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[intellij]]></category>
		<category><![CDATA[lubuntu]]></category>
		<category><![CDATA[lxde]]></category>
		<category><![CDATA[pcmanfm]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=3795</guid>
		<description><![CDATA[As I&#8217;m now fully embarked on my experimental setup, today I tried to kill two birds with one stone and set up a virtualised Android development environment try out yet another distribution I did something similar a couple of days ago: I created a virtual machine, installed Arch Linux on it and assembled an &#8220;on [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;m now fully embarked on my experimental setup, today I tried to kill two birds with one stone and</p>
<ol>
<li>set up a virtualised Android development environment</li>
<li>try out yet another distribution</li>
</ol>
<p>I did something similar a couple of days ago: I created a virtual machine, installed Arch Linux on it and assembled an &#8220;on demand&#8221; server with Nginx, Apache, MySQL and PHP. &#8220;On demand&#8221;, in this case, means &#8220;it&#8217;s started when I demand it to start&#8221;. It&#8217;s great because when I&#8217;m not using the computer for web development I don&#8217;t have any of these services running, plus they are completely isolated, so if I break something configuring them I don&#8217;t end up with an unusable system!<br />
<span id="more-3795"></span><br />
Encouraged by this success, I wanted to do the same with Android. The reason for using a virtual environment for Android development is that it wouldn&#8217;t &#8220;pollute&#8221; my main system with all the stuff that is needed for Android. Or in other words: the Android SDK, with the different platforms that can be used, plus the Java SDK/JRE (I don&#8217;t use Java for anything else), udev rules for mounting phones and other devices, Eclipse and/or IntelliJ IDEA, and environment variables for $JDK_PATH, etc.</p>
<p>Since the recommended distribution for Android is Ubuntu (i.e. it&#8217;s the one the official tools are tested with) I thought I would create a virtual instance of Lubuntu, which is based on LXDE, a very lightweight environment that looked like the perfect candidate to run in a virtual system.</p>
<p>However I found a huge blocker for my purposes, and several other glitches :-(</p>
<p>The <strong>huge blocker</strong> is that I have failed to configure my physical device for deploying directly to the phone from within VirtualBox. I installed the extra packages for VirtualBox in order to use USB2.0, added the filter for my phone, also added a &#8220;magic line&#8221; to /etc/fstab (in the host), and created udev rules both in the host and in the guest&#8230; but still keep getting the dreaded
<div class="syhi_block"><code>?????? Insuficient permissions</code></div>
<p> error message. Not to tell you about the number of times I attempted reloading udev rules, logging in and out, restarting in desperation&#8230; Meh!</p>
<p>On the distro test side: Lubuntu looks quite nice and lightweight, although it&#8217;s got a good share of visual oddities. For example, the installation system uses one of those mouse cursors in which the arrow points to the right instead of to the left as we&#8217;re used to.</p>
<p><img src="/imgs/2011/lubuntu.jpg" alt="Lubuntu" /></p>
<p>Once the installation finishes, a relatively familiar environment shows up. It looks like good old GNOME 2, but somehow leaner. For example, there&#8217;s only one panel, and they use Chromium instead of Firefox, and Abiword instead of LibreOffice&#8217;s Writer. Also, as with GNOME 2, odd things happen from time to time, such as when the icons decide to change themselves spontaneously to another theme, and that sort of stuff that leaves you wondering: <q>wasn&#8217;t that icon black a second ago? why is it red now?</q></p>
<p>Unfortunately it also lacks some polish that we take for granted in GNOME 2. For example, the menus have to be edited by manually creating and editing files in ~/.local/applications if I remember correctly, as there isn&#8217;t any menu editor GUI. Not a huge problem for me, but definitely not something you&#8217;ll be telling a non tech-savvy friend to do. Arranging items in the panels is also clunky: you have to edit the panel and move things around by selecting them first then clicking &#8220;up&#8221; and &#8220;down&#8221; buttons in order to rearrange them.</p>
<p>But the worst glitch I found was with the file manager, <a href="http://pcmanfm.sourceforge.net/">PCManFM</a>. I actually had experienced it before with another ArchLinux install, but I thought that had been due to a bad configuration on my side. Turns out that if you open a compressed file with file-roller (as happens when double clicking any compressed file), and then try to drag anything from the compressed file to a location in PCManFM, you get an error like follows:</p>
<p><img src="/imgs/2011/pcmanfm_error.png" alt="PCManFM error" /><br />
<small>Extraction not performed: You don&#8217;t have the right permissions to extract archives in the folder &#8220;&#8221;</small></p>
<p>And that&#8217;s it. You can&#8217;t close the dialog, as none of the buttons are responsive. You can&#8217;t close it with CTRL+W either. You can&#8217;t switch to another window. Maybe you could log in with ssh from another computer and try to kill the pcmanfm process, <em>if</em> you enabled ssh before. What you&#8217;ll probably do is reset the computer/instance, anyway. Not nice if you hadn&#8217;t saved your work.</p>
<p>Conclusion: I won&#8217;t be installing, or advising the installation of, Lubuntu on relatively underpowered computers, as the defaults seem &#8220;slightly&#8221; buggy :-P</p>
<p>Now I&#8217;ve got to install the Android SDK and company on Arch, but it shouldn&#8217;t be too hard anyway. Of course, if you know how to deploy to physical devices from a VirtualBox environment, please let me know before I completely nuke that virtual machine! :-D</p>
<p>~~~</p>
<p>Previously on this saga: <a href="http://soledadpenades.com/2011/10/23/distrodesktop-shopping-part-2-xfce/">XFCE</a>.</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=3795&amp;md5=962026af8be474890dde7d830164f62c" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2011/11/02/distrodesktop-shopping-part-3-lubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2011%2F11%2F02%2Fdistrodesktop-shopping-part-3-lubuntu%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=Distro%2Fdesktop+%28s%29hopping%2C+part+3%3A+Lubuntu&amp;amp;description=As+I%27m+now+fully+embarked+on+my+experimental+setup%2C+today+I+tried+to+kill+two+birds+with+one+stone+and%0D%0A%0D%0A%0D%0A%09set+up+a+virtualised+Android+development+environment%0D%0A%09try+out+yet+another+distribution%0D%0A%0D%0A%0D%0AI+did+something+similar+a+couple+of+days+ago%3A+I+created+a+virtual+machine%2C+installed+Arch+Linux+on+it+and+assembled+an+%22on+demand%22+server+with+Nginx%2C+Apache%2C+MySQL+and+PHP.+%22On+demand%22%2C+in+this+case%2C+means+%22it%27s+started+when+I+demand+it+to+start%22.+It%27s+great+because+when+I%27m+not+using+the+computer+for+web+development+I+don%27t+have+any+of+these+services+running%2C+plus+they+are+completely+isolated%2C+so+if+I+break+something+configuring+them+I+don%27t+end+up+with+an+unusable+system%21%0D%0A%0D%0AEncouraged+by+this+success%2C+I+wanted+to+do+the+same+with+Android.+The+reason+for+using+a+virtual+environment+for+Android+development+is+that+it+wouldn%27t+%22pollute%22+my+main+system+with+all+the+stuff+that+is+needed+for+Android.+Or+in+other+words%3A+the+Android+SDK%2C+with+the+different+platforms+that+can+be+used%2C+plus+the+Java+SDK%2FJRE+%28I+don%27t+use+Java+for+anything+else%29%2C+udev+rules+for+mounting+phones+and+other+devices%2C+Eclipse+and%2For+IntelliJ+IDEA%2C+and+environment+variables+for+%24JDK_PATH%2C+etc.%0D%0A%0D%0ASince+the+recommended+distribution+for+Android+is+Ubuntu+%28i.e.+it%27s+the+one+the+official+tools+are+tested+with%29+I+thought+I+would+create+a+virtual+instance+of+Lubuntu%2C+which+is+based+on+LXDE%2C+a+very+lightweight+environment+that+looked+like+the+perfect+candidate+to+run+in+a+virtual+system.%0D%0A%0D%0AHowever+I+found+a+huge+blocker+for+my+purposes%2C+and+several+other+glitches+%3A-%28%0D%0A%0D%0AThe+huge+blocker+is+that+I+have+failed+to+configure+my+physical+device+for+deploying+directly+to+the+phone+from+within+VirtualBox.+I+installed+the+extra+packages+for+VirtualBox+in+order+to+use+USB2.0%2C+added+the+filter+for+my+phone%2C+also+added+a+%22magic+line%22+to+%2Fetc%2Ffstab+%28in+the+host%29%2C+and+created+udev+rules+both+in+the+host+and+in+the+guest...+but+still+keep+getting+the+dreaded+%3F%3F%3F%3F%3F%3F+Insuficient+permissions+error+message.+Not+to+tell+you+about+the+number+of+times+I+attempted+reloading+udev+rules%2C+logging+in+and+out%2C+restarting+in+desperation...+Meh%21%0D%0A%0D%0AOn+the+distro+test+side%3A+Lubuntu+looks+quite+nice+and+lightweight%2C+although+it%27s+got+a+good+share+of+visual+oddities.+For+example%2C+the+installation+system+uses+one+of+those+mouse+cursors+in+which+the+arrow+points+to+the+right+instead+of+to+the+left+as+we%27re+used+to.%0D%0A%0D%0A%0D%0A%0D%0AOnce+the+installation+finishes%2C+a+relatively+familiar+environment+shows+up.+It+looks+like+good+old+GNOME+2%2C+but+somehow+leaner.+For+example%2C+there%27s+only+one+panel%2C+and+they+use+Chromium+instead+of+Firefox%2C+and+Abiword+instead+of+LibreOffice%27s+Writer.+Also%2C+as+with+GNOME+2%2C+odd+things+happen+from+time+to+time%2C+such+as+when+the+icons+decide+to+change+themselves+spontaneously+to+another+theme%2C+and+that+sort+of+stuff+that+leaves+you+wondering%3A+wasn%27t+that+icon+black+a+second+ago%3F+why+is+it+red+now%3F%0D%0A%0D%0AUnfortunately+it+also+lacks+some+polish+that+we+take+for+granted+in+GNOME+2.+For+example%2C+the+menus+have+to+be+edited+by+manually+creating+and+editing+files+in+%7E%2F.local%2Fapplications+if+I+remember+correctly%2C+as+there+isn%27t+any+menu+editor+GUI.+Not+a+huge+problem+for+me%2C+but+definitely+not+something+you%27ll+be+telling+a+non+tech-savvy+friend+to+do.+Arranging+items+in+the+panels+is+also+clunky%3A+you+have+to+edit+the+panel+and+move+things+around+by+selecting+them+first+then+clicking+%22up%22+and+%22down%22+buttons+in+order+to+rearrange+them.%0D%0A%0D%0ABut+the+worst+glitch+I+found+was+with+the+file+manager%2C+PCManFM.+I+actually+had+experienced+it+before+with+another+ArchLinux+install%2C+but+I+thought+that+had+been+due+to+a+bad+configuration+on+my+side.+Turns+out+that+if+you+open+a+compressed+file+with+file-roller+%28as+happens+when+double+clicking+any+compressed+file%29%2C+and+then+try+to+drag+anything+from+the+compressed+file+to+a+location+in+PCManFM%2C+you+get+an+error+like+follows%3A%0D%0A%0D%0A%0D%0AExtraction+not+performed%3A+You+don%27t+have+the+right+permissions+to+extract+archives+in+the+folder+%22%22%0D%0A%0D%0AAnd+that%27s+it.+You+can%27t+close+the+dialog%2C+as+none+of+the+buttons+are+responsive.+You+can%27t+close+it+with+CTRL%2BW+either.+You+can%27t+switch+to+another+window.+Maybe+you+could+log+in+with+ssh+from+another+computer+and+try+to+kill+the+pcmanfm+process%2C+if+you+enabled+ssh+before.+What+you%27ll+probably+do+is+reset+the+computer%2Finstance%2C+anyway.+Not+nice+if+you+hadn%27t+saved+your+work.%0D%0A%0D%0AConclusion%3A+I+won%27t+be+installing%2C+or+advising+the+installation+of%2C+Lubuntu+on+relatively+underpowered+computers%2C+as+the+defaults+seem+%22slightly%22+buggy+%3A-P%0D%0A%0D%0ANow+I%27ve+got+to+install+the+Android+SDK+and+company+on+Arch%2C+but+it+shouldn%27t+be+too+hard+anyway.+Of+course%2C+if+you+know+how+to+deploy+to+physical+devices+from+a+VirtualBox+environment%2C+please+let+me+know+before+I+completely+nuke+that+virtual+machine%21+%3A-D%0D%0A%0D%0A%7E%7E%7E%0D%0A%0D%0APreviously+on+this+saga%3A+XFCE.&amp;amp;tags=android%2Cbugs%2Ceclipse%2Cintellij%2Clubuntu%2Clxde%2Cpcmanfm%2Cusb%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Line spacing inconsistencies when pasting to Firefox from gedit</title>
		<link>http://soledadpenades.com/2011/08/19/line-spacing-inconsistencies-when-pasting-to-firefox-from-gedit/</link>
		<comments>http://soledadpenades.com/2011/08/19/line-spacing-inconsistencies-when-pasting-to-firefox-from-gedit/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 17:09:46 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[clipboard]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[gedit]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=3624</guid>
		<description><![CDATA[I was adding some productions to escena.org when I noticed something strange about the way the info section of the latest productions was looking. I was slightly distracted by the excitement of watching all those intros and demos that I hadn&#8217;t heard before about, so it took me a while to notice what it was [...]]]></description>
			<content:encoded><![CDATA[<p>I was adding some <a href="http://escena.org/productions/1">productions</a> to escena.org when I noticed something strange about the way the info section of the latest productions was looking. I was slightly distracted by the excitement of watching all those intros and demos that I hadn&#8217;t heard before about, so it took me a while to notice what it was exactly that &#8220;didn&#8217;t quite look right&#8221;. It was <strong>the spacing</strong>!</p>
<p>Or more exactly, <strong>the double spacing</strong> that I was <a href="http://escena.org/productions/id/114/">seeing</a>, instead of just a single line as in the original!</p>
<p>Initially willing (or expecting) to put the blame on me, I examined my back-end code first, but there is nothing dealing with double spacing or &#8220;Windows spacing&#8221; correction, such as automatically replacing <em>\r\n</em> with <em>\n</em> only.<br />
<span id="more-3624"></span><br />
I then remembered that when I developed this section a year ago I was using Chrome as my main browser, so I wondered if it was a Firefox-only error that had slipped thru back then. Therefore, I repeated my test with Chrome: opened a FILE_ID.DIZ with <a href="http://projects.gnome.org/gedit/">gedit</a>, copied the text and pasted it to the corresponding textarea. Clicked on save&#8230; and the result came out OK! Simple single line-endings were received by PHP, as one would expect.</p>
<p><q>So it&#8217;s a Firefox thing then</q>, I thought. Not so fast, it can still get more bizarre. But before I get to that, let me show you a little piece of test code I wrote to ensure nothing else was interfering in the process:</p>
<div class="syhi_block"><code><span style="color: #000000; font-weight: bold;">&lt;?php</span> <br />
<br />
<span style="color: #000088;">$txt</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$pasted_text</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_METHOD'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'POST'</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$pasted_text</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'text'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;span class=&quot;n&quot;&gt;&lt;/span&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$pasted_text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;span class=&quot;r&quot;&gt;&lt;/span&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$txt</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'You pasted this:&lt;br /&gt;&lt;pre&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/pre&gt;&lt;br /&gt;(end of your paste)'</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;!DOCTYPE HTML&gt;<br />
&lt;html&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;head&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/head&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;body&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$txt</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;form action=&quot;&quot; method=&quot;post&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;textarea name=&quot;text&quot; placeholder=&quot;PASTE SOMETHING HERE, press submit&quot; rows=&quot;20&quot; cols=&quot;80&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$pasted_text</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/textarea&gt;&lt;br /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;submit&quot; value=&quot;submit&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/form&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;style&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pre {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background: #eee;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font-family: Monaco,&quot;Andale Mono&quot;,&quot;Bitstream Mono&quot;,Courier,terminal;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font-size: 12px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; height: auto;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line-height: 1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 10px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width: auto;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; max-width: 99%;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .n {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 0 10px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background: #f00;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .r {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 0 10px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background: #0f0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/style&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/body&gt;<br />
&lt;/html&gt;</code></div>
<p><small>(you can download it <a href="https://gist.github.com/1156911">from here</a>, in case you want to test it too)</small></p>
<p>What the test code does is simply highlight <strong>&#8216;\n&#8217;</strong> characters with <strong>red</strong>, and <strong>&#8216;\r&#8217;</strong> characters with <strong>green</strong>, so I can visually see what has been added. It&#8217;s not exactly like a full-grown hex editor, but it&#8217;s more practical for testing in the browser.</p>
<p>Then, if I use the following test text <small>(please ignore the fact that some characters are garbled because of the encoding&#8211;though if you don&#8217;t understand Spanish it should all look fine to you!)</small>:</p>
<div class="syhi_block"><code>Esta es una peque€a rutina realizada en Turbo Pascal 6.0.<br />
Est  programada por motivo de una mini-competici¢n que hicimos en el area<br />
SUR.DEMOS de SurNet.<br />
Espero que os guste ;-)</code></div>
<p>When run with Firefox, I get this:</p>
<p><img src="/imgs/2011/paste_firefox.png" alt="pasting to firefox" /></p>
<p>(notice the double spacing: there are double sequences of <em>\n\r</em>s)</p>
<p>And with Chrome it&#8217;s fine:</p>
<p><img src="/imgs/2011/paste_chrome.png" alt="pasting to chrome" /></p>
<p>And here comes the fun: when I copy the text <em>from Chrome</em> and paste it in Firefox. What do you think will happen? Will it double the space when I press Submit?</p>
<p><img src="/imgs/2011/paste_firefox2.png" alt="pasting to firefox, again" /></p>
<p>No! This time it works properly! Crazy! Or what? Well, I have made more tests to try to pinpoint what&#8217;s happening.</p>
<p><strong>Test one:</strong> copy from a txt file that I created on this computer (so it&#8217;s all Linux line endings), paste into Firefox: WORKS. Paste into Chrome: WORKS.</p>
<p>Some guy reported (for <a href="http://code.google.com/p/synergy-plus/issues/detail?id=443">another</a> product) that copying <strong>from Gnome terminal</strong> or <strong>gedit</strong> to Firefox got him strange results, so I tested the Gnome terminal bit too. Works on Firefox and Chrome: no extra line endings.</p>
<p><strong>Test two:</strong> I converted the original text file from <a href="http://en.wikipedia.org/wiki/Code_page_437">Code Page 437</a> (the old MSDOS encoding) to UTF-8, and opened it with gedit, and pasted it into Firefox: DOESN&#8217;T WORK! Double line spacing again! I guess a \r is a \r is a \r, no matter what the encoding! (fortunately).</p>
<p><strong>Test three:</strong> Opened the file with GVim. Copied everything and pasted into Firefox: WORKS. Single line spacing as expected.</p>
<h3>Conclusion?</h3>
<p>Before drawing up a conclusion, I&#8217;ll summarise the facts:</p>
<ol>
<li>In all the tests that &#8220;fail&#8221;, the copy-paste <em>source</em> is gedit, and the content is a file with MS-Dos line endings.</li>
<li>It only fails with Firefox</li>
</ol>
<p>So this is what I think is happening: gedit is getting confused by the MS-Dos line endings, and &#8220;something is wrong&#8221; in the data it puts in the clipboard when I press CTRL+C. Then Firefox gets sort of crazy when it gets those &#8220;wrong&#8221; characters or whatever gedit is storing in the clipboard, and tries to correct it&#8230; but ends up adding double the required line spacing.</p>
<p>On the other hand, Chrome seems to be able to &#8220;recover&#8221; from possibly malformed data, and proceeds in the normal way we expect: <em>not</em> duplicating content.</p>
<p>However I&#8217;m not too sure about this theory. I&#8217;d like to <em>see</em> the raw clipboard contents (this time, with a proper hex editor), to find out what is in there, but I haven&#8217;t been able to find any program which does it. And I&#8217;m not sure I want to start digging X-Clipboard protocol RFC&#8217;s or whatever it is that they use for their specs in order to find out how to communicate with the daemon which is listening to CTRL+C/CTRL+V key presses.</p>
<p>Do any of you have any pointer? Any idea? (other than telling people to not to use gedit!). A server-side solution is not exactly the best idea, since although I can detect whether the user is using Firefox, I don&#8217;t have any way to detect if a text was pasted from gedit! And blindly replacing groups of \r\n\r\n with just \r\n won&#8217;t work either: what if the text file indeed contains two carriage returns?</p>
<p>Decisions, decisions!</p>
<p>Update: found a gedit <a href="https://bugzilla.gnome.org/show_bug.cgi?id=640439">bug</a> which might be related to this issue!</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=3624&amp;md5=0f6f6bbc68b312d97cf32175241ce6be" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2011/08/19/line-spacing-inconsistencies-when-pasting-to-firefox-from-gedit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2011%2F08%2F19%2Fline-spacing-inconsistencies-when-pasting-to-firefox-from-gedit%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=Line+spacing+inconsistencies+when+pasting+to+Firefox+from+gedit&amp;amp;description=I+was+adding+some+productions+to+escena.org+when+I+noticed+something+strange+about+the+way+the+info+section+of+the+latest+productions+was+looking.+I+was+slightly+distracted+by+the+excitement+of+watching+all+those+intros+and+demos+that+I+hadn%27t+heard+before+about%2C+so+it+took+me+a+while+to+notice+what+it+was+exactly+that+%22didn%27t+quite+look+right%22.+It+was+the+spacing%21%0D%0A%0D%0AOr+more+exactly%2C+the+double+spacing+that+I+was+seeing%2C+instead+of+just+a+single+line+as+in+the+original%21%0D%0A%0D%0AInitially+willing+%28or+expecting%29+to+put+the+blame+on+me%2C+I+examined+my+back-end+code+first%2C+but+there+is+nothing+dealing+with+double+spacing+or+%22Windows+spacing%22+correction%2C+such+as+automatically+replacing+%5Cr%5Cn+with+%5Cn+only.%0D%0A%0D%0AI+then+remembered+that+when+I+developed+this+section+a+year+ago+I+was+using+Chrome+as+my+main+browser%2C+so+I+wondered+if+it+was+a+Firefox-only+error+that+had+slipped+thru+back+then.+Therefore%2C+I+repeated+my+test+with+Chrome%3A+opened+a+FILE_ID.DIZ+with+gedit%2C+copied+the+text+and+pasted+it+to+the+corresponding+textarea.+Clicked+on+save...+and+the+result+came+out+OK%21+Simple+single+line-endings+were+received+by+PHP%2C+as+one+would+expect.%0D%0A%0D%0ASo+it%27s+a+Firefox+thing+then%2C+I+thought.+Not+so+fast%2C+it+can+still+get+more+bizarre.+But+before+I+get+to+that%2C+let+me+show+you+a+little+piece+of+test+code+I+wrote+to+ensure+nothing+else+was+interfering+in+the+process%3A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%09%0D%0A%09%0D%0A%09%0D%0A%09%09%0D%0A%09%09%0D%0A%09%09%0A%0D%0A%09%09%0D%0A%09%09%0D%0A%09%09%0D%0A%09%09%09pre+%7B%0D%0A%09%09%09%09background%3A+%23eee%3B%0D%0A%09%09%09%09font-family%3A+Monaco%2C%22Andale+Mono%22%2C%22Bitstream+Mono%22%2CCourier%2Cterminal%3B%0D%0A%09%09%09%09font-size%3A+12px%3B%0D%0A%09%09%09%09height%3A+auto%3B%0D%0A%09%09%09%09line-height%3A+1%3B%0D%0A%09%09%09%09padding%3A+10px%3B%0D%0A%09%09%09%09width%3A+auto%3B%0D%0A%09%09%09%09max-width%3A+99%25%3B%0D%0A%09%09%09%7D%0D%0A%09%09%09%0D%0A%09%09%09.n+%7B%0D%0A%09%09%09%09padding%3A+0+10px%3B%0D%0A%09%09%09%09background%3A+%23f00%3B%0D%0A%09%09%09%7D%0D%0A%09%09%09%0D%0A%09%09%09.r+%7B%0D%0A%09%09%09%09padding%3A+0+10px%3B%0D%0A%09%09%09%09background%3A+%230f0%3B%0D%0A%09%09%09%7D%0D%0A%09%09%09%0D%0A%09%09%0D%0A%09%0D%0A%0D%0A%0D%0A%0D%0A%28you+can+download+it+from+here%2C+in+case+you+want+to+test+it+too%29%0D%0A%0D%0AWhat+the+test+code+does+is+simply+highlight+%27%5Cn%27+characters+with+red%2C+and+%27%5Cr%27+characters+with+green%2C+so+I+can+visually+see+what+has+been+added.+It%27s+not+exactly+like+a+full-grown+hex+editor%2C+but+it%27s+more+practical+for+testing+in+the+browser.%0D%0A%0D%0AThen%2C+if+I+use+the+following+test+text+%28please+ignore+the+fact+that+some+characters+are+garbled+because+of+the+encoding--though+if+you+don%27t+understand+Spanish+it+should+all+look+fine+to+you%21%29%3A%0D%0A%0D%0A%0D%0AEsta+es+una+peque%E2%82%ACa+rutina+realizada+en+Turbo+Pascal+6.0.%0D%0AEst%C2%A0+programada+por+motivo+de+una+mini-competici%C2%A2n+que+hicimos+en+el+area%0D%0ASUR.DEMOS+de+SurNet.%0D%0AEspero+que+os+guste+%3B-%29%0D%0A%0D%0A%0D%0AWhen+run+with+Firefox%2C+I+get+this%3A%0D%0A%0D%0A%0D%0A%0D%0A%28notice+the+double+spacing%3A+there+are+double+sequences+of+%5Cn%5Crs%29%0D%0A%0D%0AAnd+with+Chrome+it%27s+fine%3A%0D%0A%0D%0A%0D%0A%0D%0AAnd+here+comes+the+fun%3A+when+I+copy+the+text+from+Chrome+and+paste+it+in+Firefox.+What+do+you+think+will+happen%3F+Will+it+double+the+space+when+I+press+Submit%3F%0D%0A%0D%0A%0D%0A%0D%0ANo%21+This+time+it+works+properly%21+Crazy%21+Or+what%3F+Well%2C+I+have+made+more+tests+to+try+to+pinpoint+what%27s+happening.%0D%0A%0D%0ATest+one%3A+copy+from+a+txt+file+that+I+created+on+this+computer+%28so+it%27s+all+Linux+line+endings%29%2C+paste+into+Firefox%3A+WORKS.+Paste+into+Chrome%3A+WORKS.%0D%0A%0D%0ASome+guy+reported+%28for+another+product%29+that+copying+from+Gnome+terminal+or+gedit+to+Firefox+got+him+strange+results%2C+so+I+tested+the+Gnome+terminal+bit+too.+Works+on+Firefox+and+Chrome%3A+no+extra+line+endings.%0D%0A%0D%0ATest+two%3A+I+converted+the+original+text+file+from+Code+Page+437+%28the+old+MSDOS+encoding%29+to+UTF-8%2C+and+opened+it+with+gedit%2C+and+pasted+it+into+Firefox%3A+DOESN%27T+WORK%21+Double+line+spacing+again%21+I+guess+a+%5Cr+is+a+%5Cr+is+a+%5Cr%2C+no+matter+what+the+encoding%21+%28fortunately%29.%0D%0A%0D%0ATest+three%3A+Opened+the+file+with+GVim.+Copied+everything+and+pasted+into+Firefox%3A+WORKS.+Single+line+spacing+as+expected.%0D%0A%0D%0AConclusion%3F%0D%0A%0D%0ABefore+drawing+up+a+conclusion%2C+I%27ll+summarise+the+facts%3A%0D%0A%0D%0A%0D%0A%09In+all+the+tests+that+%22fail%22%2C+the+copy-paste+source+is+gedit%2C+and+the+content+is+a+file+with+MS-Dos+line+endings.%0D%0A%09It+only+fails+with+Firefox%0D%0A%0D%0A%0D%0ASo+this+is+what+I+think+is+happening%3A+gedit+is+getting+confused+by+the+MS-Dos+line+endings%2C+and+%22something+is+wrong%22+in+the+data+it+puts+in+the+clipboard+when+I+press+CTRL%2BC.+Then+Firefox+gets+sort+of+crazy+when+it+gets+those+%22wrong%22+characters+or+whatever+gedit+is+storing+in+the+clipboard%2C+and+tries+to+correct+it...+but+ends+up+adding+double+the+required+line+spacing.%0D%0A%0D%0AOn+the+other+hand%2C+Chrome+seems+to+be+able+to+%22recover%22+from+possibly+malformed+data%2C+and+proceeds+in+the+normal+way+we+expect%3A+not+duplicating+content.%0D%0A%0D%0AHowever+I%27m+not+too+sure+about+this+theory.+I%27d+like+to+see+the+raw+clipboard+contents+%28this+time%2C+with+a+proper+hex+editor%29%2C+to+find+out+what+is+in+there%2C+but+I+haven%27t+been+able+to+find+any+program+which+does+it.+And+I%27m+not+sure+I+want+to+start+digging+X-Clipboard+protocol+RFC%27s+or+whatever+it+is+that+they+use+for+their+specs+in+order+to+find+out+how+to+communicate+with+the+daemon+which+is+listening+to+CTRL%2BC%2FCTRL%2BV+key+presses.%0D%0A%0D%0ADo+any+of+you+have+any+pointer%3F+Any+idea%3F+%28other+than+telling+people+to+not+to+use+gedit%21%29.+A+server-side+solution+is+not+exactly+the+best+idea%2C+since+although+I+can+detect+whether+the+user+is+using+Firefox%2C+I+don%27t+have+any+way+to+detect+if+a+text+was+pasted+from+gedit%21+And+blindly+replacing+groups+of+%5Cr%5Cn%5Cr%5Cn+with+just+%5Cr%5Cn+won%27t+work+either%3A+what+if+the+text+file+indeed+contains+two+carriage+returns%3F%0D%0A%0D%0ADecisions%2C+decisions%21%0D%0A%0D%0AUpdate%3A+found+a+gedit+bug+which+might+be+related+to+this+issue%21&amp;amp;tags=bugs%2Cchrome%2Cclipboard%2Cfirefox%2Cgedit%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Android&#8217;s SoundPool.play is broken on the Xperia PLAY</title>
		<link>http://soledadpenades.com/2011/08/11/androids-soundpool-play-is-broken-on-the-xperia-play/</link>
		<comments>http://soledadpenades.com/2011/08/11/androids-soundpool-play-is-broken-on-the-xperia-play/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 09:33:48 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[sony]]></category>
		<category><![CDATA[xperia play]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=3607</guid>
		<description><![CDATA[Whenever you try to play a sound with a rate other than 1.0f, the sound will simply not play at all on the Xperia &#8220;PLAY&#8221;. You get nothing. Not even the sound at the original 1.0 rate. Silence. Void. Vacuum. Zeroes. What an ironic, unfortunate coincidence&#8211;maybe we should retitle the phone as Xperia NOT PLAY. [...]]]></description>
			<content:encoded><![CDATA[<p>Whenever you try to play a sound with a rate other than 1.0f, <strong>the sound will simply not play at all on the Xperia &#8220;PLAY&#8221;</strong>. You get nothing. Not even the sound at the original 1.0 rate. Silence. Void. Vacuum. Zeroes.</p>
<p>What an ironic, unfortunate coincidence&#8211;maybe we should retitle the phone as Xperia <em>NOT PLAY</em>.</p>
<p>And the worst is&#8230; <strong>I don&#8217;t even know where to report it</strong>! I can&#8217;t find any Sony Ericsson bug tracker, and since I&#8217;ve tested this on other several phones and even the Galaxy Tab, and it works on them, I&#8217;m pretty sure it&#8217;s only the PLAY that decided to act silly.</p>
<p>But having in mind this was a developer phone, and probably it had many rough edges still to be polished, I thought: maybe there&#8217;s a software update and this is old news already? <strong>Yes</strong>, some <a href="http://news.softpedia.com/news/Xperia-PLAY-and-Arc-Receive-Software-Update-in-Europe-214685.shtml" rel="nofollow">sources</a> said so, it was exactly released on the 2nd of August. Excellent!<br />
<span id="more-3607"></span><br />
So I have gone to <em>Settings &#8212; About phone &#8212; Software update &#8212; Update now</em>. First it complained with a &#8220;Could not connect to network&#8221; error. Some forum searches after, I&#8217;ve found some people suggested <strong>taking out the SD and SIM cards</strong>. There wasn&#8217;t a SIM card in place anyway, so I&#8217;ve taken out the SD card too.</p>
<p>Repeated the process&#8230; and again &#8220;Could not connect to network&#8221;. Gah!</p>
<p>But then I remembered that this update was meant to be rolled first to European customers. Aha! Maybe that&#8217;s why it complains about not being able to connect to a network&#8211;<strong>it wants the GSM network to find out where I am</strong>! So maybe it&#8217;s not a problem of Wi-Fi connectivity?</p>
<p>Third attempt: I&#8217;ve re-inserted the mini SD card, and placed a SIM card too on the phone. Turns out I was right: the phone <em>did</em> find the network it was looking for, also found where I am, and then it checked for updates. </p>
<p>Unfortunately, it also decided that my phone is already using &#8220;the latest version&#8221;. Err&#8230; no, <strong>2.3.2</strong> is definitely <em>not</em> the latest version. Oh well, <em>maybe</em> it is according to Sony&#8217;s <a href="http://news.cnet.com/8301-17852_3-20060335-71.html">security standards</a>.</p>
<p>But despair not! For there&#8217;s still another way to update, using <a href="http://www.sonyericsson.com/cws/support/mobilephones/learn-more/topic/updateserviceapplication/xperia-play?cc=gb&#038;lc=en">Update service</a>, which is&#8230; a Windows-only program!?</p>
<p>No, I don&#8217;t think I&#8217;m going to install <em>that</em>. We&#8217;re past the age of installing software in our computers in order to update our phones, right? RIGHT?</p>
<p><strong>Update:</strong> I&#8217;ve filed <a href="http://code.google.com/p/android/issues/detail?id=19183">a bug</a> in Android&#8217;s bug tracker. Although I have the feeling it will be useless, but at least it will be documented&#8230; and you can even star it! Oooh!</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=3607&amp;md5=0206f8c79078896f33648b621d3a7702" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2011/08/11/androids-soundpool-play-is-broken-on-the-xperia-play/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2011%2F08%2F11%2Fandroids-soundpool-play-is-broken-on-the-xperia-play%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=Android%26%238217%3Bs+SoundPool.play+is+broken+on+the+Xperia+PLAY&amp;amp;description=Whenever+you+try+to+play+a+sound+with+a+rate+other+than+1.0f%2C+the+sound+will+simply+not+play+at+all+on+the+Xperia+%22PLAY%22.+You+get+nothing.+Not+even+the+sound+at+the+original+1.0+rate.+Silence.+Void.+Vacuum.+Zeroes.%0D%0A%0D%0AWhat+an+ironic%2C+unfortunate+coincidence--maybe+we+should+retitle+the+phone+as+Xperia+NOT+PLAY.%0D%0A%0D%0AAnd+the+worst+is...+I+don%27t+even+know+where+to+report+it%21+I+can%27t+find+any+Sony+Ericsson+bug+tracker%2C+and+since+I%27ve+tested+this+on+other+several+phones+and+even+the+Galaxy+Tab%2C+and+it+works+on+them%2C+I%27m+pretty+sure+it%27s+only+the+PLAY+that+decided+to+act+silly.%0D%0A%0D%0ABut+having+in+mind+this+was+a+developer+phone%2C+and+probably+it+had+many+rough+edges+still+to+be+polished%2C+I+thought%3A+maybe+there%27s+a+software+update+and+this+is+old+news+already%3F+Yes%2C+some+sources+said+so%2C+it+was+exactly+released+on+the+2nd+of+August.+Excellent%21+%0D%0A%0D%0ASo+I+have+gone+to+Settings+--+About+phone+--+Software+update+--+Update+now.+First+it+complained+with+a+%22Could+not+connect+to+network%22+error.+Some+forum+searches+after%2C+I%27ve+found+some+people+suggested+taking+out+the+SD+and+SIM+cards.+There+wasn%27t+a+SIM+card+in+place+anyway%2C+so+I%27ve+taken+out+the+SD+card+too.%0D%0A%0D%0ARepeated+the+process...+and+again+%22Could+not+connect+to+network%22.+Gah%21%0D%0A%0D%0ABut+then+I+remembered+that+this+update+was+meant+to+be+rolled+first+to+European+customers.+Aha%21+Maybe+that%27s+why+it+complains+about+not+being+able+to+connect+to+a+network--it+wants+the+GSM+network+to+find+out+where+I+am%21+So+maybe+it%27s+not+a+problem+of+Wi-Fi+connectivity%3F%0D%0A%0D%0AThird+attempt%3A+I%27ve+re-inserted+the+mini+SD+card%2C+and+placed+a+SIM+card+too+on+the+phone.+Turns+out+I+was+right%3A+the+phone+did+find+the+network+it+was+looking+for%2C+also+found+where+I+am%2C+and+then+it+checked+for+updates.+%0D%0A%0D%0AUnfortunately%2C+it+also+decided+that+my+phone+is+already+using+%22the+latest+version%22.+Err...+no%2C+2.3.2+is+definitely+not+the+latest+version.+Oh+well%2C+maybe+it+is+according+to+Sony%27s+security+standards.%0D%0A%0D%0ABut+despair+not%21+For+there%27s+still+another+way+to+update%2C+using+Update+service%2C+which+is...+a+Windows-only+program%21%3F%0D%0A%0D%0ANo%2C+I+don%27t+think+I%27m+going+to+install+that.+We%27re+past+the+age+of+installing+software+in+our+computers+in+order+to+update+our+phones%2C+right%3F+RIGHT%3F%0D%0A%0D%0AUpdate%3A+I%27ve+filed+a+bug+in+Android%27s+bug+tracker.+Although+I+have+the+feeling+it+will+be+useless%2C+but+at+least+it+will+be+documented...+and+you+can+even+star+it%21+Oooh%21&amp;amp;tags=android%2Cbugs%2Csony%2Cxperia+play%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Native startPreview failed on Nexus S? Check your preview size</title>
		<link>http://soledadpenades.com/2011/04/05/native-startpreview-failed-on-nexus-s-check-your-preview-size/</link>
		<comments>http://soledadpenades.com/2011/04/05/native-startpreview-failed-on-nexus-s-check-your-preview-size/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 20:58:21 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[native]]></category>
		<category><![CDATA[nerdstalgia]]></category>
		<category><![CDATA[nexus s]]></category>
		<category><![CDATA[surfaces]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=3430</guid>
		<description><![CDATA[I got several error reports for Nerdstalgia from people using Nexus S. They were something akin to this: 04-05 12:22:50.371: DEBUG/SEC_Overlay(102): overlay_createOverlay:IN w=176 h=144 format=99 04-05 12:22:50.375: DEBUG/SEC_Overlay(102): src width, height are changed [w= 176, h= 144]-&#62;[w=176, h= 144] 04-05 12:22:50.375: INFO/SEC_Overlay(102): Opened video1/fd=253/obj=006e2468/shm=251/size=4096 04-05 12:22:50.375: DEBUG/SEC_Overlay(102): dst width, height have changed [w= 16, h= [...]]]></description>
			<content:encoded><![CDATA[<p>I got several error reports for <a href="https://market.android.com/details?id=es.s013.projects.ns">Nerdstalgia</a> from people using Nexus S. They were something akin to this:</p>
<div class="syhi_block"><code>04-05 12:22:50.371: DEBUG/SEC_Overlay(102): overlay_createOverlay:IN w=176 h=144 format=99<br />
04-05 12:22:50.375: DEBUG/SEC_Overlay(102): src width, height are changed [w= 176, h= 144]-&gt;[w=176, h= 144]<br />
04-05 12:22:50.375: INFO/SEC_Overlay(102): Opened video1/fd=253/obj=006e2468/shm=251/size=4096<br />
04-05 12:22:50.375: DEBUG/SEC_Overlay(102): dst width, height have changed [w= 16, h= 1] -&gt; [w=16, h= 16]<br />
04-05 12:22:50.375: INFO/SEC_Overlay(102): Postponing Stream Enable/1/0<br />
04-05 12:22:50.375: ERROR/v4l2_utils(75): Error = Invalid argument from stream on<br />
04-05 12:22:50.375: ERROR/SEC_Overlay(75): Stream Enable Failed!/-1<br />
04-05 12:22:50.375: ERROR/CameraHardwareSec(75): ERR(virtual android::status_t android::CameraHardwareSec::setOverlay(const android::sp&lt;android::Overlay&gt;&amp;))::(mOverlay-&gt;setCrop(0, 0, 176, 144) fail<br />
04-05 12:22:50.375: ERROR/CameraService(75): mHardware-&gt;setOverlay() failed with status -2147483648<br />
04-05 12:22:50.378: DEBUG/AndroidRuntime(3875): Shutting down VM<br />
04-05 12:22:50.378: WARN/dalvikvm(3875): threadid=1: thread exiting with uncaught exception (group=0x40015560)<br />
04-05 12:22:50.378: ERROR/AndroidRuntime(3875): FATAL EXCEPTION: main<br />
&nbsp; &nbsp; &nbsp; &nbsp; java.lang.RuntimeException: startPreview failed<br />
&nbsp; &nbsp; &nbsp; &nbsp; at android.hardware.Camera.startPreview(Native Method)<br />
&nbsp; &nbsp; &nbsp; &nbsp; (and here starts my code)</code></div>
<p>So it was failing well outside my <em>domains</em>&#8211;in a <strong>native</strong> method! There wasn&#8217;t even a line number to have a look at. But was it because of something I did? I thought maybe it was because I wasn&#8217;t synchronizing things properly&#8211;so I went to make sure everything was properly initialised, nothing was done before it was due&#8230; and still it crashed.</p>
<p>Then I paid even more close attention and I noticed that the difference between &#8216;crash&#8217; and &#8216;no crash&#8217; was that before it crashed it always output a <em>mHardware-&gt;setOverlay() failed with status -2147483648</em> message</p>
<p>So since I couldn&#8217;t find any solution or pointer anywhere, I decided to have a look at the native code&#8211;that way, I could at least find out what was that <em>setOverlay() failed</em> message about.</p>
<p>It took me a bit to navigate the code, since there are lots of messages and calls going back and forward between Samsung&#8217;s specific code and Android&#8217;s core, and I&#8217;m not sure I have totally understood how it works, but it <em>seems</em> that the firmware for the Nexus S (alias <em>Samsung Crespo</em>) requires that</p>
<ul>
<li>the preview surface width is a multiple of 8 (and at least 8), and</li>
<li>the preview surface height is at least 16</li>
</ul>
<p>That is defined in the <a href="http://android.git.kernel.org/?p=device/samsung/crespo.git;a=blob;f=liboverlay/overlay.cpp;h=6220106fc8cbeb313c4aa5d5328b751abe6c9613;hb=HEAD#l984">check_fimc_dst_constraints</a> function in <a href="http://android.git.kernel.org/?p=device/samsung/crespo.git;a=blob;f=liboverlay/overlay.cpp;h=6220106fc8cbeb313c4aa5d5328b751abe6c9613;hb=HEAD">mydroid/device/samsung/crespo/liboverlay/overlay.cpp</a></p>
<p>I changed the preview size to 8&#215;16, and now the app doesn&#8217;t crash on the Nexus S, although there&#8217;s an unfortunate side effect: the preview is <em>more</em> visible than it was before &#8211;yes, it was visible. It was a 1&#215;1 sized preview, and that&#8217;s why it was failing on the Nexus S (and probably any other setup with that kind of surface size restriction). Now I need to find a way to hide it&#8230; oh wait, I found it! The answer, on the following post :P</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=3430&amp;md5=bff06ccba44570817597095a68a457a7" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2011/04/05/native-startpreview-failed-on-nexus-s-check-your-preview-size/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2011%2F04%2F05%2Fnative-startpreview-failed-on-nexus-s-check-your-preview-size%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=Native+startPreview+failed+on+Nexus+S%3F+Check+your+preview+size&amp;amp;description=I+got+several+error+reports+for+Nerdstalgia+from+people+using+Nexus+S.+They+were+something+akin+to+this%3A%0D%0A%0D%0A%0D%0A04-05+12%3A22%3A50.371%3A+DEBUG%2FSEC_Overlay%28102%29%3A+overlay_createOverlay%3AIN+w%3D176+h%3D144+format%3D99%0D%0A04-05+12%3A22%3A50.375%3A+DEBUG%2FSEC_Overlay%28102%29%3A+src+width%2C+height+are+changed+%5Bw%3D+176%2C+h%3D+144%5D-%3E%5Bw%3D176%2C+h%3D+144%5D%0D%0A04-05+12%3A22%3A50.375%3A+INFO%2FSEC_Overlay%28102%29%3A+Opened+video1%2Ffd%3D253%2Fobj%3D006e2468%2Fshm%3D251%2Fsize%3D4096%0D%0A04-05+12%3A22%3A50.375%3A+DEBUG%2FSEC_Overlay%28102%29%3A+dst+width%2C+height+have+changed+%5Bw%3D+16%2C+h%3D+1%5D+-%3E+%5Bw%3D16%2C+h%3D+16%5D%0D%0A04-05+12%3A22%3A50.375%3A+INFO%2FSEC_Overlay%28102%29%3A+Postponing+Stream+Enable%2F1%2F0%0D%0A04-05+12%3A22%3A50.375%3A+ERROR%2Fv4l2_utils%2875%29%3A+Error+%3D+Invalid+argument+from+stream+on%0D%0A04-05+12%3A22%3A50.375%3A+ERROR%2FSEC_Overlay%2875%29%3A+Stream+Enable+Failed%21%2F-1%0D%0A04-05+12%3A22%3A50.375%3A+ERROR%2FCameraHardwareSec%2875%29%3A+ERR%28virtual+android%3A%3Astatus_t+android%3A%3ACameraHardwareSec%3A%3AsetOverlay%28const+android%3A%3Asp%26%29%29%3A%3A%28mOverlay-%3EsetCrop%280%2C+0%2C+176%2C+144%29+fail%0D%0A04-05+12%3A22%3A50.375%3A+ERROR%2FCameraService%2875%29%3A+mHardware-%3EsetOverlay%28%29+failed+with+status+-2147483648%0D%0A04-05+12%3A22%3A50.378%3A+DEBUG%2FAndroidRuntime%283875%29%3A+Shutting+down+VM%0D%0A04-05+12%3A22%3A50.378%3A+WARN%2Fdalvikvm%283875%29%3A+threadid%3D1%3A+thread+exiting+with+uncaught+exception+%28group%3D0x40015560%29%0D%0A04-05+12%3A22%3A50.378%3A+ERROR%2FAndroidRuntime%283875%29%3A+FATAL+EXCEPTION%3A+main%0D%0A++++++++java.lang.RuntimeException%3A+startPreview+failed%0D%0A++++++++at+android.hardware.Camera.startPreview%28Native+Method%29%0D%0A++++++++%28and+here+starts+my+code%29%0D%0A%0D%0A%0D%0ASo+it+was+failing+well+outside+my+domains--in+a+native+method%21+There+wasn%27t+even+a+line+number+to+have+a+look+at.+But+was+it+because+of+something+I+did%3F+I+thought+maybe+it+was+because+I+wasn%27t+synchronizing+things+properly--so+I+went+to+make+sure+everything+was+properly+initialised%2C+nothing+was+done+before+it+was+due...+and+still+it+crashed.%0D%0A%0D%0AThen+I+paid+even+more+close+attention+and+I+noticed+that+the+difference+between+%27crash%27+and+%27no+crash%27+was+that+before+it+crashed+it+always+output+a+mHardware-%26gt%3BsetOverlay%28%29+failed+with+status+-2147483648+message%0D%0A%0D%0ASo+since+I+couldn%27t+find+any+solution+or+pointer+anywhere%2C+I+decided+to+have+a+look+at+the+native+code--that+way%2C+I+could+at+least+find+out+what+was+that+setOverlay%28%29+failed+message+about.%0D%0A%0D%0AIt+took+me+a+bit+to+navigate+the+code%2C+since+there+are+lots+of+messages+and+calls+going+back+and+forward+between+Samsung%27s+specific+code+and+Android%27s+core%2C+and+I%27m+not+sure+I+have+totally+understood+how+it+works%2C+but+it+seems+that+the+firmware+for+the+Nexus+S+%28alias+Samsung+Crespo%29+requires+that%0D%0A%0D%0Athe+preview+surface+width+is+a+multiple+of+8+%28and+at+least+8%29%2C+and%0D%0Athe+preview+surface+height+is+at+least+16%0D%0A%0D%0A%0D%0AThat+is+defined+in+the+check_fimc_dst_constraints+function+in+mydroid%2Fdevice%2Fsamsung%2Fcrespo%2Fliboverlay%2Foverlay.cpp%0D%0A%0D%0AI+changed+the+preview+size+to+8x16%2C+and+now+the+app+doesn%27t+crash+on+the+Nexus+S%2C+although+there%27s+an+unfortunate+side+effect%3A+the+preview+is+more+visible+than+it+was+before+--yes%2C+it+was+visible.+It+was+a+1x1+sized+preview%2C+and+that%27s+why+it+was+failing+on+the+Nexus+S+%28and+probably+any+other+setup+with+that+kind+of+surface+size+restriction%29.+Now+I+need+to+find+a+way+to+hide+it...+oh+wait%2C+I+found+it%21+The+answer%2C+on+the+following+post+%3AP&amp;amp;tags=android%2Cbugs%2Ccpp%2Cnative%2Cnerdstalgia%2Cnexus+s%2Csurfaces%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Cube Clock 1.5.2</title>
		<link>http://soledadpenades.com/2010/09/14/cube-clock-1-5-2/</link>
		<comments>http://soledadpenades.com/2010/09/14/cube-clock-1-5-2/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 09:55:51 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[60fps]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[evo 4g]]></category>
		<category><![CDATA[live wallpapers]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=2953</guid>
		<description><![CDATA[Already available in the Android Market. Introducing an even nicer, more elegant preferences panel: &#8230; which uses a bit of this*: Guess where, it&#8217;s not complicated :-) The wallpaper also works properly now in the Evo 4G (and potentially other phones using the same UI than the Evo uses). The Evo reports a really bizarre [...]]]></description>
			<content:encoded><![CDATA[<p>Already <a href="market://search?q=pname:com.sixtyfps.projects.cubeclock">available in the Android Market</a>.</p>
<p>Introducing an even <strong>nicer, more elegant preferences panel</strong>:</p>
<p><img src="/imgs/2010/cube_clock_1_5_2.png" alt="Cube Clock 1.5.2" /></p>
<p>&#8230; which uses a bit of this*:</p>
<p><img src="/imgs/2010/hypot.png" alt="Circle in square" style="width:50%; height: auto;" /><br />
<span id="more-2953"></span><br />
<em>Guess where, it&#8217;s not complicated :-)</em></p>
<p>The <strong>wallpaper also works properly now in the Evo 4G</strong> (and potentially other phones using the same UI than the Evo uses).</p>
<p>The Evo reports a really bizarre value for xOffsetStep: instead of the expectable ~0.14f (from 1.0f / 7 == horizontal number of virtual screens), it is reporting <strong>-1</strong> (how can a screen have a width of -1?).</p>
<p>This looks to me like a bug, but since it uses that revamped HTC UI I&#8217;m not sure who&#8217;s responsible for sending values to the wallpaper, whether it&#8217;s the OS or the UI. I&#8217;ve got to research this&#8230; if it&#8217;s the OS maybe I can file a bug in the usual place. I&#8217;ll let you know.</p>
<p>You can also read more about <a href="http://soledadpenades.com/2010/08/23/cube-clock-1-5/">Cube Clock 1.5</a> and prior versions.</p>
<p><small>* Somehow gratuitous drawing executed with <a href="http://inkscape.org/">Inkscape</a> &#8211;it&#8217;s ages since I did my last technical drawing and I didn&#8217;t know of a better program for it. Consequently the dimension marks are a bit wrong and everything is slightly inaccurate position-wise, but you get the point. Anyway, suggestions for more appropriate CAD programs are welcome. Specially if they also support formulas.</small></p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=2953&amp;md5=90b240c3c83b1300c9ecc3f8590f10e5" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2010/09/14/cube-clock-1-5-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2010%2F09%2F14%2Fcube-clock-1-5-2%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=Cube+Clock+1.5.2&amp;amp;description=Already+available+in+the+Android+Market.%0D%0A%0D%0AIntroducing+an+even+nicer%2C+more+elegant+preferences+panel%3A%0D%0A%0D%0A%0D%0A%0D%0A...+which+uses+a+bit+of+this%2A%3A%0D%0A%0D%0A%0D%0A%0D%0AGuess+where%2C+it%27s+not+complicated+%3A-%29%0D%0A%0D%0AThe+wallpaper+also+works+properly+now+in+the+Evo+4G+%28and+potentially+other+phones+using+the+same+UI+than+the+Evo+uses%29.%0D%0A%0D%0AThe+Evo+reports+a+really+bizarre+value+for+xOffsetStep%3A+instead+of+the+expectable+%7E0.14f+%28from+1.0f+%2F+7+%3D%3D+horizontal+number+of+virtual+screens%29%2C+it+is+reporting+-1+%28how+can+a+screen+have+a+width+of+-1%3F%29.%0D%0A%0D%0AThis+looks+to+me+like+a+bug%2C+but+since+it+uses+that+revamped+HTC+UI+I%27m+not+sure+who%27s+responsible+for+sending+values+to+the+wallpaper%2C+whether+it%27s+the+OS+or+the+UI.+I%27ve+got+to+research+this...+if+it%27s+the+OS+maybe+I+can+file+a+bug+in+the+usual+place.+I%27ll+let+you+know.%0D%0A%0D%0AYou+can+also+read+more+about+Cube+Clock+1.5+and+prior+versions.%0D%0A%0D%0A%2A+Somehow+gratuitous+drawing+executed+with+Inkscape+--it%27s+ages+since+I+did+my+last+technical+drawing+and+I+didn%27t+know+of+a+better+program+for+it.+Consequently+the+dimension+marks+are+a+bit+wrong+and+everything+is+slightly+inaccurate+position-wise%2C+but+you+get+the+point.+Anyway%2C+suggestions+for+more+appropriate+CAD+programs+are+welcome.+Specially+if+they+also+support+formulas.&amp;amp;tags=60fps%2Candroid%2Cbugs%2Cevo+4g%2Clive+wallpapers%2Cblog" type="text/html" />
	</item>
	</channel>
</rss>

