i am getting a pretty generic error in my debugger when using the simulator in xCode.
plugin com.XXX.XXX.Shortcut-Keyboard invalidated
this just started occurring yesterday and i don't believe i changed anything. since the error started i had just added a few more outlets and actions. i did try something in the code which changed the first responder on a text field, but i have since removed that code and recompiled. It seems maybe this caused an issue? Now when i cycle thru the keyboards, when it gets to mine i get a few second pause and then this error. in debugging the code, it never seems to hit my viedDidLoad override in my keyboard view controler. So something i did must have changed it.
What would cause something like this to occur? I'm at a loss! Im using Xcode 6.3.1 with a target of 8.3 on an iPad. Any help would be appreciated as this is holding up my development.
Thanks
Mike
start a new project and copy and paste the code resolved this issue
Related
I keep encountering what I believe to be a bug in Xcode version Version 9.4.1. My code will run fine, then after making no adjustments to the storyboard/interface that would necessarily affect the ID or any of my outlets, I will get the error Unknown class l in Interface Builder file.
I have tried investigating, but no luck. I can't find any objects in my storyboard with the class l. Last time, I was able to fix the error by hitting undo a few times. However, hitting undo is not fixing the problem this time. Cleaning the project via SHIFT+CMD+K and restarting Xcode also have no affect.
Anyone else run into this error or have any idea how I could fix it?
Update
After opening and closing Xcode a few more times, the problem seems to have "magically" sorted itself out. Odd, right? While I shouldn't look a gift horse in the mouth, I can't help but remain curious about what could've possibly caused this bug in the first place.
I noticed strange behaviour during working with Swift projects. I can't explain it other than Swift sometimes calls wrong method. It is very rare and even adding blank lines to the code could lead that this error is gone.
Let me explain in screenshots what I mean, next I use CoreData example of SwiftDDP project that can be found on Github, but such issues I was able to see in my own projects.
Here we at Todos.swift:74 where you can see breakpoint, I expect that next call should be getId() method of MeteorClient class because it was already instantiated:
After Step Into as you can see the ping() of the same instance is called:
The next two steps into lead to EXC_BAD_ACCESS exception:
In my project I saw this issue fairly often before I stopped using singletons, so it could be related to Swift static memory usage or I don't understand something that is not surprising as I have little experience with multithreading and memory management.
My environment is:
AppCode OC-145.184.11
Xcode Version 7.2.1 (7C1002)
iOS 9.2 SDK
Apple Swift version 2.1.1 (swiftlang-700.1.101.15 clang-700.1.81)
NOTE: Here I use AppCode but the same behavior I was able see in Xcode, and even more if the same issue that reproduces in Xcode could not reproduce in AppCode and vice versa.
Would be thankful if someone can explain this strange behaviour to me.
Thanks!
This just happened on my team, using Swift 2.2. It's really incredibly strange. It's not a threading issue or an async problem, it was a very cut & dry use case. We called one instance method and another one above it got called. I deleted the method that was getting called, and then the one above THAT got called instead. Then I moved the method I was actually calling to a different location in the file, and it looked like multiple properties were getting called.
This is disturbing and worrisome, as now you feel you can't trust your code to run properly.
But we did "solve" it. We moved the method up to the code that was actually getting triggered, and after a little trial & error the right method got called. Not yet sure if this will manifest itself for other methods.
It'd be nice to be able to provide a simple project where this is happening, but it seems highly unlikely that it's possible, and I can't share a snap shot of my code base with Apple. It must be a perfect storm of something to cause a bug with Swift's run time.
I had a similar issue, I think. Couldn't see that the wrong function was being called, but breakpoints on the function that was being called were never hit, and I couldn't step into the function from where it was being called. I added a new function (I called it wtf) with the same parameter list and implementation, and that one worked as expected, so it must have been a weird linking issue in the Swift compiler.
Update: super-cleaning appeared to work (see below), but it doesn't. Looks like I'm leaving my wtf function in.
After super-cleaning the project, it looks like everything's working as expected again:
clean (cmd + shift + k)
clean build dir (cmd + opt + shift + k)
quit XCode
delete derived data (rm -rf ~/Library/Developer/Xcode/DerivedData/*)
FYI, in my case, the function I call is in a generic base class, called from a generic subclass, triggered by a specialized sub-sub-class. As we all know, the generics are still very buggy in the Swift compiler, so that's probably why I encountered this.
Do you have multiple threads running? Maybe a network thread?
I thought I had this issue too but then it turned out my one thread was doing something and because the other thread crashed it stopped the other thread at a random point. I only noticed this thread so it seemed like it crashed at a random #IBAction function.
When I switched to iPhone 6 simulator instead of iPhone 7, it seems to be working correctly now!
Our app was rejected from review because of a mysterious crash. After debugging I found that it was having this same issue - but only for the Release scheme!
So I went through every setting in Build Settings one by one to see if switching it to that of another scheme would fix the issue: changing ENABLE_TESTABILITY to true fixed it......
I've searched around and can't find anything on this.
Using Swift 2 and Xcode Version 7.0.1 (7A1001). Every time I execute something in the debugger console, Xcode crashes.
The project is not very big, and has less than 10 third party frameworks.
I can't think of much more information that's relevant, but I'm sure there's more, so please do ask me if there's anything I should add to my question that would help.
I've of course cleaned build and derived data.
It's driving me insane. Thanks!
UPDATE 16/11/12
Submitted rdar://23559366.
How are you maintaining your third party frameworks? Via Carthage?
If so then this is probably your issue: https://github.com/Carthage/Carthage/issues/924
This is an issue if the location of the /Carthage/Build/iOS folder is in a different location to where it was produced (i.e if it was compiled on a different machine and the absolute file path has changed).
A temporary fix would be to run carthage build --no-use-binaries on your machine to rebuild the symbols using the current absolute file path working around the bug.
But if you wasn't using carthage then its probably not your issue so sorry
I had similar problem with Xcode whenever I hit breakpoint.
In case you see this screen right before your Xcode crashes - you are lucky and my fix might save you. All you need to do is open this window and in the Project Navigator, select any file that you want, so that instead of that white blank view you would get your code. After this you are most likely will be able to successfully stop your app at your breakpoint and perform the debug.
I am not sure why this happens, but I suspect that the reason is Debug View Hierarchy mode, which you might have triggered prior to setting you breakpoint and trying to stop at it. At least this is when it happens to me.
I have similar problem earlier.
If you try to print non-optional variable and unfortunately it holds nil value then it breaks/crash. so that make sure declare all possible variables as "Optional type".
I'm learning basics of Objective-C and using XCode for writing code.
As you all know autocomplete option is perfect for new users that don't know (or remember) name of functions.
I have a problem with using autocomplete in XCode 6.3 couse its just.. not working - it is not showing anything or showing things that are not connected.
For example I just wrote simple few lines of code gusing NSMutableArray and NSEnumerator, when I'm trying to remind myself function/message 'nextObject' of NSEnumerator, XCode is not suggesting anything.
Here is a pic to show it:
Am I doing sth wrong or there is a way to fix it?
thanks in advance!
It must be a temporary glitch. Happens to me almost all the time while Xcode is "indexing". You might be typing too fast and by the time Xcode gives indexing a break and looks for the auto-completion you might have types something for which there is no method (or something that you expected)
Also, for custom classes & method, make sure you have included the respective header files.
It seems that autocomplete does not work when there is an error in the code.
The reason for autoComplete not working can be anything. Do any one of the following to debug it
Check if there are errors and if so try to solve it and then check autoComplete. If any error is present in any of the line then autoComplete will not work for below code. Try autoComplete above the error incase you want to check.
If debugger does not throw any error then try commenting out the all lines and uncomment it from top to methods to recheck the autoComplete
Quit Xcode and Reopen it
Clear Derived data and then launch Xcode and check
Suddenly, only code completion which starts with # has stopped working in all Xcode projects in Xcode 6.
About a week ago, after upgrading to Xcode 6.0.1, I tried to use Debug View Hierarchy, then not only Xcode but also my entire Mac system crashed and it restarted. Since then, if I remember correctly, The problem has started to happen.
Most code completions are working correctly, like NSLog().
But, only code completion which starts with #, like #"string", #[array, ...], hasn't been working in all of my Xcode projects. When I type #, I can't see an automatic code completion popup window for NSString, id, NSArray, and so on. The code completion popup window automatically doesn't show up, but when I type the esc key, it shows up.
I tried deleting Derived Data from Organizer in Xcode, but It didn't solve the issue.
I updated Xcode to 6.1 just today, but it didn't work.
I tried re-installing Xcode 6.1 with deleting all files at ~/Library/Developer/Xcode, and it didn't work either.
Even in a new Xcode project, there's the same issue. One of the weirdest points is that this code completion issue happens in my all Xcode projects regardless of when they are created. Also, the code completion for only # doesn't work.
The code completion for # is used very often. It's a sooo pain in the neck... It would be great if you could give me any advice to solve this issue. Thanks!
I believe Apple has changed the behavior of this. So I guess get used to it.
I know it sucks, but at least you can change it to something else.
If someone knows how to get it back to like in Xcode 5 that would be awesome!