I am using the iAd suite with storyboards from Apple, as per this link...
Apple iAd Storyboard documentation
It all works fine until I turn autolayout on. It builds fine but crashes on running. The output I get is:
2013-08-24 12:06:36.138 TabbedBanner[7272:c07] * Assertion failure in -[UIView layoutSublayersOfLayer:], /SourceCache/UIKit_Sim/UIKit-2380.17/UIView.m:5781
2013-08-24 12:06:36.139 TabbedBanner[7272:c07] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Auto Layout still required after sending -viewDidLayoutSubviews to the view controller. BannerViewController's implementation needs to send -layoutSubviews to the view to invoke auto layout.'
*** First throw call stack:
(0x1e27012 0x110ee7e 0x1e26e78 0xba4665 0xa347a 0x11226b0 0x1358fc0 0x134d33c 0x1358eaf 0x1422bd 0x8ab56 0x8966f 0x89589 0x887e4 0x883ef 0x65c9d 0x5098b 0x5194b 0x62cb5 0x63beb 0x55698 0x1700df9 0x1700ad0 0x1d9cbf5 0x1d9c962 0x1dcdbb6 0x1dccf44 0x1dcce1b 0x5117a 0x52ffc 0x2a0d 0x2935)
libc++abi.dylib: terminate called throwing an exception
(lldb)
I know it is something to do with the subviews in storyboard but I dont know how to correct this error. I am pretty new to iOS and trying to teach myself so any help is appreciated. Many Thanks
Add:
[self.view layoutIfNeeded];
to the end of this method
- (void)viewDidLayoutSubviews
inside your BannerViewController
Related
I created a fresh iOS Single Page App (including SwiftUI) with Xcode 11.1 and enabled Mac Catalyst. After running the fresh Project on my Mac (macOS 10.15 of course) I get the following errors after tapping once on the window.
2019-10-18 12:59:48.479186+0200 test[3130:122148] Metal API Validation Enabled
2019-10-18 12:59:50.960734+0200 test[3130:122148] [AXRuntimeCommon] Unknown client: test
2019-10-18 12:59:50.962261+0200 test[3130:122148] [AXRuntimeCommon] This class 'SwiftUI.AccessibilityNode' is not a known serializable element and returning it as an accessibility element may lead to crashes
2019-10-18 12:59:51.313 test[3130:122148] **************_____________**************AXError: AVPlayerView is not a kind of NSView
1 AccessibilityBundles 0x00007fff42ee3b69 _AXBValidationCheckIsKindOfClass + 201
2019-10-18 12:59:51.386 test[3130:122148] **************_____________**************AXError: MKStarRatingView is not a kind of NSView
1 AccessibilityBundles 0x00007fff42ee3b69 _AXBValidationCheckIsKindOfClass + 201
Note: I also removed the Sandbox capability otherwise I get error about can't writing ApplicationAccessibilityEnabled
Does anyone know how to solve that?
As far as I can tell, there isn't a way to get rid of that error, and there isn't a need to; it's something inherent in SwiftUI. It occurs on iOS, iPadOS, and (therefore) Mac Catalyst, even in a brand new project. It also doesn't seem to hurt anything, other than to worry us developers.
I've been working in SwiftUI for the past six months full-time on an app that is now in production running on iOS, iPadOS and MacOS (Catalyst). The This class 'SwiftUI.AccessibilityNode' is not a known serializable element error has been there since the beginning. I haven't traced it to be the source of any problem in six months of SwiftUI development.
If you open Xcode, create a new single-view iOS project, and run it without change, it'll display "Hello, World!". Click "Hello, World!" and your console will log [AXRuntimeCommon] This class 'SwiftUI.AccessibilityNode' is not a known serializable element and returning it as an accessibility element may lead to crashes.
I've tried adding accessibility modifiers, e.g.:
struct ContentView: View {
var body: some View {
Text("Hello, World!")
.accessibility(hint: Text("Just say hi"))
.accessibility(identifier: "helloWorld")
}
}
The error still gets logged when I click "Hello, World!".
I've also tried extending SwiftUI.AccessibilityNode to make it a serializable element, e.g.:
import SwiftUI
extension SwiftUI.AccessibilityNode {
}
Xcode says type SwiftUI.AccessibilityNode doesn't exist.
If you find them annoying as I do you can silence them as mentioned in this answer:
Hide strange unwanted Xcode logs
I am using Laravel Dusk to write browser tests for a Laravel 5.7 application. In the test I am navigating to the page and clicking a button which triggers a confirm dialog. I am trying to test that dismissing the dialog does not change the page url.
I have tried adding $this-expectException(UnexpectedAlertOpenException::class) before running the test to try to make the code understand a dialog should be shown
{
$this->expectException(UnexpectedAlertOpenException::class);
$this->browse(function (Browser $browser) {
$browser->loginToWave()
->goToSystemsEdit();
$browser->waitFor('#delete-systems-button')
->click('#delete-systems-button')
->assertDialogOpened('This will delete the system. Please seek advice before doing this. Continue?')
->dismissDialog()
->assertPathBeginsWith('systems/edit');
});
}
I expect the test to dismiss the dialog and check the path assertion.
What is actually happening is that an UnexpectedAlertOpenException is thrown:
1) Tests\Browser\Systems\DeleteSystemTest::testSystemNotDeletedIfConfirmIsDismissed
Facebook\WebDriver\Exception\UnexpectedAlertOpenException: unexpected alert open: {Alert text : This will delete the system. Please seek advice before doing this. Continue?}
(Session info: chrome=71.0.3578.98)
(Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 4.9.125-linuxkit x86_64)
/var/www/html/vendor/facebook/webdriver/lib/Exception/WebDriverException.php:140
/var/www/html/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:326
/var/www/html/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:547
/var/www/html/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:345
/var/www/html/vendor/laravel/dusk/src/Browser.php:261
/var/www/html/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:139
/var/www/html/vendor/laravel/framework/src/Illuminate/Support/Collection.php:418
/var/www/html/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:140
/var/www/html/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:69
/var/www/html/tests/DuskTestCase.php:68
I have used the code below:
Iterable<Module> modules = ImmutableSet.<Module> of(
new SshjSshClientModule());
ContextBuilder builder = ContextBuilder.newBuilder(provider).endpoint(endpoint)
.credentials(identity, credential)
.modules(modules);
System.out.printf(">> initializing %s%n", builder.getApiMetadata());
ComputeService compute = builder.buildView(ComputeServiceContext.class).getComputeService();
System.out.println(compute1.listImages());
but I am getting the following error message.........
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 787
at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.readAndBuild(NullFilteringTypeAdapterFactories.java:92)
The code was working... before...
You've definitely hit a bug somewhere between the version of jclouds you're using and whatever version of whatever cloud you're using. We'll need more information to fix this. Please go through the instruction on how to Report a Bug to Apache jclouds.
I get
Unhandled exception at 0x004687b4 in D3DTest.exe: 0xC0000005: Access violation reading location 0x00000000.
the error is at:
m_d3dDevice->CreateIndexBuffer(sizeof(short)*CHUNK_PRIMITIVES*3,D3DUSAGE_WRITEONLY, D3DFMT_INDEX16, D3DPOOL_MANAGED, &m_ib, NULL);
Now I checked m_d3dDevice and it's all OK,everything works properly if I don't create the buffer.
m_ib is also propery created before being used in that function:
LPDIRECT3DVERTEXBUFFER9 m_vb;
m_vb = NULL;
I don't think anything else could be causing the problem.I'm confused.
Try enabling the debug runtime from the DirectX control panel that will show you warnings and errors if you have any and always check the return codes from DX functions.
Showing the code for the whole function that creates the index buffer would help too.
I have several viewControllers controlled by a navigation controller.
For example, viewController A and viewController B can both push viewController C into the navigation stack and ask C to do some saving (actually means the same to C).
in the saving method of C, the last line of code is
[self.navigationController popViewControllerAnimated:YES];
But problem is,
If I push to C from A, after I save something and pop back to A, things goes well.
But if I push C to from B, after I do the same thing and pop back to B, app crashes,
with my debugging, I found that app crashed not in C's code,
but after B's viewWillAppear method, here I mean after, B correctly runs all of the codes in viewWillAppear,
but then crashes somewhere I don't know how to trace to.
and the Error is very strange to me:
2012-02-13 00:29:30.975 EasyWallet[43116:707] *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '*** -[__NSCFConstantString stringByAppendingString:]: nil argument'
*** First throw call stack:
(0x344268bf 0x346761e5 0x344267b9 0x344267db 0x35d72121 0x2ce7b 0x2ba75 0x3782f9cb 0x3782eaa9
0x3782e233 0x377d2d4b 0x3438522b 0x34f16381 0x34f15f99 0x34f1a11b 0x34f19e57 0x34f11d85
0x343fab4b 0x343f8d87 0x343f90e1 0x3437c4dd 0x3437c3a5 0x30c00fcd 0x377fd743 0x2179 0x2138)
terminate called throwing an exception(gdb)
I just don't know how to fix it.
While dealing with number of viewControllers and views, it happens that frequent crashes occurs. I also had same problem when not using ARC. At that time i found the best way out is using following link to get into exact crash. The only thing is you need to carefully analyzed the result at console and should judge it better way...
http://www.cocoadev.com/DebuggingAutorelease.html