I just started with Xcode programming and I encountered my first problem when I run my app without any extra codes, methods, properties or classes. I started with the template SINGLE VIEW and I changed the .xib to MainWindow and added an object called basically App Delegate. I removed the single view object from the MainWindow.xib and replaced it with a UIWindow.
I receive the following classic THREAD 1 SIGABRT error:
App[4178:c07] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ViewController" nib but the view outlet was not set.'
*** First throw call stack:
(0x14f8022 0xef8cd6 0x14a0a48 0x14a09b9 0x1222dd 0x122779 0x12299b 0x81401 0x81670 0x81836 0x8872a 0x1ff5 0x59386 0x5a274 0x69183 0x69c38 0x5d634 0x13e2ef5 0x14cc195 0x1430ff2 0x142f8da 0x142ed84 0x142ec9b 0x59c65 0x5b626 0x1d2d 0x1c95 0x1)
terminate called throwing an exception(lldb)
I already reviewed existing postings, but I could not get wiser on it.
It seems very confusing, but is actually very simple. The Thread1: SIGABRT glitch means that something is interrupting your connections.
This may be caused by declaring your connection as weak, and declaring it as strong in your code. In order to tell what you declared your connection by clicking on the object that is having the problem, and then going to the connections inspector (the symbol with a circled arrow). This will let you see the connection.
Now try changing your code declaration from strong to weak (or the other way around), then running your program. If this does not work try deleting the code of the entity, and deleting the connection by hovering over it in the connections inspector and clicking the "X" that shows up.
After deleting the connection, and code try reconnecting the entity and the code should reinstall by itself.
Related
After yesterdays update I got a pretty strange error when trying to run my app.
2018-06-14 10:38:25.882062+0200 Sorglos Lagerbestand[377:21124] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Sorglos_Lagerbestand.genexis 0x1017d05d0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key lbl_titanium.'
I got three ViewControllers which got all the same function. 2 are working just fine without any problem but the third one is not working at all. Everytime I'm trying to get into that buggy viewcontroller the app freezes.
You guys got any solution for that?
Whole code: https://hastebin.com/vegoboxipo.swift
OK this one is hopefully really simple
I thought I had it figured out once but can't remember what I did
In any app I go in and create a connection to a button or whatever and I give it a name like "PressThisButtonWhenDone"
this is all good and it works fine
BUT
I then want to change the name to "PressThisButtonWhenFinished"
so I delete the old action and create the new one with this name and I go into the .m file to remove the old action Xcode put in place automatically for me and place any code I had in the old method in the new properly named one.
I then build the project and it goes just fine the app comes up and I use all the other functions just fine and then I hit the Button associated with "PressThisButtonWhenFinished"
and I get something along these lines...
2014-06-03 12:30:18.148 appname[5602:60b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ViewController 0x12ed27d10> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key PressThisButtonWhenDone.'
*** First throw call stack:
(0x18cb66f50 0x1990701fc 0x18cb66bd4 0x18d624720 0x18cab25ec 0x18feeadd0 0x18fe2f878 0x18fb30488 0x18fb303f4 0x18fcdd868 0x18fbe7f54 0x18fbe7d24 0x18fbe7ca4 0x10241299c 0x18fb2aff8 0x18f71c258 0x18f716e20 0x18f716cd8 0x18f716560 0x18f716304 0x18fb2f16c 0x18cb27644 0x18cb269a0 0x18cb24c38 0x18ca65c20 0x19274dc0c 0x18fb96fdc 0x10009d6fc 0x199663aa0)
libc++abi.dylib: terminating with uncaught exception of type NSException
This is the old button name and I cannot locate it anywhere to remove it
I tried doing a clean not sure if that would do anything and it did nothing How do I eliminate this error
As it turns out there was still a connection to the old name and that was the reason for the error.By going to the connections manager I found the new connection was there and so was the old one. I deleted the old one and it works fine now. I knew it would be a simple fix.
I've got some strange behavior while debugging/running my metro app.
During drag'n'drop the screen will be refreshed. I'd added some functionality to block binded properties from refreshing while drag'n'drop is in progress.
But sometimes the app crash, but in stead of throwing some exception which I can debug, all I got is an window saying to open an external just-in-time-debugger
An unhandled win32 exception occurred in SOME_APP.exe [7785].
(The external debugger does not bring more information)
And the output says:
Unhandled exception at 0x05017145 (Windows.UI.Xaml.dll) in SOME_APP.exe: 0xC0000005: Access violation reading location 0x00000088.
I'm working on a x64 device.
Has somebody ever heard of such problem?
If you're passing objects implemented INotifyPropertyChanged, inherited BindableBase or DependencyObject etc. thru NavigationParameter; and bind then in the NavigatedPage (or binded them in the navigating page) you'll most likely get this error. Don't pass any object except primitive type thru NavigationParameter when navigating.
You are getting this exception because non-existent referenced methods. For example.
You have an object named Categories which inherites BindableBase.
You binded that to Home.xaml.
Home.xaml's binding mechanism subscribed the PropertyChanged event of Categories object.
You navigated the Article.xaml passing Categories object as a the NavigationParameter.
You binded the Categories object to Article.xaml.
When a property changes in Categories object; that property will fire PropertyChanged event.
There are two subscribers to that event. Home.xaml and Article.xaml, but Home.xaml is no longer exist since you navigated away from it. But your delegate holds the address of it; so it tries to Execute; and fail with Access violation error.
I started getting a weird error in my project, so I created a whole new document-based project just to test (in Xcode 4). I added a 'Text View' to the Document.xib, and ran the program. I manage to open a few new documents, type some stuff in the text view, then I pause, and then the program terminates. It gives me: "Program received signal "SIGABRT".
The error is in the default document.m file, in method:
- (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError
on line:
#throw exception
What's going on?
PS. I looked at the Activity Monitor, and all the loads: System Load, User Load, go way up all at once before it quits.
From the docs:
The default implementation of this method throws an exception because
at least one of the writing methods (this method,
writeToURL:ofType:error:, fileWrapperOfType:error:, or
writeToURL:ofType:forSaveOperation:originalContentsURL:error:) must be
overridden.
My guess is that you didn't implement these method(s). I also bet you're on Lion and have autosaving enabled (see +autosavesInPlace), and that the exception is thrown when the app tries to autosave after an internal timer / change watcher is triggered.
i have a Problem wich drives me crazy...
I want to "write" a Cocoa CoreData Application, write is not the exact term, because the Application should be created with Bindings.
It was no Problem to create a Document-Based Application, it works fine.
But i want a Non-Document-Based Application, so I thought "Do the same like at the Document-Based App", but if I do so the Application do not start. XCodes' GDB says:
2010-07-14 11:02:39.894 nonDocBased[1242:a0f] An uncaught exception was raised
2010-07-14 11:02:39.899 nonDocBased[1242:a0f] [<NSApplication 0x100408e90> valueForUndefinedKey:]: this class is not key value coding-compliant for the key managedObjectContext.
2010-07-14 11:02:39.902 nonDocBased[1242:a0f] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<NSApplication 0x100408e90> valueForUndefinedKey:]: this class is not key value coding-compliant for the key managedObjectContext.'
So I googled on this, but found nothing helpful (or probably I was just too unexperienced... ).
But I found a Tutorial (http://www.raywenderlich.com/934/core-data-tutorial-getting-started) and tried it without Bindings but this neither works.
So my Question is how do I create a Non-Document-Based Application using Core Data?
Here's my Code, the Password is stackoverflow.
Thanks for any Ideas...
Dennis
Bind the NSArrayController managedObjectContext to your AppDelegate not to Files's owner.