I need help with the above-mentioned error. My project is using AsyncDisplayKit and I am getting the error above in the _ASDisplayLayer.mm file line 104 in the method
- (void)setNeedsLayout
{
ASDisplayNodeAssertMainThread();//line 104 where error is occuring
[super setNeedsLayout];
}
I don't know how to solve this problem as I am new to the library and I am just rerunning a previous developer's work. Full error stack is:
* Assertion failure in -[_ASDisplayLayer setNeedsLayout], /Users/.../Desktop/.../Pods/AsyncDisplayKit/AsyncDisplayKit/Details/_ASDisplayLayer.mm:104
2016-03-16 00:17:08.951 DanceRockIt[408:168719] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: ''
*** First throw call stack:
(0x252fa2eb 0x24ac6dff 0x252fa1c1 0x25ad0d3b 0x27f519 0x2755f93b 0x2755f3d9 0x2756240b 0x2758f1f5 0x2949954b 0x297c4525 0x294b3a69 0x294f9e2d 0x2956c68d 0x2956d473 0x2956b935 0x345515 0x345259 0x12abcd 0x106ccbf 0x10775c3 0x106fefb 0x1079017 0x1078909 0x25030e0d 0x250309fc)
libc++abi.dylib: terminating with uncaught exception of type NSException
Something call your setNeedsLayout code from background thread. You must find this place and move to GUI Thread (aka main thread).
for example:
dispatch_async(dispatch_get_main_queue(), ^{
[self.titleTextNode setNeedLayout];
});
Related
enter image description here
I am building a Jitsi meeting in objective C and this is the bug
unrecognized selector sent to instance 0x103008570 2021-01-13 16:10:38.421002+0700 hyper[10246:2399644] *** Terminating app due to
uncaught exception 'NSInvalidArgumentException', reason: '-[UIView
setDelegate:]: unrecognized selector sent to instance 0x103008570'
*** First throw call stack: (0x19fc619d4 0x1b3612b54 0x19fb71bac 0x1a24f903c 0x19fc64018 0x19fc65f8c 0x1003b7680 0x1a1dff110
0x1a1e036f8 0x1a1e03ad8 0x1a2502814 0x1a2502028 0x1a2502ebc
0x1a2513b14 0x1a2726d54 0x1a19e30b0 0x1a24c5fe4 0x1a24c6388
0x1a2007320 0x1ae5f77c4 0x1ae61f1f0 0x1ae604f20 0x1ae61ef04
0x100695528 0x1006989f0 0x1ae643f20 0x1ae643be8 0x1ae6440bc
0x19fbe1be0 0x19fbe1ae0 0x19fbe0e8c 0x19fbdb3d0 0x19fbdab90
0x1b5efd598 0x1a24c4638 0x1a24c9bb8 0x1003c0484 0x19f8b9588)
libc++abi.dylib: terminating with uncaught exception of type
NSException *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '-[UIView setDelegate:]:
unrecognized selector sent to instance 0x103008570' terminating with
uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView join:]: unrecognized
selector sent to instance 0x14080d980' terminating with uncaught
exception of type NSException
This is my code :
- (void)viewDidLoad {
[super viewDidLoad];
// // Attach this controller as the delegate.
JitsiMeetView *jitsiView = (JitsiMeetView*)self.view;
jitsiView.delegate = self;
// Join the room.
JitsiMeetConferenceOptions *options
= [JitsiMeetConferenceOptions fromBuilder:^(JitsiMeetConferenceOptionsBuilder *builder) {
builder.serverURL = [NSURL URLWithString:#"https://meet.jit.si/RomanticEmployersFilterMoreover"];
// builder.room = self.room;
}];
[jitsiView join:options];
jitsiView.alpha = 0;
}
Hi I am working on upgrading Xcode project from iOS 13 to iOS 14 and using xcode 12.1 When I run the application webview will be opened inside app and get login screen. When I tap on textfield app crashes with below error. Xcode is not showing where it is crashing exactly I tried Exception breakpoint also not able to identify.
-[NSConstantIntegerNumber length]: unrecognized selector sent to instance 0x1fae7fd20
2020-11-27 16:59:31.436225+0530 XYZApp [527:40363] *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '-[NSConstantIntegerNumber length]: unrecognized selector sent
to instance 0x1fae7fd20'
*** First throw call stack:
(0x1a669b114 0x1b9f37cb4 0x1a65ab9b8 0x1a669d758 0x1a669f6cc 0x1a7841754 0x1043fb8b0 0x1043fb8dc
0x1eb5e3960 0x1eb5e1c54 0x1a6588ca0 0x1aa7e7264 0x1aa88bb60 0x1aa8613f4 0x1aa78e3a8 0x1aa84b56c
0x1aa834b70 0x1aa852514 0x1aa85edac 0x1aa7b0d40 0x1aa7c4d50 0x1aa7b7d88 0x1af1f8198 0x1af1f9480
0x1eb97995c 0x1af1f4ce8 0x1af165a2c 0x1af1663f4 0x1a8ae74bc 0x1a8a2b338 0x1a8a2a5a8 0x1eb9987d8
0x1a8a2c628 0x1a8a2fbfc 0x1eb9982a4 0x1a8a33258 0x1eb9981fc 0x1a8a34cb4 0x1eb998050 0x1a91aee90
0x1a91ae6d8 0x10505fdb8 0x1050615fc 0x10506fa6c 0x1a661ac30 0x1a66150e8 0x1a6614200 0x1bc791598
0x1a8eddbcc 0x1a8ee31a0 0x1042f727c 0x1a62f3588)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-
[NSConstantIntegerNumber length]: unrecognized selector sent to instance 0x1fae7fd20'
terminating with uncaught exception of type NSException
Xcode Version 6.3.2
The coding project: Objective-C
I can not send the application to Apple, I get this error when upload.
Can you help to correct the error?
Crashed Thread: 15 Dispatch queue: NSOperationQueue 0x7fb2c8a0bf50 :: NSOperation 0x7fb2c8bf5480 (QOS: USER_INITIATED)
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 6D2105
ASSERTION FAILURE in /SourceCache/IDEFrameworks/IDEFrameworks-7718/IDEFoundation/Issues/IDEIssueManager.m:457
Details: This method must only be called on the main thread
Object: <IDEIssueManager>
Method: +_issueProviderInfo
Thread: <NSThread: 0x7fb2c75fbc90>{number = 21, name = (null)}
Hints: None
Close "workspace/project view", leave only "Organiser View" opened and submit your app.
I know how to raise an exception and how to handle it , but suppose I have this method:
method1:arg
AssertionFailure signal:'rescue error comment'.
I want to catch this exception and create new Assertion failure exception with another format.However I need to get that message ("rescue error comment") and use it in my new exception.. and this is where I don't know what to do...
so how do I get that message before the handling the exeption by using
on: AssertionFailure do:
Either use
on: AssertionFailure do: [ :e | NewAssertionFailure signal: e messageText ]
or define method as
method1:arg
NewAssertionFailure signal: 'rescue error comment'
I have an iOS7 application that I am trying to integrate CorePlot 1.4 into (Dependent Project Install).
#property (nonatomic) CPTGraphHostingView *hostingView;
and
_hostingView = [[CPTGraphHostingView alloc] initWithFrame:CGRectNull];
(_hostingView is subject to auto-layout.) If I then add a graph:
CPTXYGraph *graph = [[CPTXYGraph alloc] initWithFrame:CGRectZero];
_hostingView.hostedGraph = graph;
I first get this exception:
-[CPTTextStyle attributes]: unrecognized selector sent to instance 0xa392900
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CPTTextStyle attributes]: unrecognized selector sent to instance 0xa392900'
5 myapp 0x00074325 -[CPTAxis updateAxisLabelsAtLocations:inRange:useMajorAxisLabels:] + 1141
6 myapp 0x00075662 -[CPTAxis relabel] + 1202
In desperation I have then fixed this in updateAxisLabelsAtLocations:inRange:useMajorAxisLabels by:
NSDictionary *textAttributes = nil;
BOOL hasAttributedFormatter = FALSE;
and then get the next exception:
-[__NSCFString sizeWithTextStyle:]: unrecognized selector sent to instance 0x9591e90
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString sizeWithTextStyle:]: unrecognized selector sent to instance 0x9591e90'
5 myapp 0x00081520 -[CPTTextLayer sizeThatFits] + 320
6 myapp 0x0008163c -[CPTTextLayer sizeToFit] + 108
7 myapp 0x00080559 -[CPTTextLayer initWithText:style:] + 313
8 myapp 0x00074b87 -[CPTAxis updateAxisLabelsAtLocations:inRange:useMajorAxisLabels:] + 3159
9 myapp 0x00075672 -[CPTAxis relabel] + 1202
I have then 'fixed' this by commenting out this line in sizeThatFits:
else {
// textSize = [myText sizeWithTextStyle:self.textStyle];
}
Next exception is then:
-[__NSCFString drawInRect:withTextStyle:inContext:]: unrecognized selector sent to instance 0xa162bd0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString drawInRect:withTextStyle:inContext:]: unrecognized selector sent to instance 0xa162bd0'
5 myapp 0x00081dc8 -[CPTTextLayer renderAsVectorInContext:] + 1144
6 myapp 0x00063f60 -[CPTLayer drawInContext:] + 112
which is fixed by commenting out below code in renderAsVectorInContext:
else {
// [myText drawInRect:newBounds
// withTextStyle:self.textStyle
// inContext:context];
}
Now finally no exceptions are thrown and the graph borders are shown. But if I then begin to add data/legend, etc. new exceptions are thrown :(
No text is shown on the axis etc. Of course this is because I have commented out the code. But any clue why these exceptions are thrown? I am desperate ;S
It seems like I have missed something fundamental in the integration. But my integration (CorePlot 1.3 though) worked fine in an iOS6 app on Xcode4 some time ago.
Check the linker flags in your app project. Core Plot requires -ObjC and -all_load. See the Core Plot wiki for more information.