Mysterious errors after updating to Xcode 6 - objective-c

I am getting mysterious console errors when building my application since I updated Xcode to 6.1 from 5. The application works fine, but I'd like to find out what is causing these errors and get rid of them.
Errors are as follows. An exception breakpoint just halts in main, so no real clues there.
2014-11-08 09:30:28.800 Finances[5848:1545133] Failed to connect
(accountSupplementaryDataValue) outlet from (FINAccountEditorWindowController) to
(NSWindow): missing setter or instance variable
2014-11-08 09:30:28.800 Finances[5848:1545133] Failed to connect (delegate) outlet
from (FINAccountEditorWindowController) to (FINAppDelegate): missing setter
or instance variable
objc[5848]: Class _NSZombie_OS_dispatch_queue_runloop is implemented in
both ?? and ??. One of the two will be used. Which one is undefined.
Any ideas?

Apparently you can ignore it? From Greg Parker’s Twitter feed: “Race in the zombie implementation, maybe? You can ignore it.”

For me when I had those problems I carefully went through them and googled them bit by bit to solve them. Though for some what I did was put the file on a flash drive and delete the file from my computer and then reboot the Xcode and with some the computer too and put the projects back on from the flash drive. If that don't work then maybe try loading them on to a computer with Xcode 5 and seeing if the errors are still there?

Related

Xcode 10.2 Lldb RPC server has crashed [duplicate]

