Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CALayerInvalidGeometry #13

Closed
EriolGaurhoth opened this issue Jul 1, 2016 · 7 comments
Closed

CALayerInvalidGeometry #13

EriolGaurhoth opened this issue Jul 1, 2016 · 7 comments

Comments

@EriolGaurhoth
Copy link

Whenever I pop the current source into Xcode and compile to run on my 9.7" iPad Pro (running iOS 9.3), I get the following error:

"Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'"

The error points to the main line of code: return UIApplicationan(argc, argv, @"MNVMApplication", NSStringFromClass([AppDelegate class]));; and gives a SIGABRT signal at Thread 1.

When I run the code in an iPad Air 2 simulator, it works perfectly. I'm not sure if this is a bug specific to the iPad Pro or if I've done something wrong. Please advise.

@zydeco
Copy link
Owner

zydeco commented Jul 1, 2016 via email

@EriolGaurhoth
Copy link
Author

Immediately upon launch. It should also be noted that these error warnings appear immediately before the exception:

Error loading /var/containers/Bundle/Application/1C4255AF-8FD8-4828-8157-0D8876F98A19/Mini vMac.app/PlugIns/MacPlus4M.mnvm/MacPlus4M: dlopen(/var/containers/Bundle/Application/1C4255AF-8FD8-4828-8157-0D8876F98A19/Mini vMac.app/PlugIns/MacPlus4M.mnvm/MacPlus4M, 265): no suitable image found. Did find:
/var/containers/Bundle/Application/1C4255AF-8FD8-4828-8157-0D8876F98A19/Mini vMac.app/PlugIns/MacPlus4M.mnvm/MacPlus4M: mmap() errno=1 validating first page of '/var/containers/Bundle/Application/1C4255AF-8FD8-4828-8157-0D8876F98A19/Mini vMac.app/PlugIns/MacPlus4M.mnvm/MacPlus4M'

@zydeco
Copy link
Owner

zydeco commented Jul 1, 2016

d1a0721 fixes the crash, but not the underlying problem of the bundle (which contains the code to emulate the machine) not being loaded, I'm not sure why this could happen.

Have you tried to archive, export the ipa from the archive (using export for development deployment) and install that (from Xcode's devices window, or with iTunes)?

@EriolGaurhoth
Copy link
Author

I have not tried exporting yet, though I did notice something odd with the emulated machine code, under "general" for the MacPlus4M, it tells me that Xcode failed to parse the contents of info.plist, and lists no linked frameworks and libraries. I will have to check later to see if my version of info.plist is somehow corrupted. Thanks for fixing the big crash!

@zydeco
Copy link
Owner

zydeco commented Jul 3, 2016

Xcode failed to parse the Info.plist because it had some placeholder values that were inserted by the preprocessor, but I've changed the way it's done in 08cfcc6, and now it builds correctly with Xcode 8 beta.

You may also have to set a Team for each of the framework targets, under General and Identity

@EriolGaurhoth
Copy link
Author

EriolGaurhoth commented Jul 4, 2016

I think my issue is either with my Team account or provisioning profile, for when I tried to export the ipa, I couldn't get any Dev Team to show up in my dropdown. (as an aside, probably in no way related, trying to download dSYMs completely crashes my Xcode...for reference, I'm using Xcode 7.3)

There's probably some issue on my end at this point, not the code, because now the thread dies at [self.view addSubview:shutdownLabel]; in ViewController.m with an EXC_BAD_ACCESS error, resulting from the fact that it's not loading any Objective-C class information. It's also still not loading the MacPlus4M module, in spite of setting my proper team account for it and the other frameworks.

Thanks for the help!

@EriolGaurhoth
Copy link
Author

UPDATE There was an issue with my provisioning profile that I fixed, and now everything compiles and runs correctly. However, every so often the app will stop working, crashing immediately when opened. Uninstalling, recompiling and reinstalling fixes this, but I'm not sure what could be causing this behavior. Otherwise, it runs great!

@zydeco zydeco closed this as completed Jul 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants