I seem to get a bug. When FragmentB is displayed and has been overnight and then in the morning when I open the app FragmentA is displayed first. When I hit the back-button it seems like FragmentA disapiers however underneath it it appears another FragmentA is hiding. When I try to "use" the app normally again it crashes.
My app is working like wonders otherwise when I activley use it. The only difference is when I leave my phone for a large amount of time (when I sleep)
As I said I discovered this bug when I woke up this morning and was gonna test out my app again. I've tried to recreate my actions from last night and the app works perfect :/
Any ideas?
This is likely to have something to do with Android's garbage collection. When your app is in the background and other processes are running, the garbage collection may delete your app's data or state, causing it to misbehave. This is especially true the longer the app spends running in the background.
Possible solutions:
Do you save your app's state in the savedInstanceState bundle and load it back in the onRestoreInstanceState() method?
If you think it might be an SQL error, you should save your variables so when your program resumes it can reload important values.
Some tips:
http://android-developers.blogspot.com/2009/02/track-memory-allocations.html
Related
My app is using Firebase Analytics and I believe starting in iOS 13.2 started getting the errors described here: Why I get the console warning: [Process] kill() returned unexpected error 1 when I load a WKWebView in iOS13.2?
I guess it wasn't a big deal
Since I planned for my app to go live in January, I began bigger tests in physical devices. I noticed after a while the app started to behave erratically, specially after receiving a [general] Connection to daemon was invalidated error. This doesn't occur in the simulator
Searching the internet I found a post that describes the same problem: https://forums.developer.apple.com/thread/124306
In my case, only Firebase seems to be calling WKWebView, but every time I open the UIMenuController I get the error described in the console and the app appears to be missing inputs. This is specially troublesome with UIScrollViews, which my app uses a lot. The pinch gesture seems to work at will. On an iPhone 6s, the issue isn't as noticeable, on an iPad, it's like a 50% chance the pinch gesture will work properly
Outside of removing Firebase, is there a way to mitigate this issue?
1 June 2020: The console message still persists, however, I have seemed to resolve the UIScrollView issue by deactivating delaysContentTouches, now the pinch gesture seems to work most of the time
23 October 2020 If anyone notices their app starting to behave erratically with no apparent reason I HIGHLY suggest to test it on an iOS 13 physical device if possible. Seems that Apple removed the warning from iOS 14, but testing it on iOS 13 you can pin point the exact reason after the warning appears in the console
Upon further testing, I've reduced the view down to a dead-simple UI view with a single SwiftUI TextField and the 'Connection to daemon was invalidated' still appears after I type the first character into the field. Soon thereafter the app crashes with a sigAbort. (So I don't think the reason is the UITextView wrapper I was using in the previous post). Once the invalidated message appears the app is doomed to crash, not right away but soon thereafter.
I have no idea what causes the 'invalidate' message and a Google search seems to imply that no-one else does either. Some folks appear to have made (experimental?) changes to their UI that stops the message but it appears to be impossible to determine a definite cause. (and like before it only occurs on a real phone)
Same issue without using Firebase at all. What I did: Delete build folder and compile again. Issue does not appears again.
On Xcode:
Clean the Build Folder
This will delete all of the products and intermediate files in the build folder. To clean the build folder you can use the shortcut Command+Option+Shift+K or Menu Bar → Product → Hold Option Key → Clean build Folder.
On Flutter:
Just delete build folder.
I'm currently in the process of writing an ASP.NET core application and I'm getting data from a web api and loading the information in a grid and some dropdown menus.
This all works fine, but I've noticed that sometimes when I'm debugging and I step through the functions that make requests to the api and receive the data back from it, the data just fails to load in my application. Everything seems fine while I'm debugging, and this doesn't happen when I start my application by selecting "Start Without Debugging."
I would like to specify that this only happens when I step through the code; if I run the debugger without any break points it behaves correctly. In addition this behaviour is not always observable when I step through the code, and it is more likely to happen when I take a long time.
I'd like to know if anyone knows what exactly is causing this or can point me to some reading material that would help me understand it. I'm assuming it has something to do with stalling the requests or making them time out but I obviously need to learn more about what is happening.
I have an app that uses HKWorkoutSession. This app also support background modes. It uses HealthKit only to notify user in set intervals and doesn't collect any data.
Everything works fine, if it running alone, but if a user follows the next steps:
Start native Workout app
Start my app
Go back to native Workout
Apple Workout app crashes. Does anybody have an idea why?
There is also another scenario. If user starts my app first and then native app, my app refuses to work in background.
Bug takes place on watchOS 3.
Unfortunately, you can't have two simultaneous HKWorkout sessions running at the same time. So starting a new HKWorkout session (such as on your app) ends another pre-existing HKWorkout session (such as on the native Workout app). I don't believe either app should crash if this occurs, based on personal experience. I believe the crash may have something to do with the way you are handling either the start or end of the workout session. Hope this helps! :)
I'm making app with using Xamarin.forms pcl.
Unless I use ModernHttp, my app is always deadlocked at the end.(Xamain.Forms-iOS).
It works fine for a while, but few hours later, every 'await' call does not back to its place.
This is a deadlock, isn't it?
My app has tons of http request call and it could be called at the same time sometimes.
This is very weird and serious problem for my app.
The problem is ModernHttp is out of date, which means the creator doesn't update library anymore.
Maybe because of that, I'm experienced some problem with using ModernHttp. For example, UriImageSource sometimes does not load the image from web. (Works fine with built-in HttpClient)
Any tip for me?
I'm having a simple ASP.NET application hosted on my local IIS6, under Vista.
It contains a button that when I click I execute a piece of code for recognizing the text in a WAV file (using the System.Speach.Recognition.SpeechRecognition class) and display the text in a label.
The code works great on a desktop application, and it almost works on the web one... I say almost, because if I debug, I can see that the recognizer returns the correct text from the WAV, I can see that I am finishing the handler for the button click with no error, but nothing gets displayed in my page, and the page appears like loading... it's hanging, or something... No errors, no timeout, nothing. Just loading...
I don't know if this detail helps, but in order to make the piece of code that was already working on the desktop application work on the web application, I had to set the identity of the ApplicationPool of my application to LocalSystem (security breach, I know). Otherwise, I would have received a Access Denied error (0x80070005(E_ACCESSDENIED)).
Do you have any ideea why the call hangs like that? I'm fighting with this for more than two days, time pressures me, and I have no clue... Any help is really welcomed!
Thanks!
After another one week of stuglles, I found an overcome to the problem. I'm posting this just so other that might have this problem find the solution faster.
The solution was to call the method for making the speech recognition on a different thread. I think this forced the release of all resources in that thread after the recognition ended.
I cannot make any sense why this even happened on the first place (I used using blocks and I closed and disposed all the object in all the imagining ways), but I suspected to be a memory release problem...
Anyway, a very simple call on another thread fix it!