[TIMOB-20197] Windows: Phone App crashes after Splash Screen
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-02-05T14:16:58.000+0000 |
Affected Version/s | Release 5.1.0 |
Fix Version/s | Release 5.2.0 |
Components | Windows |
Labels | app, crash, windows |
Reporter | Parmeet Singh |
Assignee | Kota Iguchi |
Created | 2016-01-05T08:28:48.000+0000 |
Updated | 2017-03-31T22:09:53.000+0000 |
Description
I am trying to run my Windows Phone app on my windows device Lumia 535 and Lumia 532
but as I run, it always gets crashed after splash screen and in console it gives error as :
"Timed out after 60000 milliseconds waiting to launch the device." on both devices.
I am calling multiple API's on my app and same code is working fine with Android and IOS.
Please help.
Is there any log output shown while it's attempting to launch the app? Have you tried a simple app that just displays a window/view with a label to confirm you can get a basic app launched? Maybe the app is doing lots of work on startup, or needs to delay work until after the app has launched/UI come up?
Hi Chris, In console it only gives Timeout error. I have tried simple hello world apps which were working fine, but as I add apps with some functionalities like calling API's it crashes immediately. My Home screen is simple with some text and a Button. How can we delay the work?
Move the logic that takes a long time into a function that gets called via setTimeout, or on some other event callback mechanism later (after the UI has gotten setup).
[~paramsb] Could you paste a simple sample code that reproduces this issue? I'd like to see if it works for my device (Lumia 630).
I was able to reproduce this issue. Looking into details...
Here's an analysis from my debug dump using [WinDbg.exe](http://blogs.msdn.com/b/stephe/archive/2015/03/30/how-to-make-use-of-crash-dumps-available-on-the-store-dev-portal.aspx). It reports
ERROR_CODE: 0xc0000194 - Possible deadlock condition
at application startup.Still in progress but I saw that [Application Verifier](https://msdn.microsoft.com/en-us/library/windows/hardware/ff538115%28v=vs.85%29.aspx) for Windows Phone reports heap corruption that causes bad allocation.
Hi guys, any news on this? We'd like to release app for our client asap. I don't need GA update, just updated SDK that can run app on Windows Phone device. Thank you
According to the report from the [Application Verifier](https://msdn.microsoft.com/en-us/library/windows/hardware/ff538115%28v=vs.85%29.aspx) , "out of memory" error causes crash. I've been trying to reduce memory consumption (TIMOB-20256) but the crash still happens for my Lumia 630. For me rather bigger app (I tried the [Movies app](https://github.com/appcelerator/movies)) crashes but simpler app doesn't. Interestingly it only occurs on Windows Phone 8.1, it runs well on Windows 10 Mobile phones.
I was able to fix this locally. It was a combination of memory consumption and also JavaScriptCore configuration. Still testing but I feel positive about this.
Hi Kota, thank you for your positive updates, I hope that appcelerator release updated SDK asap, so I can release my client's app(my client is kind of nervous...) Is there any time frame when it will be released to public? I install v6.0 SDK on daily basis, so please include this fix as soon as you can and let me know. Thank you
Merged to master and 5_2_X branches
Hi Chris, I tried to install Ti SDK 6.0.0.v20160208111400(from this link: http://builds.appcelerator.com.s3.amazonaws.com/index.html#master), but app keeps crashing. Can you please advice me how to fix this? Thank you.
Hmm. It should have significant memory reduction than before, and I saw it's fixed for me. [~max87], what kind of device are you using, and which version of Windows Phone? It would be awesome if there's simple sample program that reproduce this issue.
Hi Kota, I'm using Nokia Lumia 630, Windows Phone 8.1 v8.10.14219.341 I've tried to create new example app and it worked, so I copied source files from my client's project and run and it crashed. I'm trying to comment all code and uncomment after successfull run to see where the problem is. Strange is, that when I build exactly same code with 5.2.0 SDK, it runs without any problems. Thanks Edit: after many build/crash/comment code/build again my app keeps crashing with message: [INFO] : Waiting for app to connect to log relay When I comment part of code(it's not important which part, mostly createWindow/createView/require) app runs normally(but does nothing because main logic is commented).
Interesting...thanks for the information. From what I saw, I also suspect that the _elapsed time_ that's required at startup matters. I mean when it takes time to startup the app, Windows tries to stop it. It's not specific to Titanium but Windows Phone apps generally. I would suggest reducing number of files that's required at startup, try to read the logic "on demand" (For example use
require
only at the time when it's required), which should reduce loading time at startup.I rewrite parts of code and move require() to methods on demand. I have new problem - I had problem with JSON parsing, I solved it but now that problem is back. I read list of news fromweb via xhr and another xhr is for detail of news. When server send me detail data app crashes because JSON.parse can't parse that objekt - I tried JSON validator and output from server is valid JSON. I use same API and logic on Android/iOS version of app and there it's working fine. Can you please help me with this? Thank you
Would you create new ticket for it with a sample code that reproduces the issue?
Hi Kota, I wrote private email to you about this, please look at it and let me know. Thank you.
Why don't you create new JIRA ticket for it other than sending private email? Sounds like a issue in JSON with UTF-8 strings.
Hi Kota, I wrote to you private email, because I wanted to keep private data. I discovered, that when I build against 5.2.0 SDK, everything runs fine, but 6.0 has that problem with JSON. Thanks
Closing ticket as fixed, if there are any problems, please file a new ticket.