{"action":"created","issue":{"url":"https://api.github.com/repos/NativeScript/NativeScript/issues/1614","repository_url":"https://api.github.com/repos/NativeScript/NativeScript","labels_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/1614/labels{/name}","comments_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/1614/comments","events_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/1614/events","html_url":"https://github.com/NativeScript/NativeScript/issues/1614","id":135652784,"number":1614,"title":"App crashes after a while leaving it open and re-selecting it, using android","user":{"login":"rosen-vladimirov","id":8351653,"avatar_url":"https://avatars.githubusercontent.com/u/8351653?v=3","gravatar_id":"","url":"https://api.github.com/users/rosen-vladimirov","html_url":"https://github.com/rosen-vladimirov","followers_url":"https://api.github.com/users/rosen-vladimirov/followers","following_url":"https://api.github.com/users/rosen-vladimirov/following{/other_user}","gists_url":"https://api.github.com/users/rosen-vladimirov/gists{/gist_id}","starred_url":"https://api.github.com/users/rosen-vladimirov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosen-vladimirov/subscriptions","organizations_url":"https://api.github.com/users/rosen-vladimirov/orgs","repos_url":"https://api.github.com/users/rosen-vladimirov/repos","events_url":"https://api.github.com/users/rosen-vladimirov/events{/privacy}","received_events_url":"https://api.github.com/users/rosen-vladimirov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NativeScript/NativeScript/labels/2%20-%20Open","name":"2 - Open","color":"bfd4f2"},{"url":"https://api.github.com/repos/NativeScript/NativeScript/labels/Android","name":"Android","color":"c7def8"},{"url":"https://api.github.com/repos/NativeScript/NativeScript/labels/S:High","name":"S:High","color":"e11d21"},{"url":"https://api.github.com/repos/NativeScript/NativeScript/labels/T:Bug","name":"T:Bug","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"hshristov","id":5966717,"avatar_url":"https://avatars.githubusercontent.com/u/5966717?v=3","gravatar_id":"","url":"https://api.github.com/users/hshristov","html_url":"https://github.com/hshristov","followers_url":"https://api.github.com/users/hshristov/followers","following_url":"https://api.github.com/users/hshristov/following{/other_user}","gists_url":"https://api.github.com/users/hshristov/gists{/gist_id}","starred_url":"https://api.github.com/users/hshristov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hshristov/subscriptions","organizations_url":"https://api.github.com/users/hshristov/orgs","repos_url":"https://api.github.com/users/hshristov/repos","events_url":"https://api.github.com/users/hshristov/events{/privacy}","received_events_url":"https://api.github.com/users/hshristov/received_events","type":"User","site_admin":false},"milestone":null,"comments":14,"created_at":"2016-02-23T06:44:32Z","updated_at":"2016-03-19T04:15:47Z","closed_at":null,"body":"_From @Daxito on February 19, 2016 4:4_\n\nSo I just open a NS app and then I switch to other apps, then leave my cellphone alone for a while, then when I come back and try to \"bring to the front\" my App, it crashes with this error:\r\n\r\njava.lang.RuntimeException: Unable to start activity ComponentInfo{com.yyy.yy/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: \r\nCalling js method onCreate failed\r\n\r\nTypeError: Cannot read property '_onAttached' of null\r\nFile: \"/data/data/com.yyy.yy/files/app/tns_modules/ui/frame/frame.js, line: 414, column: 16\r\n\r\nStackTrace: \r\n\tFrame: function:'NativeActivity.onCreate', file:'/data/data/com.yyy.yy/files/app/tns_modules/ui/frame/frame.js', line: 414, column: 17\r\n\r\n\r\n\tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2661)\r\n\tat android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)\r\n\tat android.app.ActivityThread.access$900(ActivityThread.java:172)\r\n\tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421)\r\n\tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n\tat android.os.Looper.loop(Looper.java:145)\r\n\tat android.app.ActivityThread.main(ActivityThread.java:5835)\r\n\tat java.lang.reflect.Method.invoke(Native Method)\r\n\tat java.lang.reflect.Method.invoke(Method.java:372)\r\n\tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)\r\n\tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)\r\nCaused by: com.tns.NativeScriptException: \r\nCalling js method onCreate failed\r\n\r\nTypeError: Cannot read property '_onAttached' of null\r\nFile: \"/data/data/com.yyy.yy/files/app/tns_modules/ui/frame/frame.js, line: 414, column: 16\r\n\r\nStackTrace: \r\n\tFrame: function:'NativeActivity.onCreate', file:'/data/data/com.yyy.yy/files/app/tns_modules/ui/frame/frame.js', line: 414, column: 17\r\n\r\n\r\n\tat com.tns.Platform.callJSMethodNative(Native Method)\r\n\tat com.tns.Platform.dispatchCallJSMethodNative(Platform.java:812)\r\n\tat com.tns.Platform.callJSMethod(Platform.java:711)\r\n\tat com.tns.Platform.callJSMethod(Platform.java:690)\r\n\tat com.tns.Platform.callJSMethod(Platform.java:680)\r\n\tat com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:1574)\r\n\tat android.app.Activity.performCreate(Activity.java:6221)\r\n\tat android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)\r\n\tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2614)\r\n\t... 10 more\r\n\n\n_Copied from original issue: NativeScript/nativescript-cli#1512_"},"comment":{"url":"https://api.github.com/repos/NativeScript/NativeScript/issues/comments/198630678","html_url":"https://github.com/NativeScript/NativeScript/issues/1614#issuecomment-198630678","issue_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/1614","id":198630678,"user":{"login":"Daxito","id":16787057,"avatar_url":"https://avatars.githubusercontent.com/u/16787057?v=3","gravatar_id":"","url":"https://api.github.com/users/Daxito","html_url":"https://github.com/Daxito","followers_url":"https://api.github.com/users/Daxito/followers","following_url":"https://api.github.com/users/Daxito/following{/other_user}","gists_url":"https://api.github.com/users/Daxito/gists{/gist_id}","starred_url":"https://api.github.com/users/Daxito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Daxito/subscriptions","organizations_url":"https://api.github.com/users/Daxito/orgs","repos_url":"https://api.github.com/users/Daxito/repos","events_url":"https://api.github.com/users/Daxito/events{/privacy}","received_events_url":"https://api.github.com/users/Daxito/received_events","type":"User","site_admin":false},"created_at":"2016-03-19T04:15:47Z","updated_at":"2016-03-19T04:15:47Z","body":"@enchev @slavchev \r\nI hate to be a party pooper but Just FYI, I tested the tns android version 2.0.0-2016-03-18-282 and I still get error (Unable to start activity ... see attached \r\n[errorLog.txt](https://github.com/NativeScript/NativeScript/files/180631/errorLog.txt)).\r\nThe steps to reproduce the issue are the same:\r\n .1. In your real device, open a bunch of other apps (See attached image, I have like 18 apps open for this test, crashing app is App2 btw)\r\n![screenshot_2016-03-18-23-03-15](https://cloud.githubusercontent.com/assets/16787057/13896563/d54aa756-ed5d-11e5-9a64-57fecb18a403.png)\r\n)\r\n\r\n .2. Create new App using {N} 1.7.0 and the mentioned tns android version and run it.\r\n .3. Select other apps, like 5 or 10 before selecting your {N} test app again.\r\n .4. Select your {N} app, the app has to Resume but then it crashes.\r\n\r\nPlease let me know if you need more info, I am able to duplicate this issue very easy and it is not random."}}