iOS Question B4i reinstall causes compilation errors

Erel

Administrator
Staff member
Licensed User
Updated Xcode to Version 10.2 (latest)
I recommend you to use Xcode 10.1 for now.

If the simulator doesn't work then it means that the issues are not related to the certificates and other keys.

Compare your "test" page results with: http://builder1.b4x.com:51041/test

Especially check the date and size of libiDebug2.
 

JohnCLB

Member
Licensed User
Hi, Sorry about the delay, couldn’t be helped.

The update for Xcode came through the day of the post. I'm not sure how to downgrade it.

I did what you suggested and compared the outputs of the ‘test’ command to the two builders and was very surprised how different the outputs were considering they were both version 5.5, many changed libraries and lots of new ones. Taking libiDebug2 as an example my builder had:

libiDebug2, size=1124736, modified=12/13/2018 12:18:10

whilst your builder had several versions:

libiDebug2, size=1097984, modified=01/08/2019 21:29:04
libiDebug2_v8, size=1094272, modified=08/17/2017 14:41:24
libiDebug2_v9, size=1128136, modified=05/10/2018 14:43:36

So mine is about a month older than yours. My builder was built from the link in the email “B4i v5.50 is available for download” in January.

I remembered I had another MacBook available that never had B4X on it but did have Xcode so I loaded and ran the builder on that. I saw exactly the same results as I had seen previously on my normal MacBook Pro. Interestingly, after running the builder, it also developed the same problems of losing Google and iCloud passwords, something that had never happened before. Curious.

John.
 

Erel

Administrator
Staff member
Licensed User
Interestingly, after running the builder, it also developed the same problems of losing Google and iCloud passwords, something that had never happened before. Curious.
This happens because the builder adds its own default keychain account.

libiDebug2, size=1124736, modified=12/13/2018 12:18:10
This is fine.

Start a new empty project and run it on the simulator in debug mode. Does it crash? Do you see anything in the logs?
 

JohnCLB

Member
Licensed User
OK, done that (called MTProject) and it crashes. I have attached the simulator log but the salient lines (from the first mention of MTProject) are:

Apr 5 17:19:33 WhiteMacBook MTProject[6413]: assertion failed: 17C88 15C107: libxpc.dylib + 72226 [EE650BC3-0539-32F0-9205-ECF6755E856F]: 0x7d
Apr 5 17:19:40 WhiteMacBook com.apple.CoreSimulator.SimDevice.504F0656-E79B-42F4-B15C-227A2804F38B[6182] (com.apple.AnnotationKit.MigratorService): Unknown key for Boolean: EnableTransactions
Apr 5 17:19:40 WhiteMacBook com.apple.CoreSimulator.SimDevice.504F0656-E79B-42F4-B15C-227A2804F38B[6182] (com.apple.AnnotationKit.MigratorService): Unknown key for Boolean: EnablePressuredExit
Apr 5 17:19:41 WhiteMacBook com.apple.CoreSimulator.SimDevice.504F0656-E79B-42F4-B15C-227A2804F38B[6182] (com.apple.Safari.History): Unknown key for Boolean: EnableTransactions
Apr 5 17:19:41 WhiteMacBook com.apple.CoreSimulator.SimDevice.504F0656-E79B-42F4-B15C-227A2804F38B[6182] (com.apple.Safari.History): Unknown key for Boolean: EnablePressuredExit
Apr 5 17:19:41 WhiteMacBook com.apple.CoreSimulator.SimDevice.504F0656-E79B-42F4-B15C-227A2804F38B[6182] (com.apple.Safari.ImageDecoder): Unknown key for Boolean: EnableTransactions
Apr 5 17:19:41 WhiteMacBook com.apple.CoreSimulator.SimDevice.504F0656-E79B-42F4-B15C-227A2804F38B[6182] (com.apple.Safari.ImageDecoder): Unknown key for Boolean: EnablePressuredExit
Apr 5 17:19:41 WhiteMacBook com.apple.CoreSimulator.SimDevice.504F0656-E79B-42F4-B15C-227A2804F38B[6182] (com.apple.avkit.SharedPreferences): Unknown key for Boolean: EnableTransactions
Apr 5 17:19:41 WhiteMacBook com.apple.CoreSimulator.SimDevice.504F0656-E79B-42F4-B15C-227A2804F38B[6182] (com.apple.avkit.SharedPreferences): Unknown key for Boolean: EnablePressuredExit
Apr 5 17:19:41 WhiteMacBook assistant_service[6292]: objc[6292]: Class CKEntity is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/CoreKnowledge.framework/CoreKnowledge (0x112c06220) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/ChatKit.framework/ChatKit (0x1242004f0). One of the two will be used. Which one is undefined.
Apr 5 17:21:15 WhiteMacBook MTProject[6464]: assertion failed: 17C88 15C107: libxpc.dylib + 72226 [EE650BC3-0539-32F0-9205-ECF6755E856F]: 0x7d
Apr 5 17:21:16 WhiteMacBook com.apple.CoreSimulator.SimDevice.504F0656-E79B-42F4-B15C-227A2804F38B[6182] (UIKitApplication:com.braziersystems.MTProject[0x570][6208][6464]): Service exited due to signal: Segmentation fault: 11 sent by exc handler[0]

