Crosshair causing crash (Shinobicontrols Chart) - 'CALayerInvalidGeometry' - ios

I am getting crash when using Crosshair enable. I have tried a lot to find out the solution but failed. Please see issue the below.
The Issue is: The chart is creating fine. But If I use the below lines for crosshair enable, mainly the second line below then I am getting crash. Initially it is fine, when I am tapping and drag it for move then App crashing.
lineSeries.style.pointStyle.showPoints = YES;
lineSeries.crosshairEnabled = YES;
lineSeries.selectionMode = SChartSelectionPoint;
Crash message:
reason: 'CALayer position contains NaN: [559 nan]'

Disclaimer: I work for ShinobiControls.
After some investigation we found this to be an issue with our crosshair's interpolation code that positions the crosshair between two datapoints.
A work around solution to prevent this crash would be to turn off point interpolation on your crosshair by using the following code:
chart.crosshair.interpolatePoints = NO;
This issue has been added to our backlog and a member of our team will update this answer when the fix for this issue has been released.
Update: ShinobiCharts version 2.8.0 contains a fix for this problem - I hope that helps!

Related

MapBox SearchUI breaking when displaying Search Results

So I've worked on this App which should display a map, add annotations on coordinates found by Mapbox SearchUI, and start Navigating there when requesting it. It all worked fine until I opened xcode and tried to build today. I have the impression that MapBox updated Mapbox SearchUI (I am calling pod 'MapboxSearchUI', ">= 1.0.0-beta", "< 2.0" and it seems like XCode then uses 1.0.0-beta.2). Everything still works except one breaking thing: when trying to search stuff in the searchUI search bar, the app cant display the results, resulting in a timeout.
2021-10-13 13:51:15.300321+0200 APP[10454:5269100] [LayoutConstraints] Changing the translatesAutoresizingMaskIntoConstraints property of a UITableViewCell that is managed by a UITableView is not supported, and will result in incorrect self-sizing. Cell: <MapboxSearchUI.SearchSuggestionCell: 0x1138f7000; baseClass = UITableViewCell; frame = (0 0; 442 68); clipsToBounds = YES; autoresize = RM+BM; layer = <CALayer: 0x280d99980>>
2021-10-13 13:51:15.300463+0200 APP[10454:5269100] *** Assertion failure in -[MapboxSearchUI.SearchSuggestionCell _setHostsLayoutEngine:], NSLayoutConstraint_UIKitAdditions.m:3806
2021-10-13 13:51:15.301220+0200 APP[10454:5269100] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Must translate autoresizing mask into constraints to have _setHostsLayoutEngine:YES.'
Seems like XCode has trouble with MapBox's Layout for the results. This explains why searching from shortcuts such as Gas stations work fine since they don't need to display search results in the searchUI, doing it on the map instead.
Does anyone know how to work around this? Or is there a way to know what version exactly I was using a few weeks back? The weird thing is that I did not update the pods or mess with other parts of the project. It was on hold there and now it won't work anymore.
Thanks!
I've recently come across the same error message (and visual effect) in a codebase which does not use MapBox. The error started to occur only when the project was built using Xcode 13/iOS 15 instead of Xcode 12/iOS 14 (which was used before). The error only occurred on simulators/devices running iOS 15, not on iOS 14.
The codebase was, as the error message suggests, setting the translatesAutoresizingMaskIntoConstraints = false in multiple UITableViewCell's awakeFromNib() methods. Removing the line caused the error message to disappear and the contents to be displayed correctly on both, iOS 14 and iOS 15.
In your case, this will likely have to be addressed by the team at MapBox and a new SDK version would have to be provided including the change.

App crashes with [ServicesDaemonManager] interruptionHandler is called. -[FontServicesDaemonManager connection]_block_invoke

