How to clone ARsession in ARKit? - arkit

I used ARSCNView to draw objects in virtual reality
Now I want:
clone ARsession new from ARsession old
Pause() ARsession in an old version
Only work on a new version
Note: If you don't clone but just try the assign, then when to pause() ARsession in the old session, the new session will also pause()
How I did it:
let session = arscnView.session.copy() as! ARSessionv
==> Result: Error --- Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ARSession copyWithZone:]: unrecognized selector sent to instance 0x101b93c30'
How can I do this?
Thanks for reading.

Related

Crash when updating Dictionary (Heap corruption detected, free list is damaged at ...)

So I'm loading some images from files which I saved in the app's document directory and upon completion, I update a dictionary which holds all the images for my tableview. So far so good, everything's working just fine.
But now I've stumbled upon a really peculiar crash. Sometimes when updating the dictionary the app crashes, giving me the error message: "Heap corruption detected, free list is damaged at ...".
I've added a symbolic breakpoint at malloc_error_break and turned on the Address Sanitizer the Undefined Behaviour Sanitizer and Zombie Objects as advised in this post: iOS error : Heap corruption detected, free list is damaged and Incorrect guard value: 0
Now I'm getting the following error message, which doesn't really help me either:
2019-06-09 17:35:20.806306+0200 Wizy[9953:3221129] -[NSIndexPath count]: unrecognized selector sent to instance 0x8000000000000000
2019-06-09 17:36:28.490834+0200 Wizy[9953:3221129] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSIndexPath count]: unrecognized selector sent to instance 0x8000000000000000'
*** First throw call stack:
(0x1fc9d7ea0 0x1fbba9a40 0x1fc8f0d04 0x1fc9dd7b8 0x1fc9df45c 0x10952fbdc 0x10952fb5c 0x104868004 0x10461a178 0x104b59fd8 0x1045e4bd0 0x1067817c8 0x10a093824 0x10a094dc8 0x10a0a6330 0x10a0a6bc8 0x1fc5f417c 0x1fc5f6cec)
libc++abi.dylib: terminating with uncaught exception of type NSException
I have no clue as to what could've caused that crash, hopefully someone can help me out here!

Sphero AR Example Crashes Randomly

I'm testing the Sphero-AR-SDK found on GitHub (https://github.com/orbotix/Sphero-AR-SDK)
When testing, I seem to have random crashes on connect.
The issue I'm trying to debug is an index out of range error.
*"*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(0x325102a3 0x3a22d97f 0x3245bb75 0x8cb42b 0x32e270f5 0x324e5683 0x324e4ee9 0x324e3cb7 0x32456ebd 0x32456d49 0x3602d2eb 0x3436c301 0x7f10 0x3188)
libc++abi.dylib: terminate called throwing an exception"*
This happens a fair amount when booting the application but not all the time (sometimes it will get through and play the game).
I was wondering if anyone else was having issues with these random crashes or have I not set it up correctly?
I've had a look at the "Other Linker Flags" in XCode too and it has -all_load.
Also, I've safely checked the only place where I could find an array object access in the .mm files (RKUNBridge.mm) has this line:
[RKDeviceSensorsData *data = [sensors_data.dataFrames objectAtIndex:0];
And I safely checked this array exists and is greater than one to double check it's not this line.
Any ideas or suggestions would be much appreciated.
Thanks for reading.

HelloWorld for iOS application in creating IOS gettting started, i have unknown exception in the running time

I am trying to implement the getting started helloWorld, on XCode 4.6, but I am getting this sigabart. The code is exactly like the apple website. No errors are produced but in runtime I have this:
2013-02-11 12:38:42.594 hellooWorld[1794:c07] *** Terminating app due to uncaught exception 'NSUnknownKeyException',
reason: '[<ViewController 0x75562d0> setValue:forUndefinedKey:]:
this class is not key value coding-compliant for the key greeting.'
*** First throw call stack:
(0x1c91012 0x10cee7e 0x1d19fb1 0xb7ae41 0xafc5f8 0xafc0e7 0xb26b58 0x230019
0x10e2663 0x1c8c45a 0x22eb1c 0xf37e7 0xf3dc8 0xf3ff8 0xf4232 0x433d5
0x4376f 0x43905 0x4c917 0x1096c 0x1194b 0x22cb5 0x23beb 0x15698 0x1becdf9
0x1becad0 0x1c06bf5 0x1c06962 0x1c37bb6 0x1c36f44 0x1c36e1b 0x1117a 0x12ffc
0x267d 0x25a5)
libc++abi.dylib: terminate called throwing an exception
I did delete the connections and connect the label, textfield and button again to view controller.m but get the same result. I connectted the textfiled to the delegate but received the same result.
Can someone help elucidate what is going on?
Check for the linking of objects or methods in your storyboard connections inspector.

iOS - Video playing gives errors

When I follow this tutorial, it gives me an error on the [playercontroller release]; line, so I remove it, and then it gives me these errors when I try to run it.
I tried making another app to test the video, and it works seamlessly, but it will not work in my main app. Can anyone help?
And when I reimported the framework, and tried to play the video, it gives me this error:
2012-08-17 11:27:03.174 LYWAM Tour[768:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'
*** First throw call stack:
(0x1e15022 0x10fdcd6 0x1dbda48 0x1dbd9b9 0xba253b 0xba24c5 0x54ac 0x1e16e99 0x26314e 0x2630e6 0x309ade 0x309fa7 0x308d8a 0x2882cf 0x2885e6 0x26edc4 0x262634 0x16f7ef5 0x1de9195 0x1d4dff2 0x1d4c8da 0x1d4bd84 0x1d4bc9b 0x16f67d8 0x16f688a 0x260626 0x24cd 0x2435 0x1)
terminate called throwing an exception(lldb)
I take it GVE1ViewController is a class you wrote yourself? Does it definitely implement a method called GrommeVideoExcerpt1? Is what you assigned to the variable actually an instance of GVE1ViewController (or a subclass?) Put in an NSLog to check that it really is an instance of GVE1ViewController.
To do the NSLog, you need a line of the form:
NSLog(#" My controller = %#", myVar);
where myVar is whatever variable you have containing a reference to the GVE1ViewController.

Problem setting UIImageView Image

I am trying to set my imageview:
detailedEventViewController.thumbnail.image = [UIImage imageNamed:#"amnesia.png"];
but get the error:
2011-01-08 09:53:24.153 HD Pocket Vacations[24697:207] -[DetailedEventViewController thumbnail]: unrecognized selector sent to instance 0x624d820
2011-01-08 09:53:24.247 HD Pocket Vacations[24697:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DetailedEventViewController thumbnail]: unrecognized selector sent to instance 0x624d820'
My outlets are wired up correctly.
There must be a problem with your "thumbnail" property.
As such, you'll need to check:
Whether it's been correctly defined and synthesized within your interface and implementation file(s).
Whether it's an UIImageView.
The spelling on all of the above.