so death by Segmentation violation.
 

Attachments

JohnCLB

Member
Licensed User
I'll certainly give it a go but have never actually used Xcode, I have just used it for compiling B4i projects. Do you know if there are any tips/tutorials/etc. for getting at a B4i project from Xcode and building it manually?
 

JohnCLB

Member
Licensed User
Sorry to have disappeared for so long but I was pulled off to fix another project!

I am back on this now and still banging my head against a wall. I have two MacBooks both with Xcode and the Buildserver on them and both create apps which work fine if built as a Release App but crash with a Signal 11 in debug mode. It doesn’t seem to matter if the app is installed on my iPhone or the Simulator, the result is the same. The application code is irrelevant, it happens with any app including the empty app created with 'New'. This has only happened since I lost (and had to rebuild) the Windows 7 Vmware virtual machine that hosts B4i. Before that, B4i worked fine.

Please correct me if I am wrong but I guess there are two basic differences between debug and release versions namely:

  • The debug version is linked with a debug library
  • At app startup, the Debug code tries to contact the IDE before it does anything

Since it all used to work before, I am starting to think that it is the communication between the debugged app and the IDE that is causing the crash. The only thing against that is that it when I used the hosted builder via a temporary id, the problem went away.

My question therefore is: Who actually installs the app onto the device, is it the IDE or is it the buildserver? Also, is the buildserver involved in the debug communication?

John.
 

Erel

Administrator
Staff member
Licensed User
Who actually installs the app onto the device, is it the IDE or is it the buildserver?
B4i-Bridge starts the installation process. You can also start the installation yourself by opening the same url you used to install B4i-Bridge. It will not change anything.
Also, is the buildserver involved in the debug communication?
No. The IDE starts a Java process that connects to the debug app. It also connects directly for the logs.
 

JohnCLB

Member
Licensed User
In the intervening time, I have built a real PC and loaded Windows 7 and B4i on it and I get the same effects. I now have 3 PCs, 2 virtual and 1 real all with B4i on them and 2 MacBooks with B4iBuilder on them. In addition I test apps on both the simulator(s) and my iPhone SE. All combinations only let me build/run Release apps, Debug apps always crash except when I had a temporary licence for the hosted builder service which worked fine. I have also rebuilt the B4iBridge several times. The communication between the IDE and BriBridge seems to be ok and also mirrors changes made in the Designer.

The only thing I can think of is that there is a mismatch between the B4i IDE and the B4iBuilder. Would it be possible to send me a link to a ‘matched pair’ of IDE and Builder which is known to work.

Not having any debug and log facilities makes app development really tedius.

John.
 

JohnCLB

Member
Licensed User
Very many thanks for that. It is so nice to have the debug/log again. I will let you know when I finally crack it!
 
Top