My App crashes randomly with this error:
[ServicesDaemonManager] interruptionHandler is called.
-[FontServicesDaemonManager connection]_block_invoke
(didReceiveMemoryWarning fires before the error message)
It is a bit hard to post code because of the randomness.
I use SwiftUI (UIHostingController), #ObserverObjects, async network calls, transitions to other views, etc.
It all works fine most of the time but sometimes i ran into this error.
The memory is then increasing constantly until the app crashes.
I tried to fix all possible memory leaks (to deallocate all images, [weak self], ...)
didn't help.
I'am not sure what the FontServicesDaemonManager is doing and in what way it is involved but all fonts are using the system font:
.font(Font.system(size: 25 , weight: .regular))
Sometimes also this error appears right after the one from obove:
-[UIWindow endDisablingInterfaceAutorotationAnimated:] called on <UIWindow: 0x10aab11a0; frame = (0 0; 375 812); gestureRecognizers = <NSArray: 0x10acb2510>; layer = <UIWindowLayer: 0x10aacbee0>> without matching -beginDisablingInterfaceAutorotation. Ignoring.
Anyone ran into similar issues or has an idea how to fix this?
(Xcode 11.6)
Update:
This problem is usually related to Autolayout constraints. Please check your constraints of all related views.
Hope you got the answer, I am here describing my scenario:
I got the same error with Xcode 11.6, the issue was I had enabled the zoombie object on scheme & it was creating [ServicesDaemonManager] interruptionHandler. So please check it. Reason behind memory warning was loading of high resolution images on mail thread which was not good. Adding download image in background thread worked for me.
Thanks,
Ratneshwar
This problem is usually related to constraints, there must be some ambiguity with your constraints, that's why you are getting this error.
Had the same issue with one of my collection views, because the constraints were not properly set for smaller screens. Check the constraints again and you will be good to go.
The problem i had was related to Autolayout and some constraints that did work for fullscreen for a specific view. I changed the Autolayout constraints and since then i had no crashes related to this issue anymore..

How do I resolve this error: "SKView: ignoreRenderSyncInLayoutSubviews is NO"? [duplicate]

When running my SwiftUI & SpriteKit app, I get the following messages in the logs:
2019-11-18 21:58:57.631912+0000 PixelBattles[2812:1215803]
SKView: ignoreRenderSyncInLayoutSubviews is NO. Call _renderSynchronouslyForTime without handler
What am I doing wrong to receive this log, and should I worry about it? Could it be a bug?
Could it be that SwiftUI cannot figure out how to do the layout for an SKView?
Major edit:
If you need code, you can see it in the previous edits. Below I state why I don't think it is any longer relevant.
I have sent Apple some feedback (FB7456217). I have removed the code, as I no longer suspect it is an issue to do with my code. I created a blank game project, no SwiftUI, and still got the same warning log instantly.
So even with the default project template, the log still appeared for device and simulator. I will update on this issue if I get a useful response.
I still haven't heard anything back - has anyone got any new information since when I posted this over half a month ago? I still have these warnings!
This is Apple's response to this issue:
Hi! You don't really need to fix that. That's a log message that was
left by mistake in SpriteKit framework. It was removed and will no
longer appear in the future SpriteKit versions. Thanks!
just figured this out for myself.
In your code change
if let scene = SKScene(fileNamed: "GameScene")
to
if let scene = GameScene(fileNamed: "GameScene")
I believe you'll also get this warning if you have UIKit subviews of the SKView.

Anybody have issues tapping on cells using Xcode7 UITesting?

Anybody having issues tapping on cells where a lot of cells exist? I keep getting the error "Failed to get refreshed snapshot".
I tried using the recorder but that also seems to freeze. I assume it's trying to cache all the cells in the view.
Example: I have cells for each day on a calendar with accessibilityIdentifiers. I have no problems tapping on the cells using the Identifiers with KIF.
Yes, i have. Its about 1 error of 100 tests. Maybe is an apple bug: https://forums.developer.apple.com/thread/6437. I don't know any workarounds :(
A work around would be to tap screen coordinates as mentioned by taylesworth on Apple Developer Forums
Example:
let coordinate = cell.coordinateWithNormalizedOffset(CGVector(0.5, 0.5))
coordinate.tap()

Multiple UIImageViews with same image gives Inconsistency error

I add 3 UIImageView objects to a MainViewController.
For each of them add the same image "test.png".
The images display correctly for each of the controls.
Close the MainViewController and reopen it.
You get an error displayed saying "The MainViewControllre" has 3 internal inconsistencies that were found and repaired.
The details for the message indicates that there are resources with the same name.
Although the images still display correctly and the program executes in the simulator I would like to solve this message.
This seems to be something that was introduced in XCode 5.
Sounds like you might be using StoryBoards for setting these images? I remember hearing about this issue a few months ago. Check out this SO post:
Storyboard Internal Inconsistencies
Seems like it may have been a bug in an early release of Xcode 5. The correctly marked answer here states updating to Mavericks and Xcode 5.0.1 fixed the issue. Also, if this in fact the problem, and you can not update for what ever reason, removing the storyboard references to the images and adding the image to the image view programmatically may solve your issue. Trivial example, but just in case you (or anyone else reading this) doesn't know:
[imageView setImage:[UIImage imageNamed:#"imagename.png"]];

Resources