{"id":339,"date":"2017-06-23T23:28:35","date_gmt":"2017-06-23T21:28:35","guid":{"rendered":"http:\/\/www.bellingo.de\/blog\/?p=339"},"modified":"2017-06-23T23:28:35","modified_gmt":"2017-06-23T21:28:35","slug":"android-bluescreen","status":"publish","type":"post","link":"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/","title":{"rendered":"Android Bluescreen"},"content":{"rendered":"<p>Recently I reached an important milestone for my game: I asked two friends to play it with me. As usual in this case I tried to fix as many of the remaining bugs I knew so that the app would run reasonably stable. And as it always happens when time is running out, I ran into a problem that totally puzzled me. All of a sudden my app showed a bluescreen (!) on two out of three Android devices &#8211; sometimes. Wasn&#8217;t that a Windows thing?<!--more--><\/p>\n<p>Starting a search on the internet I quickly found out that this is a very old problem. Some <a href=\"https:\/\/forum.unity3d.com\/threads\/blue-screen-on-android-device.216796\/\">Unity forum entries<\/a> dating as far back as 2013 report similar problems in Unity 4.2, while I was running Unity 5.5.<\/p>\n<h3>A real bluescreen?<\/h3>\n<p>We all know bluescreens from Windows, but I am talking about Android here. Also, I was still able to close the app and return to the home screen, so this was, obviously, no system crash. Fiddling around with the camera settings in my project I found out that the blue color was just the background color of the camera component. Changing this I actually got a red or green screen.<\/p>\n<p>So why was nothing else happening? I am using a &#8222;LobbyLoader&#8220; scene as startup scene. It contains a camera and one script which proceeds by loading the lobby scene. It looked like this:<\/p>\n<pre>public class LobbyLoader : MonoBehaviour\r\n{\r\n \/\/ Load the lobby via Start\r\n void Start()\r\n {\r\n   SceneManager.LoadScene(\"Lobby\");\r\n }\r\n}<\/pre>\n<p>However, the next scene was never loaded. In order to find out what was happening I added an error log output to the Start() method and debugged it with <a href=\"https:\/\/developer.android.com\/studio\/command-line\/logcat.html\">ADB<\/a>. While the debugger does not catch the error message itself, you can still see that an error message was logged. And that&#8217;s what did <em>not<\/em> happen when the screen stayed blue. Obviously the Start() callback was not called reliably.<\/p>\n<p>This is, of course, a quite annoying problem and something you cannot really do anything about except for some workaround. My solution was to add an OnEnable() callback which does exactly the same as Start(), i.e., loading the Lobby scene.<\/p>\n<p>After struggling through this issue I remembered why I had added the LobbyLoader in the first place. Exactly because I got some weird behavior with my game not starting properly. At least I know now what was the culprit then.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I reached an important milestone for my game: I asked two friends to play it with me. As usual in this case I tried to fix as many of the remaining bugs I knew so that the app would run reasonably stable. And as it always happens when time is running out, I ran &hellip; <a href=\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/\" class=\"more-link\"><span class=\"screen-reader-text\">Android Bluescreen<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":344,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[163,49,55],"tags":[167,165,169,67],"class_list":["post-339","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","category-game-development","category-unity-en","tag-android","tag-bluescreen","tag-camera","tag-unity-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Android Bluescreen - Games:Tech:Blog<\/title>\n<meta name=\"description\" content=\"Recently, my app started showing a bluescreen on two out of three Android devices - sometimes. This old bug can be traced back to the Start() callback.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android Bluescreen - Games:Tech:Blog\" \/>\n<meta property=\"og:description\" content=\"Recently, my app started showing a bluescreen on two out of three Android devices - sometimes. This old bug can be traced back to the Start() callback.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/\" \/>\n<meta property=\"og:site_name\" content=\"Games:Tech:Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-06-23T21:28:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.bellingo.de\/blog\/wp-content\/uploads\/2017\/06\/bluescreen-e1498253042306.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"900\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ingo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ingo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/\"},\"author\":{\"name\":\"Ingo\",\"@id\":\"https:\/\/www.bellingo.de\/blog\/#\/schema\/person\/82498f8ac21d11f5948cab6d0a9807e9\"},\"headline\":\"Android Bluescreen\",\"datePublished\":\"2017-06-23T21:28:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/\"},\"wordCount\":379,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.bellingo.de\/blog\/#\/schema\/person\/82498f8ac21d11f5948cab6d0a9807e9\"},\"image\":{\"@id\":\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.bellingo.de\/blog\/wp-content\/uploads\/2017\/06\/bluescreen-e1498253042306.jpg\",\"keywords\":[\"Android\",\"Bluescreen\",\"Camera\",\"Unity\"],\"articleSection\":[\"Android\",\"Game development\",\"Unity\"],\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/\",\"url\":\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/\",\"name\":\"Android Bluescreen - Games:Tech:Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.bellingo.de\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.bellingo.de\/blog\/wp-content\/uploads\/2017\/06\/bluescreen-e1498253042306.jpg\",\"datePublished\":\"2017-06-23T21:28:35+00:00\",\"description\":\"Recently, my app started showing a bluescreen on two out of three Android devices - sometimes. This old bug can be traced back to the Start() callback.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#primaryimage\",\"url\":\"https:\/\/www.bellingo.de\/blog\/wp-content\/uploads\/2017\/06\/bluescreen-e1498253042306.jpg\",\"contentUrl\":\"https:\/\/www.bellingo.de\/blog\/wp-content\/uploads\/2017\/06\/bluescreen-e1498253042306.jpg\",\"width\":1600,\"height\":900,\"caption\":\"Android Bluescreen\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.bellingo.de\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Android Bluescreen\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.bellingo.de\/blog\/#website\",\"url\":\"https:\/\/www.bellingo.de\/blog\/\",\"name\":\"Games:Tech:Blog\",\"description\":\"A Blog about Games, Technology in Games, and Technology in General\",\"publisher\":{\"@id\":\"https:\/\/www.bellingo.de\/blog\/#\/schema\/person\/82498f8ac21d11f5948cab6d0a9807e9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.bellingo.de\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.bellingo.de\/blog\/#\/schema\/person\/82498f8ac21d11f5948cab6d0a9807e9\",\"name\":\"Ingo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/www.bellingo.de\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/93a4b9881ee1983f4fafc7e996ce82a42c3a1540c18f7417809c08a19658f167?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/93a4b9881ee1983f4fafc7e996ce82a42c3a1540c18f7417809c08a19658f167?s=96&d=mm&r=g\",\"caption\":\"Ingo\"},\"logo\":{\"@id\":\"https:\/\/www.bellingo.de\/blog\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.bellingo.de\/blog\/author\/ingo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android Bluescreen - Games:Tech:Blog","description":"Recently, my app started showing a bluescreen on two out of three Android devices - sometimes. This old bug can be traced back to the Start() callback.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/","og_locale":"de_DE","og_type":"article","og_title":"Android Bluescreen - Games:Tech:Blog","og_description":"Recently, my app started showing a bluescreen on two out of three Android devices - sometimes. This old bug can be traced back to the Start() callback.","og_url":"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/","og_site_name":"Games:Tech:Blog","article_published_time":"2017-06-23T21:28:35+00:00","og_image":[{"width":1600,"height":900,"url":"https:\/\/www.bellingo.de\/blog\/wp-content\/uploads\/2017\/06\/bluescreen-e1498253042306.jpg","type":"image\/jpeg"}],"author":"Ingo","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Ingo","Gesch\u00e4tzte Lesezeit":"2\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#article","isPartOf":{"@id":"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/"},"author":{"name":"Ingo","@id":"https:\/\/www.bellingo.de\/blog\/#\/schema\/person\/82498f8ac21d11f5948cab6d0a9807e9"},"headline":"Android Bluescreen","datePublished":"2017-06-23T21:28:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/"},"wordCount":379,"commentCount":0,"publisher":{"@id":"https:\/\/www.bellingo.de\/blog\/#\/schema\/person\/82498f8ac21d11f5948cab6d0a9807e9"},"image":{"@id":"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#primaryimage"},"thumbnailUrl":"https:\/\/www.bellingo.de\/blog\/wp-content\/uploads\/2017\/06\/bluescreen-e1498253042306.jpg","keywords":["Android","Bluescreen","Camera","Unity"],"articleSection":["Android","Game development","Unity"],"inLanguage":"de","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/","url":"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/","name":"Android Bluescreen - Games:Tech:Blog","isPartOf":{"@id":"https:\/\/www.bellingo.de\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#primaryimage"},"image":{"@id":"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#primaryimage"},"thumbnailUrl":"https:\/\/www.bellingo.de\/blog\/wp-content\/uploads\/2017\/06\/bluescreen-e1498253042306.jpg","datePublished":"2017-06-23T21:28:35+00:00","description":"Recently, my app started showing a bluescreen on two out of three Android devices - sometimes. This old bug can be traced back to the Start() callback.","breadcrumb":{"@id":"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bellingo.de\/blog\/android-bluescreen\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#primaryimage","url":"https:\/\/www.bellingo.de\/blog\/wp-content\/uploads\/2017\/06\/bluescreen-e1498253042306.jpg","contentUrl":"https:\/\/www.bellingo.de\/blog\/wp-content\/uploads\/2017\/06\/bluescreen-e1498253042306.jpg","width":1600,"height":900,"caption":"Android Bluescreen"},{"@type":"BreadcrumbList","@id":"https:\/\/www.bellingo.de\/blog\/android-bluescreen\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.bellingo.de\/blog\/"},{"@type":"ListItem","position":2,"name":"Android Bluescreen"}]},{"@type":"WebSite","@id":"https:\/\/www.bellingo.de\/blog\/#website","url":"https:\/\/www.bellingo.de\/blog\/","name":"Games:Tech:Blog","description":"A Blog about Games, Technology in Games, and Technology in General","publisher":{"@id":"https:\/\/www.bellingo.de\/blog\/#\/schema\/person\/82498f8ac21d11f5948cab6d0a9807e9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bellingo.de\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":["Person","Organization"],"@id":"https:\/\/www.bellingo.de\/blog\/#\/schema\/person\/82498f8ac21d11f5948cab6d0a9807e9","name":"Ingo","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.bellingo.de\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/93a4b9881ee1983f4fafc7e996ce82a42c3a1540c18f7417809c08a19658f167?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/93a4b9881ee1983f4fafc7e996ce82a42c3a1540c18f7417809c08a19658f167?s=96&d=mm&r=g","caption":"Ingo"},"logo":{"@id":"https:\/\/www.bellingo.de\/blog\/#\/schema\/person\/image\/"},"url":"https:\/\/www.bellingo.de\/blog\/author\/ingo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bellingo.de\/blog\/wp-json\/wp\/v2\/posts\/339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bellingo.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bellingo.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bellingo.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bellingo.de\/blog\/wp-json\/wp\/v2\/comments?post=339"}],"version-history":[{"count":4,"href":"https:\/\/www.bellingo.de\/blog\/wp-json\/wp\/v2\/posts\/339\/revisions"}],"predecessor-version":[{"id":343,"href":"https:\/\/www.bellingo.de\/blog\/wp-json\/wp\/v2\/posts\/339\/revisions\/343"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bellingo.de\/blog\/wp-json\/wp\/v2\/media\/344"}],"wp:attachment":[{"href":"https:\/\/www.bellingo.de\/blog\/wp-json\/wp\/v2\/media?parent=339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bellingo.de\/blog\/wp-json\/wp\/v2\/categories?post=339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bellingo.de\/blog\/wp-json\/wp\/v2\/tags?post=339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}