iOS Question App is now failing

Tom2525

Member
Licensed User
Longtime User
I have an app that was created a few years ago. It's been working fine and today I attempted to run a debug version and it failed. A release version failed too.

B4X:
Application_Start
Error occurred on line: 18 (Main)
Expected: UIImageView, object type: UIButton
Stack Trace: (
  CoreFoundation       <redacted> + 252
  libobjc.A.dylib      objc_exception_throw + 56
  CoreFoundation       <redacted> + 0
  Wi-Score             -[B4IObjectWrapper setObject:] + 280
  Wi-Score             -[B4ILayoutBuilder loadLayoutHelper:::::::::::] + 3312
  Wi-Score             -[B4ILayoutBuilder loadLayoutHelper:::::::::::] + 4836
  Wi-Score             -[B4ILayoutBuilder loadLayout:::] + 2028
  Wi-Score             -[B4IPanelWrapper LoadLayout::] + 204
  Wi-Score             -[b4i_main _application_start:] + 3804
  CoreFoundation       <redacted> + 144
 CoreFoundation       <redacted> + 284
 Wi-Score             +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1624
 Wi-Score             -[B4IShell runMethod:] + 448
 Wi-Score             -[B4IShell raiseEventImpl:method:args::] + 1784
 Wi-Score             -[B4IShellBI raiseEvent:event:params:] + 1408
 Wi-Score             __33-[B4I raiseUIEvent:event:params:]_block_invoke + 60
 libdispatch.dylib    <redacted> + 24
 libdispatch.dylib    <redacted> + 16
 libdispatch.dylib    <redacted> + 1012
 CoreFoundation       <redacted> + 12
 CoreFoundation       <redacted> + 2272
 CoreFoundation       CFRunLoopRunSpecific + 552
 GraphicsServices     GSEventRunModal + 100
 UIKit                UIApplicationMain + 236
 Wi-Score             main + 124
 libdyld.dylib        <redacted> + 4
)
Application_Active
Line 18 is below and I don't understand why it's failing on that line.
B4X:
  #PlistExtra:<key>NSPhotoLibraryUsageDescription</key><string>Select your photo.</string>

I haven't changed anything since the last time it compiled. I'm using 4.81 and my iPhone is 11.3.
 

RichardN

Well-Known Member
Licensed User
Longtime User
Tom.... Has there been a library update you have missed?

Do also check also that if your up-to-date library is in /Additional Libraries... that you don't have an older version that still lingers in /Libraries... that's a real gotcha!
 
Upvote 0

Tom2525

Member
Licensed User
Longtime User
Tom.... Has there been a library update you have missed?

Do also check also that if your up-to-date library is in /Additional Libraries... that you don't have an older version that still lingers in /Libraries... that's a real gotcha!
Probably an old library version. Thanks for the information.
 
Upvote 0

Tom2525

Member
Licensed User
Longtime User
Can anyone tell me if something looks incorrect?


B4i Build Server
Build server is running.
Version: 4.6
Server time: 20:07:51
Mac SSL Key
Key IP: 192.168.1.6
SSL port: 51042
h files
  • iFirebaseNotifications: 1.00
  • iCustomDialog: 1.00
  • iAdMob: 1.50
  • iXmlBuilder: 1.00
  • iEventKit: 1.00
  • iReleaseLogger: 1.00
  • iSideMenu: 1.01
  • iSVG: 1.20
  • iTableView: 1.21
  • iUI8: 1.50
  • iStringUtils: 1.00
  • iSQL: 1.50
  • iArchiver: 1.20
  • iXUI: 1.50
  • iGameView: 1.0
  • iSpeechRecognition: 1.00
  • iHUD: 1.00
  • iNFC
  • iLeadbolt: 2.00
  • iRandomAccessFile: 1.72
  • iGameCenter: 1.01
  • iHttp: 1.01
  • iStore: 1.20
  • iNet: 1.70
  • iGoogleMaps: 1.40
  • iCore: 4.80
  • iFacebook: 1.00
  • iBLE: 2.00
  • iBarcode: 1.20
  • iWebSocket: 1.10
  • iCallSubUtils
  • iXmlSax: 1.10
  • iDebug2: 1.60
  • iFirebaseAuth: 1.02
  • iMedia: 1.22
  • iFirebaseAnalytics: 1.00
  • iDesigner: 1.20
  • iDateUtils
  • iFirebaseStorage: 1.10
  • iTabStrip: 1.00
  • iCustomListView
  • iRSA: 1.0
  • iAd: 1.00
  • iEncryption: 1.02
  • iContacts: 1.00
  • iDebug: 1.60
  • iNetwork: 1.32
  • iPhone: 2.00
  • iLocation: 1.20
  • iMQTT: 1.0
  • iAnalytics: 1.0
  • iUI9: 1.0
  • iJSON: 1.0
  • iDropboxSync: 1.00
  • iHttpUtils2
