Can anybody decode this? I’m using images for buttons by overlaying the image with an iOS button. The crash occurs sporadically and randomly when the buttons are pushed. I have this code in the App.Unhandledexception Event Handler but it doesn’t work either.
Dim mynewView as New HomeView
App.CurrentScreen.Content=mynewView
If your app is shutdown by Watchdog then UnhandledException wont fire. We really need a way to symbolicate the crash log to work out where crashes occur but I dont know of a way that currently works with Xojo apps.
Thank you all. I believe it’s a watchdog shutdown. I have some threads running in the background which may be the problem. I’m reluctant to use a catch try because it may mask a coding error.
If your app takes too long to do something and the UI becomes unresponsive which can happen if you have too many threads running then Watchdog may shut you down. Another scenario that can invite Watchdog’s unwanted attention is ignoring low memory messages (i.e. not releasing some memory when this message is sent).
I think it’s good practice to use try/catch so long as you are always catching something specific and not just catching and then ignoring an error. Also write out the detail to the DebugLog at the very least and/or even your own logging system to make it easier for users to share with you.
Also using a Try / Catch doesn’t work whether it’s specific to UnhandledException or a non specific Try / Catch.
Works fine in the simulator but not on the device. Troubleshooting requires building and testing on the device but my build time is at least an hour and a half or more which when changing just one line of code shuts me down while I wait for the build. The App is at 118MB already. Any ideas on how to get the build time to a reasonable level would be appreciated.
It’s mostly code. The App uses 10 SQLite databases which are empty of data at build time. Image assets number about 20 which are smallish png files for button images.
Also, this may be a factor. My device is a 5s iPhone but I’m using the 6s simulator. The excessive build times are keeping me from trying different combinations. Two builds pretty much shut me down for the day and sometimes the build fails and then 3 hours are gone. The build stalls at “linking” whatever that means. I’m wondering if that’s the dSYM file and whether there might be a way to build without it. This App is beyond my expertise in Xcode which allows you run directly on the device as the simulator.
Mostly organization Dave. One database would need over 100 tables, very hard to keep track of, plus one of the features in the App creates databases on the fly. I tried a single database when I first started to develop the App and lost track of my tables very quickly. I believe I then embarked on the path of unintended consequences. I think one of my problems is that my database open code is in the View Open and I use
Dim mynewView as New View2
App.CurrentScreen.Content=mynewView
to change views which then opens the database over and over when I change views. This crashes the App after about 25 or so view changes depending on the size of the database. I don’t want to use a push since I want the view to appear rather than slide in. As I say, the excessive build time, prevents me from changing things around a little at a time for troubleshooting. I’ve already spent 6 months on this and would love to find a fix without redoing the whole thing but I’m afraid that may be necessary. I’m of the opinion that what is going to be required is opening the databases in in App.Open, writing all the data to variables and loading the fields in each view from the variables. What further complicates this is that I’m using custom table cells which requires writing the data to a data source for which I’m using arrays. I feel like I’m lost in the maze out of “The Shining”. If it ran on the device like it does on the simulator then it would be ready to publish. You helped me out quite a bit back when I was developing my first Windows App in RealBasic. Thanks Dave.
Werner, perhaps its time to step back and think about your process and your goals.
I have routinely worked with databases with literally 1000s of tables (not in Xojo, but the point is still valid)
not to mention that each DB connection increases overhead… that is 100 DB takes 100x more resources than 1 does… and under iOS your resource may be more constrained than on a Desktop. As a matter of fact, it is a known fact that some apps will run just fine in the Simulator, and fail on the device. The simulator has access to the full memory of the desktop which might exceed that of a real device, and the simulator can be MUCH faster than a real device (depending on the desktop and the device of course, but a 5s is not know to be a speed demon,)
And the fact that it takes 90+ minutes to build leads me to believe there are other issues at work here.
I do not use Xojo for iOS (its an immature overpriced product in my opinion), and do all my iOS work in Swift… which does have its own challenges… but that being said… I have NEVER had a build take more than a minute…
Thanks Dave. I think this is what I needed to hear, not what I wanted to hear. I’m going to rework the whole thing in manageable (and quickly buildable) modules and then combine them when all tests correctly. I would love to do this in Xcode but the learning curve at this point is daunting. I’m of an age where I don’t buy green bananas and I would like to get this to market before my kids have to finish it.
Werner… I’m 62… and always buy green bananas (I hate when they turn yellow)
and SWIFT (while different) really doesn’t have that steep a learning curve, you just have to be open-minded to that fact that it is not Xojo, Delphi, Basic but it is still “similar” in syntax…
LOL. I’ve got you beat by 5 years, but still loving to learn. Thanks for putting me on the right path. You’re living in my second favorite place. Used to lay over in San Diego all the time back when I was flying for Continental Airlines.