iOS Question My App with no changes is now crashing when recompiled

Turbo3

Active Member
Licensed User
Longtime User
My app, which is in TestFlight, needed to be refreshed because the test time expired. I updated the version number and recompiled and first got an iOS message about it no longer running on iOS 11. I was using B4i version 4.00 so I updated to 4.30 Beta #2 and it now crashes. Ran it in debug mode and get the following error.

"Expected: UILabel, object type: UITextView"

on this line of code:

Page0.RootPanel.LoadLayout("Console")

What is going on? How to fix this?

I went into Designer on each of my layouts and saved each one again thinking that the format might have changed a little so saving again might fix the problem. But it did not.

Here is the code around the failing line which is in Application_Start. As you can see the same line of code setting up my Help and Monitor pages did not get any errors only when it got to the third page did it fail.

B4X:
    PageHelp.Initialize("PageHelp")
'    PageHelp.Title = "Help"
    PageHelp.RootPanel.Color = Colors.White
    PageHelp.RootPanel.LoadLayout("Help")

    PageM.Initialize("PageM")
'    PageM.Title = "Console"
    PageM.RootPanel.Color = Colors.White
    PageM.RootPanel.LoadLayout("Monitor")


    Page0.Initialize("Page0")
'    Page0.Title = "Console"
    Page0.RootPanel.Color = Colors.White
    Page0.RootPanel.LoadLayout("Console")

    Page1.Initialize("Page1")
'    Page1.Title = "Graph"
    Page1.RootPanel.Color = Colors.White
    Page1.RootPanel.LoadLayout("Graph")
 
Last edited:

Turbo3

Active Member
Licensed User
Longtime User
Which line of code is it pointing to? I though it was 880.

Ok, I see it now. I was looking at the wrong line.
 
Upvote 0

Turbo3

Active Member
Licensed User
Longtime User
Erel, I just check versions of my code from a year ago and the same mismatch of Label and Textview has been there all along and never caused a problem until now.

Why is that?
 
Upvote 0

Turbo3

Active Member
Licensed User
Longtime User
My apps have been released on iTunes for years with this mismatch and ran just fine.

But it is good to get it fixed even if it was not causing iOS a problem.
 
Upvote 0
Top