Is there any mechanism make Metro app crash automatically on Win8? - crash

We are developing a new Windows Store App with C# now. It is strange that the app crashed occasionally but haven't given any infomation . Now we deploy an IDE on the Surface and use it to run our code. The app crashed as the same, and the IDE didn't give any information.
So we want to know if Win8 system will kill app at some special cases ?
By the way, our all code blocks had using try-catch and we use async and await very carefully.
Most crash happend when the App access some network service.
Thank you very much!

every body!
I think there is not any systematic mechanism to make our app crash. But some bugs on the system really influence the quality of the software.
As our app, it crashed many times when using grouped GridView and when the pages enabled NavigationCachemode. After removing these features, it crashed less.

Related

Is it possible to collect info on why an app you created is crashing?

I have developed an Android app using react native.
When I run on simulator its fine, and also when I debug via USB on real device its fine.
However when I publish to Google Play store and download the app as a regular customer it sometimes crashes.
Are there any logs somewhere that I can refer to in order to identify what the issue is? Or perhaps there is something I can add to code to help identify where/why issue is occuring.
You can use log errors to do so, record the activity of user. When the app crashes, your app can ask the user to send the bug report.
Using that bug report you can understand why your app crashes.
You could also use tools like Sentry or Firebase Crashlytics with an Error Boundary
wrapping your app to report errors, allowing you to have a better understanding of the production errors by displaying the full error stack trace and a lot more.

VB & C++ application crashing without any clue

Apologies, this may not be a good question.
I have a VB based UI application running, supported by C++ modules through COM.
a month before it started to close randomly without any clue. I initially analyzed in perspective of a application crash and expected to see Dumps and Application/System event log entries. I have prior experience in application crash debugging. tried registry configurations (Like, CorporarteWerServer for application hang, LocalDumps and all that).
But no luck.
End user says they don't see any popup like "This application is not responding with options close/wait". The application just closes down without any prompts.
We have logging enabled where we intentionally close the application using exit(). So it is not closing formally.
User does not have testing environment where we can install debugging tools and monitor.
I have verified for insufficient memory and antivirus software and they are fine.
So, Is there any cases where an application can just simply close/crash without any prompts, logs, dumps ?
Please suggest if I am missing something. Also, is there any built-in windows tools to monitor ?

How to implement cron jobs in react native?

I am new to react-native and implementing simple app where app will monitor the mobile's clock time and should set some flags so as to notify user to perform some task when he starts the app.
I want to continuously monitor mobile's clock time as a background job in the react native app such that, when user opens the app and if specific time has already passed, it should set some flag to take future decision.
After some research over blogs, I found that react-native-background-task and/or background-timers can be used. But I am finding difficulty in implementing it. Can anyone help me with the implementation example for the same.
Thank you in advance.
So, from your post I'm going to assume a few things. One being you'll develop on Android as well as iOS, you just want to use a plugin (not code a module yourself).
Unfortunately, unless I'm mistaken - there's no simple answer and I'll explain.
As Android and iOS go forward they are starting to limit usage of Apps in the background, specifically Android goes into 'Doze' mode and iOS works in a similar fashion.
For Android, you'll need to consider a few things and I'll concentrate on them, as you'll need to know this before actually creating a RN app.
Doze Mode
Starting from Android 6.0 (API level 23), Android introduces two
power-saving features that extend battery life for users by managing
how apps behave when a device is not connected to a power source. Doze
reduces battery consumption by deferring background CPU and network
activity for apps when the device is unused for long periods of time.
App Standby defers background network activity for apps with which the
user has not recently interacted.
While the device is in Doze, apps' access to certain battery-intensive
resources is deferred until maintenance windows. The specific
restrictions are listed in Power Management Restrictions.
Doze and App Standby manage the behavior of all apps running on
Android 6.0 or higher, regardless whether they are specifically
targeting API level 23. To ensure the best experience for users, test
your app in Doze and App Standby modes and make any necessary
adjustments to your code. The sections below provide details.
Cruically, you'll need to note:
The system does not allow sync adapters to run.
The system does not allow JobScheduler to run.
So firstly for android, you'll (probably) need to ensure your app is in a 'whitelist'. You can check the requirements of the list here:
https://developer.android.com/training/monitoring-device-state/doze-standby
Or, you can access the maintenance window with a plugin like here:
https://github.com/transistorsoft/react-native-background-fetch
Testing
Android give you some tools to do so, mainly running:
$ adb shell dumpsys battery unplug
$ adb shell am set-inactive <packageName> true
Headless JS
You can check out headless tasks, which could suit your situation:
https://facebook.github.io/react-native/docs/headless-js-android
Caveats:
Although Android state that the operating system itself acts like documented, devices themselves can have software built in which essentially kills background processes. Nokia is one of the worst. So be aware of this.

Grouping child processes in node-webkit or atom/electron

I am doing some research into building a cross-platform desktop application using web technologies. Both node-webkit and electron/atom would be perfect for the job.
However, with it being a multi-window app, my clients aren't too keen on the vast number of processes which chromium creates (2 per window).
I've looked into passing some different command line switches, --single-process and a few others but they only seem to cause the app to crash on startup.
I then looked at node itself, the closest i got here was the process API exposes methods to set the group PID. Alas, this is unsupported on windows which is my primary target platform.
I don't know if you've ever googled "hide process from task manager", it's starting to look a bit scary and deep-webish. there must be an easier way.
Does anyone have some suggestions or maybe a different technology?
This isn't possible, sorry! The code that allows single-process in Chromium is busted and bitrotted
I've been dealing with the same issue and can confirm that as of Electron version 1.4.10 the --single-process flag is still crashing the app.
I ended up using --process-per-site. It groups the processes per web site/domain. If you are using Angular in your app (with the same index page), all Browsers will be launched with the same process.
https://www.chromium.org/developers/design-documents/process-models

How to test a cocoa touch app for the case when the network fails while downloading a file?

My iOS application, among its features, download files from a specific server. This downloading occurs entirely in the background, while the user is working on the app. When a download is complete, the resource associated with the file appears on the app screen.
My users report some misbehavior about missing resources that I could not reproduce. Some side information leads me to suspect that the problem is caused by the download of the resource's file to be aborted mid-way. Then the app has a partially downloaded file that never gets completed.
To confirm the hypothesis, to make sure any fix works, and to test for such random network vanishing under my feet, I would like to simulate the loss of the network on my test environment: the test server is web sharing on my development Mac, the test device is the iOS simulator running on the same Mac.
Is there a more convenient way to do that, than manually turning web sharing off on a breakpoint?
Depending on how you're downloading your file, one possible option would be to set the callback delegate to null halfway through the download. It would still download the data, but your application would simply stop receiving callbacks. Although, I don't know if that's how the application would function if it truly dropped the connection.
Another option would be to temporarily point the download request at some random file on an external web server, then halfway though just disconnect your computer from the internet. I've done that to test network connectivity issues and it usually works. The interesting problem in your case is that you're downloading from your own computer, so disconnecting won't help. This would just be so you can determine the order of callbacks within the application when this happens, (does it make any callbacks at all? In what order?) so that you can simulate that behavior when actually pointed to your test server.
Combine both options together, I guess, to get the best solution.