I am getting a message in my debugger:
The LLDB RPC server has crashed. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.
In my case the LLDB RPC server consistently crashed every time I ran my app, even after cleaning the build folder and removing and reinstalling Xcode (Version 8.3.3 (8E3004b)) completely.
It turned out that apparently LLDB took objection to a breakpoint I had set, just moving this breakpoint by a line resolved the issue.
Make sure you are not running the app in release mode, if it is in release mode then change it to debug.
In my case: I update to Xcode Version 9.3 (9E145) recently and Xcode execute to the line with breakpoint then I type "po XXX" commend it will show the same message.
I try to delete following files
~/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Caches/com.apple.dt.Xcode
and it solved.
not knowing exactly why but worth to try.
remember to backup those files in order to recovered in case any unexpected situation occur.
I had the same problem and fixed it after I deleted some of the breakpoints. Not sure why this happen at all, but at least you can remove breakpoints and use some NSLog() or print() if you are in Swift and debug with the help of those. Good luck!
Clearly a lot of different causes for this, but for me I was using a DispatchGroup to keep track of multiple async tasks.
I had forgotten to call dispatchGroup.enter() before one of the async tasks (but still calling dispatchGroup.leave() when it finished).
Adding this in fixed the crash for me.
If workspace has lots of breakpoint then it will happen, So try to remove all the break point and see the magic.
For me just restarting the simulator worked.
I found the solution to this issue. I don't know is this correct or not, but this solution is work for me. what I did is Actually I connected two devices to my mac mini, in one device I run the app and get the above error in my console. Then I removed one device and tried, this time I didn't get any error in my console its worked fine. I think you guys won't believe this, I tried Almost 3 time with two devices and one device its only work for one device
This error occurs for different reasons and the main one is when you add a watch app later to your project where Xcode adds an extra build target to scheme. click on scheme section in right side of "run/stop buttons" then hit on edit scheme, hit on Build section which is the first one, There you see 2 targets one has 2 sub targets which includes watch app and watch extension in it and the other one has no sub targets and it is a watch app target.
Solution is simple delete the watch app target which has no sub targets and run the app again.
For me, I had an expression in my watch list that it was barfing on. When looking at the crash logs in Console, there was something like this on the reported crashed thread which gave it away:
lldb_private::EvaluateExpressionOptions const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, lldb_private::ValueObject*) + 619
17 com.apple.LLDB.framework 0x0000000102855f18 lldb::SBFrame::**EvaluateExpression**(char const*, lldb::SBExpressionOptions const&) + 696
18 lldb-rpc-server 0x00000001025e72e9 rpc_server::_ZN4lldb7SBFrame18EvaluateExpressionEPKcRKNS_19SBExpressionOptionsE::HandleRPCCall(rpc_common::Connection&, rpc_common::RPCStream&, rpc_common::RPCStream&) + 169
19 lldb-rpc-server 0x00000001025f8ce1 rpc_common::Connection::PrivateHandleRPCPacket(rpc_common::RPCPacket&, rpc_common::RPCPacket&, bool&) + 1553
20 lldb-rpc-server 0x00000001025fc36d Packets::ProcessPackets() + 1005
21 lldb-rpc-server 0x00000001025fbe96 Packets::ReadThread() + 214
22 lldb-rpc-server 0x00000001025fbdb9 Packets::RunReadThread(void*) + 9
23 libsystem_pthread.dylib 0x00007fff6a586109 _pthread_start + 148
24 libsystem_pthread.dylib 0x00007fff6a581b8b thread_start + 15
I ran across this same error with zero idea of what to do next. I tried the accepted answer and my project didn't have any breakpoints at all.
Turns out I had an observer that I didn't remove and every few times I would push off/on the vc that contained it it would eventually crash with the op's error. I had to enable zombies to figure out which vc was causing the error. I had to manually go through the code line by line to realize I didn't remove the observer. Once I removed it everything worked fine.
// not removing this caused the error
playerItem?.addObserver(self, forKeyPath: #keyPath(AVPlayerItem.status),
options: [.old, .new],
context: &playerItemContext)
I have found a solution for this, this may not be the perfect but kind a fix my problem.
Go to target Build Settings -> Other Swift Flags -> check Debug Values added
Remove everything except $(inherited) and -DDEBUG
Remove Derived Data
Clean and Run
I am having this issue in Xcode 12.1.1 (12A7605b) in January 2021 on macOS Catalina with a Swift project.
I tried Clean, delete Derived data, restarting mac, running on different simulators and real devices - no luck.
Others suggest removing the breakpoint, but for me this breakpoint is needed for debugging (I guess I can figure out how to debug in a different way, with a differently placed breakpoint or with print statements, but that's frustrating).
I filed a bug report with Apple as the error message suggest - I urge others to do the same to increase the chance of a fix by Apple.
In the meanwhile I use this workaround - wrap the code where you want the breakpoint in a DispatchQueue.main.async:
DispatchQueue.main.async { [self] in
print("Put the breakpoint on this line")
}
(Note we use [self] here because it's just debug code, but in most cases these async calls need [weak self] to avoid retain cycles and memory leaks)
The problem I encountered was that the main project was objC, the Swift library introduced by Cococapods, and then crashed during breakpoint debugging of the Swift library
The solution
Add a swift class to the main project, name it at will, and do not need to add the bridge header file
Switch to project Settings, not Target Settings, and find build_setting
SWIFT_ACTIVE_COMPILATION_CONDITIONS adds a DEBUG as follows:
SWIFT_ACTIVE_COMPILATION_CONDITIONS
Debug Debug
Release
In my case. I'm also using SQLite.swift to create database. The crashing happened when I tried to change a column data type of an existing table in code(which was not in the right way to do it), then inserted a tuple with new data type, then tried to print all the tuple out.
Solution: Delete the .sqlite3 database file you have or delete the table with conflict data type and recreate them all.

Why is my AUv3 randomly disappearing with "viewServiceDidTerminateWithError"?

I’ve encountered a strange problem during iOS AUv3 Instrument development which I’m having trouble finding information on. I’ve spent a couple weeks now attempting to debug this, and I was wondering if anyone else has encountered it. It feels more like an "OS killed the app" than a crash, so I use the term crash loosely. Here are the symptoms:
It doesn't seem to ever happen on initial instantiation; it's when a project is reloaded. But, you can comment out setFullState and it'll still occur.
The “crash” is inconsistent. Like a lot of slippery bugs, it’ll start happening consistently and then it’ll stop happening completely.
When it does happen, it initially appears to load fine: the view loads and looks correct, and it produces audio. But, after a couple seconds, the plugin view disappears and it stops producing audio. I see this in the console log:
viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}
You don’t have to generate any MIDI events to crash it. It would crash even after I commented out the processing block.
If anyone has any ideas, including how to get some useful debugging info out of this situation, let me know!
I tried to look at crash logs, but there are no crash logs generated
didReceiveMemoryWarning is not tripped. In fact, I did an experiment where I allocated 100 megs and memset’d it on startup, and it didn’t crash it.
I tried attaching a debugger, but it goes from “no debug session” to “waiting to attach” after it crashes-- at no point does it actually attach. It will attach if I then reload the plugin, but then it won’t crash. The Zombies and Leaks tools didn't reveal anything, nor did the memory sanitizers.
Using a Storyboard instead of a XIB didn't change the behavior (not sure why it would, but it was one of the last few differences between this and Apple's example).
I created a very tiny example project which exhibits the problem (unfortunately, I cannot post any code which shows the problem because I cannot find where exactly the problem code is-- maybe it's even a project setting?). It has a minimal GUI, no setFullState, and generates white noise:
https://drive.google.com/open?id=1dw3xTHn3qY411eXLaIb_9_S5PAtrr5Nk
Expected: It doesn't crash or disappear randomly
Actual results: After reloading a project file which uses this AUv3, the plugin will disappear after a few seconds. It initially produces audio normally and the GUI looks OK, but then vanishes.

Weird LLDB error in Xcode 4.5: Internal error [IRForTarget]

When putting breakpoint in some files, for example: Just newly created ViewController and putting breakpoint on viewDidLoad method I get strange LLDB error
Internal error [IRForTarget]: Couldn't rewrite external variable _ZZ53
[EPGViewController($__lldb_category) $__lldb_expr:]E19$__lldb_expr_result
I tried googling for this error - can't find anything useful. Cleaning cache, restarting doesn't help.
Once more - this error I get not on all files. And I can't figure out why.
Thx for any help or tips!
Also, when I try to po some variable I get
(lldb) po self.title
error: Couldn't materialize struct: Structure hasn't been laid out yet
Internal error [IRForTarget]: Couldn't rewrite external variable _ZZ58-
[EventsEPGViewController($__lldb_category) $__lldb_expr:]E19$__lldb_expr_result
I ran into this error as well and spent a lot of time debugging it fruitlessly. It seems to be related to the breakpoint itself: I noticed that if I deactivated the breakpoint the error doesn't appear.
You might be able to just move the breakpoint to another line to suppress. This isn't the first clang bug I've run into, on XCode 4.3 'po' wouldn't even output variables reliably.
Change your designated debugger for that project from lldb to gdb and you're good.

iOS 5 TableView crashes

Something got changed at the new SDK and my code suddenly isn't working.
I created a new empty project and created only a UITableView in it.
I used the same code as i've been used to, except the compiler said that i do not need to use autorelease anymore, so i removed it.
Oh, and I replaced retain with strong as i was recommended.
When I run the app it shows the TableView like it should look, but the minute i touch anywhere on screen, like scrolling for example, it crashes with EXC_BAD_ACCESS error.
What do I miss??
You should post some more informations on where your program crashed! But I don't think the mentioned compiler warnings are the reason. You should have tried to run your project with the compiler by turning of ARC (automatic reference count) and see what happens. If you can go back, do that first.
Also maybe there went something wrong with the changes you made because of ARC . If you have not done the changes with the Xcode refactoring tool I recommend you doing so.
Therefor select in the Xcode Menu:
Edit > Refactor > Convert to Objectiv-C ARC...
It will go through your code and apply the changes. Apple recommends though that your project should work without crashes and warnings before using it.

Xcode + Time Machine (or Finder copy) = NSInternalInconsistencyException

After using Finder to make a copy of my project, the iPhone Simulator crashes giving me an NSInternalInconsistencyException error. I subsequently used Time Machine to restore the project before I made the copy, but am still getting the NSInternalInconsistencyException error.
This is a small homework assignment and re-creating it wouldn't be the end of the world. My big concern is that I don't understand something fundamental about how Xcode is working. Any illumination would be greatly appreciated.
Update
Apple identified the bug. The iPhone Simulator keeps the last-run version of the app onboard, and doesn't replace it with the copied/Time-Machine-Restored version that is in Run-and-Build. Deleting the app from the iPhone Simulator and performing a new Run-and-Build resolves the issue.
Sounds like a bug. Your source code files should be fine, so hopefully it's not a big deal to just create a new project and add those files so that you can get back to work. You might also want to report the issue to Apple, especially if you can make it happen again.