i am using Uinavigationcontroller as windows root view controller. IN some otherview i am presentingviewcontroller but my app is crashing in iOS 8.It was working perfect in ios7. It says
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
'-[InfoVC my_shouldAutorotate]: unrecognized selector sent to instance 0x15cd42780'.
where InfoVC is viewcontroller. what is my_shouldAutorotate
In your InfoVC class write following method:
-(BOOL)shouldAutorotate{ return NO; }
Related
Testing my app in Xcode 11 (beta) for iOS-13 (beta) updates and I'm getting crash on when I tried to instantiate viewController from storyboard.
In previous versions its working fine with the following code:
XYZController *controller = [self.storyboard instantiateViewControllerWithIdentifier:#"IDENTIFIER"];
Now for iOS 13 Apple introduces new method i.e.
XYZController *controller = [self.storyboard instantiateViewControllerWithIdentifier:#"IDENTIFIER" creator:^__Kindof UIViewController *__Nullable(NSCoder *_Nonnull coder){
return [XYZController alloc] initWithCoder:coder];
}];
Executing both method in iOS-13 cause crash. While crash shows somewhere else.
Here is my crash report.
Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason:
'' returned nil from -traitCollection, which
is not allowed.
Note: Temporary Solution
I also have face this issue and there are two temporary fixes I have found. First is to create object/property of the controller that need to be instantiate and instantiateViewControllerWithIdentifier in your controllers's viewDidLoad. App will not crash.
Second is to instantiate controller in dispatch_async(dispatch_get_main_queue()). These both tricks worked for me.
I'm making a game using Haxe and targeting neko. Any uncaught exception leads to alc_cleanup error.
The problem is, this error blocks the output of the exception details.
It's annoying because I use assertions so I can't find out which one threw an exception if one of the tests fail.
Any help here?
The alc_cleanup error simply happens because an OpenAl audio device in use (by your game or an underlying framework) hasn't been closed before terminating the program (due to the uncaught exception).
If you can, you might want to catch and log that exception yourself to prevent it from being corrupted by the alc_cleanup error:
static function main()
{
try {
// do stuff
} catch (e:Dynamic) {
trace('ERROR: $e');
trace(haxe.CallStack.toString(haxe.CallStack.exceptionStack()));
Sys.exit(1);
}
}
You could also:
try to find the proper API in the frameworks you use to destroy the OpenAl context
neko.Lib.rethrow the exception after doing the necessary cleanup yourself
According to this and this, it should be easy to have Android Studio break on an uncaught exception. However, whatever I try, I seem not to get it working.
I set the "Class Filter" on my Activity, but the app just crashes on an uncaught exception, no breakpoint triggered.
Are you sure that the exception being raised is from the class that you've specified in the class filter?
Try configuring to break on all exceptions without the class filter enabled to validate that it's actually the specified class raising the exception: https://stackoverflow.com/a/28862538/3063884
I was unable to get the debugger to stop for anything until I clicked on the app folder in the project view (one level below root). Clicking on the Root folder of the project didn't work either.
When I run a Flex/AIR application in debug mode and an error occurs, I see this:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
However when the application has been installed as a release build and the same error happens, I don't see an error message.
Is it possible for my application to either save these types of errors to a log file or email them to me?
I have managed to implement this myself using the UncaughtErrorEvent and airxmail classes.
It was a simple case of adding the UncaughtError event to loaderInfo (within a method which is called by the FlexEvent.APPLICATION_COMPLETE event). Using these two classes, the application emails the runtime errors to me as and when they occur, in release mode only as the UncaughtError event does not fire in debug mode.
If you want to log your uncaught errors you can use the uncaughtError event.
loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR,handleGlobalErrors);
function handleGlobalErrors( evt : UncaughtErrorEvent ):void
{
//code that saves error to log or send by email..
evt.preventDefault();
}
You can find more information about this feature here http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/UncaughtErrorEvent.html.
Also beware that if you use this in Debug mode all your errors will be caught by the handleGlobalErrors function so keep that in mind.
While porting MVC3 application to Mono I'm receiving this error:
System.InvalidProgramException
Invalid IL code in System.Web.Security.MembershipProviderCollection:.ctor (): method body is empty.
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Web.
Exception stack trace:
at System.Web.Security.Membership..cctor () [0x00010] in C:\cygwin\sources\mono\mcs\class\System.Web\System.Web.Security\Membership.cs:105
MembershipProviderCollection
public static MembershipProviderCollection Providers
{
get
{
return Membership.providers;
}
}
It works as expected under .Net but not the mono 3.0.1 compiler. How can I fix or work around this?
This issue can be solved by removing the reference to System.Web, adding a reference to Mono's internal System.Web.ApplicationServices, and then re-adding the System.Web reference. Not a clue in the world why this doesn't work without first removing System.Web, but it doesn't.