a files
  • libiBLE, size=228216, modified=08/17/2017 18:02:22
  • libiDropboxSync, size=80960, modified=05/04/2017 15:19:36
  • libiHttpUtils2, size=362888, modified=08/17/2017 18:31:02
  • libiHttp, size=122656, modified=08/17/2017 18:03:04
  • libiWebSocket, size=401984, modified=01/15/2018 18:53:58
  • libiCustomDialog, size=2720512, modified=08/17/2017 18:02:32
  • libiNetwork, size=267336, modified=11/19/2017 16:13:02
  • libiLocation, size=125184, modified=08/17/2017 18:03:14
  • libiStore, size=75448, modified=08/23/2017 15:13:14
  • libiNFC, size=40424, modified=10/08/2017 20:48:28
  • libiHUD, size=291472, modified=08/17/2017 18:03:06
  • libiRandomAccessFile, size=399912, modified=08/17/2017 18:03:38
  • libiNet, size=550208, modified=10/09/2017 19:33:34
  • libiSpeechRecognition, size=168816, modified=08/17/2017 18:03:50
  • libiDebug2, size=1094272, modified=08/17/2017 19:41:24
  • libiXmlSax, size=62976, modified=08/17/2017 18:04:12
  • libiSQL, size=408088, modified=08/17/2017 18:03:54
  • libiEncryption, size=66512, modified=08/17/2017 18:02:34
  • libiUI8, size=569896, modified=11/28/2017 22:05:34
  • libiXUI, size=669264, modified=12/07/2017 15:15:54
  • libiContacts, size=142816, modified=08/17/2017 18:02:24
  • libiTableView, size=194152, modified=05/04/2017 15:19:36
  • libiDesigner, size=939304, modified=08/17/2017 18:57:22
  • libiCallSubUtils, size=126952, modified=08/17/2017 18:33:06
  • libCore, size=3799648, modified=01/09/2018 20:12:32
  • libiSVG, size=83312, modified=08/17/2017 18:56:48
  • libiTabStrip, size=1335904, modified=08/17/2017 18:56:58
  • libiAdMob, size=97288, modified=08/17/2017 18:02:14
  • libiCustomListView, size=316424, modified=08/27/2017 21:51:10
  • libiMQTT, size=1703608, modified=08/17/2017 18:03:24
  • libiFacebook, size=93392, modified=08/17/2017 18:02:40
  • libiUI9, size=107056, modified=08/17/2017 18:04:04
  • libiAd, size=39072, modified=08/17/2017 18:02:12
  • libiFirebaseAuth, size=161512, modified=08/17/2017 18:02:44
  • libiGoogleMaps, size=170512, modified=12/08/2017 13:59:56
  • libAdapterInMobi, size=1125360, modified=05/04/2017 15:19:34
  • libiAnalytics, size=39392, modified=08/17/2017 18:02:16
  • libiLeadbolt, size=21440, modified=05/04/2017 15:19:36
  • libiGameCenter, size=158080, modified=11/06/2017 11:50:46
  • libiFirebaseStorage, size=140832, modified=12/06/2017 14:57:10
  • libiJSON, size=52960, modified=08/17/2017 18:03:10
  • libiStringUtils, size=55704, modified=08/17/2017 18:03:58
  • libiBarcode, size=249056, modified=08/17/2017 18:02:20
  • libiPhone, size=326664, modified=08/17/2017 18:03:34
  • libiRSA, size=145648, modified=09/03/2017 15:01:38
  • libiGameView, size=4089072, modified=08/17/2017 18:03:00
  • libiFirebaseNotifications, size=66600, modified=08/17/2017 18:02:46
  • libiArchiver, size=463088, modified=08/17/2017 18:02:18
  • libiDateUtils, size=257440, modified=10/18/2017 16:21:58
  • libiXmlBuilder, size=151384, modified=08/17/2017 18:04:08
  • libiSideMenu, size=505920, modified=08/17/2017 18:03:44
  • libiMedia, size=259208, modified=10/25/2017 11:40:54
  • libiReleaseLogger, size=50136, modified=08/17/2017 17:03:40
  • libiEventKit, size=330256, modified=08/17/2017 18:56:26
  • libiFirebaseAnalytics, size=33880, modified=08/17/2017 18:02:42
 
Upvote 0

Tom2525

Member
Licensed User
Longtime User
Yes. In older versions of B4i the views types were not verified and in most cases resulted in other errors.

The fix is very simple. Go over the declared views and find the one that is not with the correct type.
I went over every variable. The only errors I have are:

1. Warning 9 - Unused variable
2. Warning 10 - Never assigned any value
3. Warning 32 - Library not used

There are no errors that have the wrong type. Would any of the above warnings result in not being able to compile the program?
 
Upvote 0

Tom2525

Member
Licensed User
Longtime User
There will not be any warning about it.

There is a mismatch between the view type in the layout file that you are loading and the variable type in Process_Globals.
Ok, thanks. Just a comment, perhaps it would be a good idea to raise that as some type of fault because now it's going to take some time to find out where the problem is. The app has worked well for 3 years and now it won't compile.
 
Upvote 0
Top