{"id":2292,"date":"2013-04-05T19:22:27","date_gmt":"2013-04-05T18:22:27","guid":{"rendered":"http:\/\/t-machine.org\/?p=2292"},"modified":"2013-04-05T19:27:46","modified_gmt":"2013-04-05T18:27:46","slug":"android-dev-eclipse-wont-start-hangs-at-splash-screen-kill-mylyn","status":"publish","type":"post","link":"http:\/\/new.t-machine.org\/index.php\/2013\/04\/05\/android-dev-eclipse-wont-start-hangs-at-splash-screen-kill-mylyn\/","title":{"rendered":"Android Dev: Eclipse won&#8217;t start? Hangs at splash screen? Kill Mylyn&#8230;"},"content":{"rendered":"<p>For the last couple of months, one of our dev machines has been literally incapable of opening a simple Android project. It crashes every time, on startup, while displaying the Eclipse logo:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/t-machine.org\/wp-content\/uploads\/Screen-Shot-2013-04-05-at-14.45.54.png\" alt=\"Screen Shot 2013-04-05 at 14.45.54\" width=\"452\" height=\"302\" class=\"aligncenter size-full wp-image-2293\" srcset=\"https:\/\/t-machine.org\/wp-content\/uploads\/Screen-Shot-2013-04-05-at-14.45.54.png 452w, https:\/\/t-machine.org\/wp-content\/uploads\/Screen-Shot-2013-04-05-at-14.45.54-150x100.png 150w, https:\/\/t-machine.org\/wp-content\/uploads\/Screen-Shot-2013-04-05-at-14.45.54-300x200.png 300w\" sizes=\"(max-width: 452px) 100vw, 452px\" \/><\/p>\n<p>Re-installing everything had no effect. We tried everything, and the only thing that worked reliably was to keep deleting the project and re-synching from SVN <strong>every time we wanted to start Eclipse<\/strong><\/p>\n<p>Today I finally discovered the cause: <em>Mylyn<\/em><\/p>\n<p><!--more--><\/p>\n<h3>Mylyn?<\/h3>\n<p>This is someone&#8217;s research project that they originally implemented as an Eclipse plugin. I&#8217;ve never understood why, but after a few years they &#8211; somehow &#8211; got it &#8220;embedded&#8221; into the core Eclipse downloads at http:\/\/eclipse.org . Since then it&#8217;s often been compared to a virus, given that almost every developer I know *detests* Mylyn, has no use for it, and struggles to get rid of it (the &#8220;embedding&#8221; removed your ability to uninstall Mylyn; this was not a popular decision).<\/p>\n<p>Calling it a &#8220;virus&#8221; is (I hope!) clearly an overreaction &#8211; although it shows the depth of hatred a lot of programmers felt. But there is a word for unwanted, unneeded software that you force upon users, and prevent them from uninstalling:<\/p>\n<blockquote><p>\nMalware\n<\/p><\/blockquote>\n<p>Anyway, according to Mylyn&#8217;s supporters, the code only runs if you use it. QED if you don&#8217;t use it &#8230; it won&#8217;t *in any way* slow down or crash your Eclipse editor. O, RLY?<\/p>\n<h4>&#8230;Liars, Damned Liars, and &#8230; Mylyn supporters?<\/h4>\n<p>I&#8217;ve long suspected that most of the past 3 years of complaints &#8220;Eclipse is slow&#8221;, &#8220;Eclipse always crashes&#8221; etc are caused by Mylyn, or something similar (something added around that time). I&#8217;ve seen way too many reports of virgin Eclipse installs running very slow and crashing (as far back as 2002 Eclipse ran on old, weak machines &#8211; fast, and with no crashes &#8211; and it&#8217;s very odd for a major piece of software to actively get *worse* over time).<\/p>\n<p>(NB: many reports were from Android devs, since I work in mobile right now &#8212; I&#8217;ve since discovered that Google&#8217;s Android plugin is probably responsible for many of the crashes, since Google doesn&#8217;t seem to be testing it as rigorously as you might expect. But there were plenty of reports from people who were working on non-Android projects, so it seemed there was at least *something* wrong in the core IDE)<\/p>\n<p>I wasn&#8217;t looking to prove Mylyn as the cause &#8211; I just wanted to prove *any* cause, and be sure we&#8217;d never get this problem again in future.<\/p>\n<p>I did this by manually deleting each piece of metadata, then restarting with &#8220;-clean&#8221;, until the crash stopped (you lose lots of core, critical data this way &#8211; but it&#8217;s the fastest way to diagnose which badly-written, untested plugin is crashing your system). Mylyn&#8217;s metadata was the only set that caused the crash.<\/p>\n<p>Then I went one step further: deleting the actual libraries\/binary code for each plugin, every feature, until the crash stopped (leaving the metadata alone this time). Again: it started working as soon as Mylyn was gone.<\/p>\n<p>To check, I then reinstated everything from a backup, and this time *only* deleted Mylyn: machine worked perfectly, no crashes.<\/p>\n<h4>How to kill Mylyn with fire<\/h4>\n<p>So, it seems Mylyn is at fault, not just slowing down our development (adding pointless stuff that no-one uses), but &#8211; in this case &#8211; making an entire dev machine unusable. How do we fix this?<\/p>\n<ol>\n<li>Close all open copies of Eclipse\n<li>Find your &#8220;Eclipse app folder&#8221; (wherever the Eclipse program lives; since Eclipse has no installer (still!) it&#8217;s wherever you chose to copy the files when you installed it originally)\n<li>Burn Mylyn out of \/features\/\n<ol>\n<li>Find every sub-folder of &#8220;features&#8221; that has the word &#8220;mylyn&#8221; in it &#8211; most of them are together in alphabetical order *but some are not*\n<li>Delete the folders themselves\n<\/ol>\n<li>Burn Mylyn out of \/plugins\/\n<ol>\n<li>Find every sub-folder of &#8220;plugins&#8221; that has the word &#8220;mylyn&#8221; in it &#8211; most of them are together in alphabetical order *but some are not*\n<li>Delete the folders themselves\n<\/ol>\n<li>Re-start eclipse once per project, using the command-line option &#8221; -clean&#8221; (this means: &#8220;refresh&#8221;)\n<ol>\n<li>If you&#8217;re using OS X, this is very hard to do, and in 10 years no-one has come up with a workaround; for now, do this:\n<ol>\n<li>Open Terminal\n<li>cd \/Applications\/Eclipse\/ (or whatever you named the Eclipse folder in your drive)\n<li>cd Eclipse.app\/Contents\/MacOS\/\n<li>.\/eclipse -clean\n<\/ol>\n<li>(eclipse will run as per usual, you need to start it once per workspace, let the project open up, then close it down again)\n<\/ol>\n<\/ol>\n<h4>Screenshots<\/h4>\n<p>Sort-by-name, and most of them are easy to find and destroy:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/t-machine.org\/wp-content\/uploads\/Screen-Shot-2013-04-05-at-18.25.45.png\" alt=\"Screen Shot 2013-04-05 at 18.25.45\" width=\"795\" height=\"555\" class=\"aligncenter size-full wp-image-2294\" srcset=\"https:\/\/t-machine.org\/wp-content\/uploads\/Screen-Shot-2013-04-05-at-18.25.45.png 795w, https:\/\/t-machine.org\/wp-content\/uploads\/Screen-Shot-2013-04-05-at-18.25.45-150x104.png 150w, https:\/\/t-machine.org\/wp-content\/uploads\/Screen-Shot-2013-04-05-at-18.25.45-300x209.png 300w, https:\/\/t-machine.org\/wp-content\/uploads\/Screen-Shot-2013-04-05-at-18.25.45-624x435.png 624w\" sizes=\"(max-width: 795px) 100vw, 795px\" \/><\/p>\n<p>&#8230;but don&#8217;t forget the subtle ones (these are 3rd party projects that have Mylyn &#8220;compatibility&#8221;; if you don&#8217;t remove them, you can get errors and hangs at startups while they try to find Mylyn code they rely upon):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/t-machine.org\/wp-content\/uploads\/Screen-Shot-2013-04-05-at-18.26.38.png\" alt=\"Screen Shot 2013-04-05 at 18.26.38\" width=\"920\" height=\"505\" class=\"aligncenter size-full wp-image-2295\" srcset=\"https:\/\/t-machine.org\/wp-content\/uploads\/Screen-Shot-2013-04-05-at-18.26.38.png 920w, https:\/\/t-machine.org\/wp-content\/uploads\/Screen-Shot-2013-04-05-at-18.26.38-150x82.png 150w, https:\/\/t-machine.org\/wp-content\/uploads\/Screen-Shot-2013-04-05-at-18.26.38-300x164.png 300w, https:\/\/t-machine.org\/wp-content\/uploads\/Screen-Shot-2013-04-05-at-18.26.38-624x342.png 624w\" sizes=\"(max-width: 920px) 100vw, 920px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the last couple of months, one of our dev machines has been literally incapable of opening a simple Android project. It crashes every time, on startup, while displaying the Eclipse logo: Re-installing everything had no effect. We tried everything, and the only thing that worked reliably was to keep deleting the project and re-synching [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63,64,20],"tags":[],"_links":{"self":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/posts\/2292"}],"collection":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/comments?post=2292"}],"version-history":[{"count":2,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/posts\/2292\/revisions"}],"predecessor-version":[{"id":2297,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/posts\/2292\/revisions\/2297"}],"wp:attachment":[{"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/media?parent=2292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/categories?post=2292"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/new.t-machine.org\/index.php\/wp-json\/wp\/v2\/tags?post=2292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}