Bug 40661 - Cocossharp: arm64+LLVM+Schedule(action, float) + release on device+iOS -> Crashes app on schedule call
Summary: Cocossharp: arm64+LLVM+Schedule(action, float) + release on device+iOS -> Cra...
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 9.6 (iOS 9.3)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2016-04-24 18:24 UTC by Erik kvanli
Modified: 2016-07-02 04:10 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Erik kvanli 2016-04-24 18:24:23 UTC

From Issue:

Sample solution made with Cocossharp template:
Changes is only made in the GameLayer class:

Also tried to wrap the Schedule call with a try/catch, but it isn't caught.

Xamarin, Cocossharp Forum:

Comment 1 Sebastien Pouliot 2016-04-25 13:57:43 UTC
I tried the code repo but I got other issues:

* the repo refers to XF but that does not build. I had to downgrade to to get a build;

* executing the app on ARM64 without LLVM crash on startup with:

	Dimensions of native NSAttributedString can not be 0,0
	Parameter name: Native string: (System.ArgumentOutOfRangeException)
	  at CocosSharp.CCLabel.CreateTextSprite (System.String text, CCFontDefinition textDefinition) <0x100c9b260 + 0x0122c> in <filename unknown>:0 
	  at CocosSharp.CCLabel.CreateSpriteWithFontDefinition (CCFontDefinition fontDefinition) <0x100b86578 + 0x00067> in <filename unknown>:0 
	  at CocosSharp.CCLabel.UpdateContent () <0x100b86420 + 0x00137> in <filename unknown>:0 
	  at CocosSharp.CCLabel.Visit (CocosSharp.CCAffineTransform& parentWorldTransform) <0x100b870f0 + 0x00093> in <filename unknown>:0 
	  at CocosSharp.CCNode.Visit (CocosSharp.CCAffineTransform& parentWorldTransform) <0x100b76504 + 0x001f7> in <filename unknown>:0 
	  at CocosSharp.CCLayer.Visit (CocosSharp.CCAffineTransform& parentWorldTransform) <0x100bd9e54 + 0x0021f> in <filename unknown>:0 
	  at CocosSharp.CCNode.Visit (CocosSharp.CCAffineTransform& parentWorldTransform) <0x100b76504 + 0x001f7> in <filename unknown>:0 
	  at CocosSharp.CCNode.Visit () <0x100b7649c + 0x0005b> in <filename unknown>:0 
	  at CocosSharp.CCGameView.Draw () <0x100b6ed24 + 0x000ab> in <filename unknown>:0 
	  at CocosSharp.CCGameView.OnRenderFrame (OpenTK.FrameEventArgs e) <0x100b6fe68 + 0x0007b> in <filename unknown>:0 
	  at CocosSharp.CCGameView.RunIteration (Foundation.NSTimer timer) <0x100b6fe10 + 0x0004b> in <filename unknown>:0 
	  at Foundation.NSTimerActionDispatcher.Fire (Foundation.NSTimer timer) <0x1009b2358 + 0x00013> in <filename unknown>:0 
	  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
	  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) <0x1009a7e88 + 0x0009b> in <filename unknown>:0 
	  at ARM64BugLook.iOS.Application.Main (System.String[] args) <0x1001b43f4 + 0x0001b> in <filename unknown>:0 

Can you double check the repo to make sure it still shows the issue ?

Also include all version* information to make sure we're able to duplicate it.

* The easiest way to get exact version information is to use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version informations (you can use the "Copy Information" button).
Comment 2 Erik kvanli 2016-04-25 20:27:16 UTC
Thanks for your fast feedback.
It is still showing the same issue. Builds locally with version 2.1, but it's still an issue with Xamarin.Forms version 1.5/1.5.1/2.1 which is the ones I've tried.

This solution is a "Cocossharp.Forms Game" template with only changes to the GameLayer class.

All version information:

=== Xamarin Studio Indie ===

Version 5.10.3 (build 51)
Installation UUID: 447836a3-dd90-4b6b-9ea8-007cbbcf935e
	Mono 4.2.3 (explicit/832de4b)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402030004

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.3 (10183.3)
Build 7D175

=== Xamarin.iOS ===

Version: (Xamarin Indie)
Hash: 5f11db8
Branch: master
Build date: 2016-03-25 21:26:55-0400

=== Xamarin.Android ===

Version: (Xamarin Indie)
Android SDK: /Users/erikkvanli/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		5.1 (API level 22)
		6.0 (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

Android Designer EPL code available here:

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Not Installed

=== Build Information ===

Release ID: 510030051
Git revision: f3c0d982165f785772d125f02668370d929014fb
Build date: 2016-03-24 18:51:31-04
Xamarin addins: ee5cfd3ecb6b20de47c1d25efb9a9abc101e8ce7
Build lane: monodevelop-lion-cycle6-c6sr3

=== Operating System ===

Mac OS X 10.11.4
Darwin Eriks-MacBook-Pro.local 15.4.0 Darwin Kernel Version 15.4.0
    Fri Feb 26 22:08:05 PST 2016
    root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64
Comment 3 Erik kvanli 2016-05-18 21:05:31 UTC
Hi, do you need any more information?
Comment 4 Erik kvanli 2016-05-25 15:29:40 UTC
Hi, would really need help in this field, since it's the only reason my app isn't published..

Is there anything else I could provide?
Comment 5 Sebastien Pouliot 2016-05-25 18:57:36 UTC
Your crash could not be duplicated initially. There's likely something that differed between your setup and ours (might have been the XF issue but could be something else too).

To remove such possibilities please attach a self-contained test case that does not have external dependencies. E.g. Extra components should be removed (smaller test case) whenever, but it they can't be removed please make sure they are part of the attached test case.

Also you might want to try the 9.8 beta (RC3 is out) as it might already have a fix or, if a fix is needed, it will be part of a newer build of 9.8.x.
Comment 6 Alex Soto [MSFT] 2016-07-02 04:10:06 UTC
We have not received the requested information. If you are still 
experiencing this issue please provide all the requested information 
and re-open the bug report. Thanks!