Using Xcode 10, when I stop my app using a breakpoint and try to print the content of an object in the Console, I obtain:
"Couldn't IRGen expression, no additional error"
However, I can see the value of the object in the Variables View panel.
How can I make it evaluate my expression instead?
In lldb as a workaround you can use:
fr v productVersion
fr v productBuild
since Xcode 10.2
v productVersion
v productBuild
which prints local variable type and address from current call stack frame.
Apple documentation for these kind of lldb capabilities: https://developer.apple.com/library/archive/documentation/General/Conceptual/lldb-guide/chapters/C5-Examining-The-Call-Stack.html
UPDATE:
Another trick that seems to help is to set
Thanks.
I solved with rebuild carthage framework like imtx.me/archives/2719.html
carthage update --platform iOS --no-use-binaries
I had defined as build system: "Legacy Build System", I changed it to "New Build System", then I build the project, and then I put it back as "Legacy Build System" and it worked again.
For to change the build mode: File->Workspace settings...->Build System
For my colleague, carthage update --platform iOS --no-use-binaries was working but it was not for me. When I removed the Carthage folder and reran the command, the po command started working 🎉. I'm not sure if it's related but I'm on macOS Catalina 10.15.3 and he is on Mojave. We both have Carthage version 0.34.0.
My env: Xcode 11.6 and Xcode 12 Beta 6, carthage 0.34.0
In my case, my company wants me to make build of our app out of Xcode 12 beta and see what's broken. I did it and encounter another bug that crippled the carthage. I fixed it by following this answer in the same thread.
Then I switched back to Xcode 11.6, the error started to appear
error: Couldn't IRGen expression, no additional error
The variable inspector works normally but debug console is useless without print or po. It took me some time to search in SO before I realized this might be related to carthage. Then I updated all my dependencies using the following command
carthage bootstrap --platform iOS --no-use-binaries --cache-builds
Then the debug resume normal and I can use print/po again
Related
I've inherited a project that builds with Carthage. Using Xcode 12, I was faced with this error:
fatal error: /Applications/Xcode_12.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /Users/runner/Library/Caches/org.carthage.CarthageKit/DerivedData/12.3_12C33/AEXML/4.6.0/Build/Intermediates.noindex/ArchiveIntermediates/AEXML iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AEXML.framework/AEXML and /Users/runner/Library/Caches/org.carthage.CarthageKit/DerivedData/12.3_12C33/AEXML/4.6.0/Build/Products/Release-iphonesimulator/AEXML.framework/AEXML have the same architectures (arm64) and can't be in the same fat output file
Building universal frameworks with common architectures is not possible. The device and simulator slices for "AEXML" both build for: arm64
Rebuild with --use-xcframeworks to create an xcframework bundle instead.
Quick Google search brought me to this which works for my local machine.
Using AppCenter for the first time, I created a Pre-Build script with the following:
#!/usr/bin/env bash
# Pre-build
# See: https://learn.microsoft.com/en-us/appcenter/build/custom/scripts/#pre-build
echo "Pre-build has started."
sh ./carthage.sh update --use-submodules
echo "Pre-build has ended."
I assume Carthage should be used to build this? I get the error in AppCenter:
*** Building scheme "AEXML iOS" in AEXML.xcodeproj
A shell task (/usr/bin/xcrun lipo -create /Users/runner/Library/Caches/org.carthage.CarthageKit/DerivedData/12.3_12C33/AEXML/4.6.0/Build/Intermediates.noindex/ArchiveIntermediates/AEXML\ iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AEXML.framework/AEXML /Users/runner/Library/Caches/org.carthage.CarthageKit/DerivedData/12.3_12C33/AEXML/4.6.0/Build/Products/Release-iphonesimulator/AEXML.framework/AEXML -output /Users/runner/work/1/s/Carthage/Build/iOS/AEXML.framework/AEXML) failed with exit code 1:
fatal error: /Applications/Xcode_12.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /Users/runner/Library/Caches/org.carthage.CarthageKit/DerivedData/12.3_12C33/AEXML/4.6.0/Build/Intermediates.noindex/ArchiveIntermediates/AEXML iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AEXML.framework/AEXML and /Users/runner/Library/Caches/org.carthage.CarthageKit/DerivedData/12.3_12C33/AEXML/4.6.0/Build/Products/Release-iphonesimulator/AEXML.framework/AEXML have the same architectures (arm64) and can't be in the same fat output file
Building universal frameworks with common architectures is not possible. The device and simulator slices for "AEXML" both build for: arm64
Rebuild with --use-xcframeworks to create an xcframework bundle instead.
How to build in AppCenter?
--use-xcframeworks
This option is only available from Carthage 0.37.0. The appcenter's carthage version is 0.36.0. They need to update the carthage used in appcenter projects.
Can you look at the logs and see if this script is being run? Or is it that appcenter is running the carthage binary?
EDIT
The good news is that appcenter identifies carthage 0.37.0! I added a appcenter-post-clone.sh in my project directory:
#!/usr/bin/env bash
set -e
set -x
carthage update --cache-builds --use-xcframeworks --platform ios
carthage version
echo "" > Cartfile
echo "" > Cartfile.resolved
appcenter recognises that --use-xcframeworks is used and therefore 0.37.0 is required.
NOTE: I'm emptying the Cartfile* so that appcenter doesn't run its native carthage command (which it does on noticing Cartfile and Cartfile.resolved).
EDIT 2
I'm now considering using something like carthage_cache in appcenter as the carthage checkout and build ends up taking a lot of time.
Try this one (you may need to upgrade your Carthage first)
carthage update --no-use-binaries --use-xcframeworks --platform iOS
I am preparing a project about self-driving vehicles and I will work on the Carla simulator. I am using Ubuntu 18.04 LTS and installed Unreal Engine version 4.24. I've done the steps in the Carla document one by one, but when running the UE4Editor, I get the AndroidPermission not found error. Even though I disabled this on the uplugin file of it, still the same problem persists. How can I solve this problem? Please help me.
Are you trying to run the Unreal Editor? Or are you calling make launch to start CARLA?
In the first case, set "EnabledByDefault": false and "Installed": true in /Engine/Plugins/Runtime/AndroidPermission/AndroidPermission.uplugin. I assume that the Installed attribute is set to False on your end.
In the second case, try to start CARLA in Visual Studio Code by selecting the launch configuration CarlaUE4Editor(Development). For this you need to open the workspace inside /Unreal/CarlaUE4/CarlaUE4.code-workspace.
You also need to set "EnabledByDefault": false on /Engine/Plugins/Online/Android/OnlineSubsystemGooglePlay/OnlineSubsystemGooglePlay.uplugin because the plugin OnlineSubsystemGooglePlay requires AndroidPermission.
I’m getting strange error while building project in Xcode 9.4
Build system information - unexpected service error: The Xcode build system has crashed. Please close and reopen your workspace.
I tried Xcode quit and reopen but that didn’t worked. Any solution?
Please clear derived data folder (located at ~/Library/Developer/Xcode/DerivedData) and restart the Xcode project.
This error usually happens between Xcode major versions. Apple usually claim their new build system is ** times faster than their previous version. If you see this error(I see this on changing Xcode9 to Xcode10 beta), you can always change it to the legacy build system. Here is how you can do this:
Open 'workspace settings'( it is now changed to 'Project Settings' if you are using Xcode10 or later) in the File Menu
Change build system to 'legacy'
Update for Xcode 13.4.1:
I had this infamous bug today as well. I tried a lot including clean project, delete derived, restart max etc.
What did the fix finally is similar to the answer of kakaiikaka: I set the workspace settings to "Legacy Build System (Deprecated)" for both, the shared and per user workspace. I tried to build with this, but got an error because I had packages wich are not supported.
Restarted Xcode, then changed back the build system. Restarted Xcode again.
Now the crash doesn't happen any more.
Looks like something internal was spoilt and cycling the build system fixed it.
I moved a lot of files all at once between folders, including nested folders. This error started happening. Nothing I did in regards to cleaning, purging derived data, or undoing the move operation would help.
What I did to help was: restore the previous version of the project file from source control and then re-add all the applicable new files to it. It was project file related. Deleting user data inside the project container did not help in my case. So as long as you use source control and can rollback the .xcodeproj, this may be an option.
it happened to me when i changed build configuration names. After deleting Pods folder and Podfile.lock, and then runnnig "pod install" fixed the issue.
For Xcode 10.2 delete podfile, podfile.lock, xcworkspace, open terminal, cd directory of project, pod init, add pods you want to pod file, pod install, open xcworkspac. Everything will be indexing now and then you can build.
Last week I finished development on a test app and ran it successfully in all simulators.
Today I decided to look at publishing the app and used "Sent Android Build". Build status "Successful".
Then tried running jar from command line and got:
peter#PeteSuse:~> java -jar "/home/peter/NetBeansProjects/mobile-apps/pGame/dist/pGame.jar"
java.lang.ArrayIndexOutOfBoundsException: 0
at com.codename1.impl.javase.Executor$1.run(Executor.java:84)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
So tried to run from GUI and got:
run:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel
at com.codename1.impl.ImplementationFactory.createImplementation(ImplementationFactory.java:69)
at com.codename1.ui.Display.init(Display.java:566)
at com.codename1.impl.javase.Executor$1.run(Executor.java:112)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
Java version:
peter#PeteSuse:~> java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (IcedTea 3.3.0) (suse-23.1-x86_64)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
I am using Netbeans (new to this) on Suse Linux 42.1 64b.
Have I lost a library somewhere? or something else?
Thanks guys. I fixed the problem by adding jfxrt.jar to the Libraries in NetBeans.
JFXPanel is in the JavaFX library.
See: JavaFX and OpenJDK for info on why JavaFX is not available by default in your OpenJDK distribution.
If your linux distribution makes an open JavaFX package available (like ubuntu does: Why is JavaFX is not included in OpenJDK 8 on Ubuntu Wily (15.10)?), then you can use that.
Otherwise you can build from source (for the adventurous yak shaver).
Or, easiest, is just to an Oracle Java distribution.
I don't know codenameone or have any idea how it works. Possibly whatever it is, you could ask the creators to package their thing as a self-contained application, so that it ships with a compatible Java runtime, which would (potentially) avoid issues such as you are encountering. Not knowing codenameone, I don't know if that would make sense or not.
I also don't know the cause of your original ArrayIndexOutOfBoundsException as that looks internal to codenameone or your use of it.
With regards to NetBeans, you might need to set the Java platform to one with JavaFX installed (in case you have multiple Java platforms installed on your machine).
You can run a Codename One application in the simulator by pressing the play button in the IDE. It won't work for you from Command Line and shouldn't since the app shouldn't have a main() method.
You can execute the Codename One simulator from Command Line using:
java -jar JavaSE.jar:dist/MyApp.jar
Notice this assumes your project is the working directory.
I installed resently Xcode 5 with iOS 7 SDK on my Mac OS 10.8.
the problem is i can't any more run my iOS app from Xcode 4.6, here's the errors:
- when I run the app from Xcode, after build I have this message:
"can't find the existing path [myproject.app path]"
and the file exist in the specified path.
- when I generate the ipa and install it by iTune I have this message:
"not supported device".
my app works fine before installing the new Xcode (5 + iOS 7 SDK)
any one have a solution?
Thanks
Rachid
Easy solution!
Xcode 5 like any previous change some formats. To my knowledge the most common issues are:
1. changing the Xib/Storyboard file, You can check my answer here for solution: How do I fix a project opened in xcode5 dp3 by accident?
It can change the framework path format (you should get an error when compiling), To solve this check my answer here: sentestingkit/sentestingkit.h' file not found on Xcode 4.6.x
If those both doesn't work for you please add more details and I would love to help.