Declaring sceneView gives SIGNAL SIGABRT - ios

I'm getting a SIGNAL SIGABRT Thread 8 error when I build to my iphone 6, when I build to an emulator there's no problem what so ever, this happened after I updated to the newest version of XCode which was released last february.
The error is:
Assertion failed: (renderSize.x != 0), function - [SCNRenderContextMetal _setupDescription:forPass:isFinalTechnique:],
file /BuildRoot/Library/Caches/com.apple.xbs/Sources/SceneKit/SceneKit-332.6/sources/Core3DRuntime/NewRenderer/SCNRenderContextMetal.mm,
line 688. (lldb)
Why does it work in the emulator but not on an actual device and how can I fix this? Is it that the framework is out-dated?
When I remove everything.. the error only stops once I've removed the following code:
var sceneView = SCNView();
The iOS version is 9.2.1

Related

Dismissing of system alerts in XCTests all of a sudden stopped working on iOS 15.6

I had a piece of code that was supposed to dismiss a touch ID alert.
let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
let allowBtn = springboard.buttons["Cancel"]
if allowBtn.waitForExistence(timeout: 2) {
allowBtn.tap()
}
this code was working fine for years, until it stopped.
The error I'm getting is:
[__NSArrayM insertObject:atIndex:]: object cannot be nil (NSInvalidArgumentException)
and it happens in the .tap() line.
Basically this is what I see, besides the fact that I'm running on iOS 15. https://openradar.appspot.com/radar?id=5520542106910720
Any kind of help is highly appreciated.

appcelerator: Ti.Geolocation.reverseGeocoder crashes app

I'm running code to determine the name of city of the user's current location.
Whenever I call the reverseGeocoder the app immediatly crashes, even by just calling it with hardcoded coordinates.
Ti.Geolocation.reverseGeocoder(50,50, function(e) {
console.log('reverse encoding result:',e);
});
The error is:
[ERROR] : Script Error {
[ERROR] : column = 35;
[ERROR] : line = 338;
[ERROR] : message = "*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[5]";
pointing to the code above calling the encoder.
Using Titanium SDK 8.2.0, XCode 11.1, OSX 10.14.5
The issue happens in the emulator and on the device.
This issue does not occur on android for me.

Error: global.nativeTraceBeginSection is not a function

I didnt change anything but suddenly I got this error in my xproject and the app got stuck and thing the when I do simulator through my Xcode is working but not with physical device.
the full log is here:
'Failed to print error: ', 'global.nativeTraceBeginSection is not a function. (In \'global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, profileName, args)\', \'global.nativeTraceBeginSection\' is undefined)'
WARNING: Logging before InitGoogleLogging() is written to STDERR
E0910 19:37:09.077337 1871998976 JSCHelpers.cpp:137] Got JS Exception: Exception calling object as function: global.nativeTraceEndSection is not a function. (In 'global.nativeTraceEndSection(TRACE_TAG_REACT_APPS)', 'global.nativeTraceEndSection' is undefined) (<unknown file>:2303)
E0910 19:37:09.077525 1871998976 JSCHelpers.cpp:143] Got JS Stack: endEvent#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2303:35
__callFunction#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2098:24
http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1927:29
__guard#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2068:11
callFunctionReturnFlushedQueue#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1926:19
callFunctionReturnFlushedQueue#[native code]
2018-09-10 19:37:09.079 [fatal][tid:com.facebook.react.JavaScript] Error calling Systrace.setEnabled
Unhandled JS Exception: Exception calling object as function: global.nativeTraceEndSection is not a function. (In 'global.nativeTraceEndSection(TRACE_TAG_REACT_APPS)', 'global.nativeTraceEndSection' is undefined) (<unknown file>:2303)
2018-09-10 19:37:09.082 [error][tid:com.facebook.react.JavaScript] global.nativeTraceBeginSection is not a function. (In 'global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, profileName, args)', 'global.nativeTraceBeginSection' is undefined)
2018-09-10 19:37:09.083 [info][tid:com.facebook.react.JavaScript] 'Failed to print error: ', 'Can\'t find variable: regeneratorRuntime'
E0910 19:37:09.086755 1871998976 JSCHelpers.cpp:137] Got JS Exception: Exception calling object as function: global.nativeTraceBeginSection is not a function. (In 'global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, profileName, args)', 'global.nativeTraceBeginSection' is undefined) (<unknown file>:2298)
E0910 19:37:09.086828 1871998976 JSCHelpers.cpp:143] Got JS Stack: beginEvent#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2298:37
__invokeCallback#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2125:28
http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1950:32
__guard#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:2068:11
invokeCallbackAndReturnFlushedQueue#http://192.168.1.27.xip.io:8081/index.bundle?platform=ios&dev=true&minify=false:1949:19
invokeCallbackAndReturnFlushedQueue#[native code]
(lldb)
I have been trying to find solution, didn't succeed with any of them.
this error shows on my Xcode logged and not on my screen of the phone
Thank you so much for the help!!
I had the same issue because I unintentionally enabled Start Systrace and since it is a known react native issue... I was getting the error.
What worked for me was just disabling Start Systrace and restarting the project. How I do that?
Command ⌘ + D
Press Disable Start Systrace, that's it!
This is a known, unresolved React Native issue. There are a few workarounds in the GitHub issue, including:
Delete, and then reinstall the app from Xcode or react-native run-ios
Revert to the old bridge (instructions)
See https://github.com/facebook/react-native/issues/15003 for more details.

XCTests failing to launch app in simulator intermittently

Has anyone experienced and fixed:
XCTests are failing intermittently to launch app in the simulator for UI testing (XCUI).
I am running through fastlane, different tests appear to fail each test run.
OSX: 10.12.3
iOS simulator: 10.0
Xcode 8.2.1
Fastlane 2.11.0
Attempted to fix it by adding a 3 second sleep between setup and launch in my tests, but it still appears, maybe not as often but still...
UI Testing Failure - Failure attempting to launch
<XCUIApplicationImpl: 0x600000231b20 no.something.bb.debug at
/Users/server/Library/Developer/Xcode/DerivedData/ex-gmtcdujyggxwfrarizpgaromjfxj/Build/Products/Debug-iphonesimulator/BB.app>:
Error Domain=FBSOpenApplicationServiceErrorDomain Code=1 "The request
to open "no.something.bb.debug" failed."
UserInfo={NSLocalizedDescription=The request to open
"no.something.bb.debug" failed., NSLocalizedFailureReason=The request
was denied by service delegate (SBMainWorkspace) for reason: Busy
("Application "no.something.bb.debug" is installing or uninstalling,
and cannot be launched")., BSErrorCodeDescription=RequestDenied,
NSUnderlyingError=0x6080002598f0 {Error
Domain=FBSOpenApplicationErrorDomain Code=6 "Application
"no.something.bb.debug" is installing or uninstalling, and cannot be
launched." UserInfo={BSErrorCodeDescription=Busy,
NSLocalizedFailureReason=Application "no.something.bb.debug" is
installing or uninstalling, and cannot be launched.}}}
I experienced the same issue. I found out that there is a rader open for this. In the comments I found a tip that I implemented in a function that does a retry.
The arguments array is an array of enum values where the base type is String. I use that for the app arguments.
Unfortunately this is still not full prove. In my case the number of failures went down considerably, but did not go away.
var app: XCUIApplication = XCUIApplication()
public func tryLaunch<T>(_ arguments: [T], _ counter: Int = 10) where T: RawRepresentable {
sleep(3)
XCUIApplication().terminate()
sleep(3)
app = XCUIApplication()
app.launchArguments = arguments.map { $0.rawValue as! String }
app.launch()
sleep(3)
if !app.exists && counter > 0 {
tryLaunch(arguments, counter - 1)
}
}
The function above is included in https://github.com/evermeer/UITestHelper
After playing around we were observed that if we run limited test cases, this error went down considerably. You can find more details at https://blog.talentica.com/2017/04/04/use-xcode-8-with-jenkins/

Fatal trap exceptions in Obj-C / Swift project

I'm starting to integrate Swift code into my Obj-C project. Everything's been going smoothly but today, when I updated to Xcode 6.1, things hit the fan. I'm getting a number of "trap" exceptions from Swift code that was previously running fine.
The first crash is in my extension of UIFont. Here's my code:
class func specialFont() -> UIFont {
let font = UIFont(name: "FontName", size: 12.0)
return font!
}
This code was working fine before updating to Xcode 6.1, but now crashes with EXC_BREAKPOINT (code=EXC_ARM_BREAKPOINT), at dylddyld_fatal_error: 0x1fe1608c: trap. (BTW, I don't have an exception breakpoint set.) Attempting to continue program execution doesn't generate a crash log, it just enters an endless cycle of generating that exception. Again, code worked fine before Xcode 6.1 update.
The second crash is especially strange because it only happens when debugging on a device, not on the simulator. Same exception info as above. Here's the second bit of code that's crashing:
let tap = UITapGestureRecognizer(target: self, action: "didTap")
self.addGestureRecognizer(tap)
Thanks for any help!
UPDATE
Stack trace is below:
0] dyld_fatal_error
1] dyld_stub_binder
4] Project.FileWhereCrashTriggers.methodTriggeringCrash
5] #objc Project.FileWhereCrashTriggers.methodTriggeringCrash
6] -- continued trace up to call of method crashing
One weird thing about these crashes is that they don't trigger the exception on the actual line of code, as you can see from the stack trace. They break in dyld_fatal_error.
I can't upload any console output because the app never actually crashes while running in Xcode - it calls endlessly similar to EXC_BAD_ACCESS. I triggered the crash in non-debug mode and then looked at the device logs using Organizer and this is what it offered:
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000000e7ffdefe
Triggered by Thread: 0
Dyld Error Message:
Symbol not found: __TFSSCfMSSFT21_builtinStringLiteralBp8byteSizeBw7isASCIIBi1__SS
Referenced from: /private/var/mobile/Containers/Bundle/Application/4ABA71F8-A6D1-4E4B-A452-DE339065310A/Project.app/Project
Expected in: /private/var/mobile/Containers/Bundle/Application/4ABA71F8-A6D1-4E4B-A452-DE339065310A/Project.app/Frameworks/libswiftCore.dylib
Dyld Version: 353.5
A clean build solved it for me (clean from XCode and delete app on device)
After experimenting more, I was able to resolved these conflicts by using the #objc marker in my swift files in all swift methods that could get called by my Obj-C code, including init methods. For example, change override init(frame: CGRect) to #objc override init(frame: CGRect).
As an aside: I'm still a bit confused by why the #objc flag wasn't 'required' (although it may have been best practice) in Xcode 6.0 but suddenly was a requirement in Xcode 6.1.

Resources