Page 1 of 2
TeeChart for Xamarin.iOS does not compile/run on real device
Posted: Tue Apr 23, 2013 5:58 pm
by 17264961
Hi, I'm trying to deliver to our clients an application with TeeChart that runs perfectly on Simulator but fails on a real device.
When compiling, if I don't change linker options to "Don't link" (and then app become bigger) it gets a compilation error.
Then, with "Don't link" when I run it on device (on Simulator it's ok), I get:
System.ExecutionEngineException: Attempting to JIT compile method 'Steema.TeeChart.Styles.SeriesCollection:.ctor (Steema.TeeChart.Chart)' while running with --aot-only. See
http://docs.xamarin.com/ios/about/limitations for more information.
at Steema.TeeChart.Chart.initVars () [0x00000] in <filename unknown>:0
at Steema.TeeChart.Chart..ctor () [0x00000] in <filename unknown>:0
at Steema.TeeChart.TChart..ctor () [0x00000] in <filename unknown>:0
at MyApp.FormProdutividadeRX.CarregaGrafico () [0x00021] in /Users/karl/Projects/MyApp/MyApp.iPad/FormProdutividadeRX.xib.cs:92
at MyApp.FormProdutividadeRX.webBrowserRelatorio_ShouldStartLoad (MonoTouch.UIKit.UIWebView webView, MonoTouch.Foundation.NSUrlRequest request, UIWebViewNavigationType navigationType) [0x0018f] in /Users/karl/Projects/MyApp/MyApp.iPad/FormProdutividadeRX.xib.cs:74
at MonoTouch.UIKit.UIWebView+_UIWebViewDelegate.ShouldStartLoad (MonoTouch.UIKit.UIWebView webView, MonoTouch.Foundation.NSUrlRequest request, UIWebViewNavigationType navigationType) [0x0000d] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIWebView.g.cs:589
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
at MyApp.Application.Main (System.String[] args) [0x00033] in /Users/karl/Projects/MyApp/MyApp.iPad/Main.cs:37
How can this be corrected? I'm using latest Xamarin Studio, Xamarin.iOS, Mono framework and MacOS 10.8.3. The only difference between this version and the on in components page at Xamarin Component website is the version number. I don't know if the version available there has some correction or not, because this version isn't available at Steema download page.
Thanks,
Karl
Re: TeeChart for Xamarin.iOS does not compile/run on real device
Posted: Wed Apr 24, 2013 8:50 am
by 10050769
Hello Karl,
I recommend you download the last version of TeeChartMonoTouch in our
customer download page using your codes, because we incorporated some changes to solve the problem appears for you. When you have installed newest version please, try again if your problem persist.
If you have any problems please let my know.
Thanks,
Re: TeeChart for Xamarin.iOS does not compile/run on real device
Posted: Wed Apr 24, 2013 11:44 pm
by 17264961
Hi Sandra. Thanks for your answer.
To avoid mistakes, I deleted all versions that I tried and downloaded the last version as you suggested. Then when trying to compile a realease version for iPad, the following error message appear:
error MT2002: Failed to resolve "System.Boolean System.Type::op_Inequality(System.Type,System.Type)" reference from "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"
That is the same problem. If I compile it with "no link" then it compiles but fails at execution time with the message in earlier post.
Re: TeeChart for Xamarin.iOS does not compile/run on real device
Posted: Thu Apr 25, 2013 9:23 am
by Pep
Hi Karl,
I think this error appears if you don't have any "Deployment target" assigned to the project.
Try to go to project -> options -> iOS Application -> Summary and set one deployment target, "3.1" for example.
Are you ble to run the TChartFeatures demo (included into the installer) ? I've been doing some tests here and all is working fine (simulator and device) having as "Linker behaviour" to "link sdk assemblies only".
Please let me know if you still having problems and we'll try to find how to fix it.
Re: TeeChart for Xamarin.iOS does not compile/run on real device
Posted: Thu Apr 25, 2013 12:51 pm
by 17264961
Hi Pep.
Looking that configurations it is configured to 4.3. I tried now: 5.0, 5.1, 6.0, 6.1, 4.0, 3.1 and without it. All of them with the same error message.
I tried some samples while developing on MonoDevelop but just in simulator. It compiled and executed ok.
Now I tried TChartFeatures demo (to try to compile I did things like upgrade from MacOS 10,7 to 10,8, MonoDevelop to Xamarin Studio), on simulator it compiled but shown a message:
Cannot execute "[path for application]"
On device it doesn't compiled, with same message:
error MT2002: Failed to resolve "System.Boolean System.Type::op_Inequality(System.Type,System.Type)" reference from "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"
Re: TeeChart for Xamarin.iOS does not compile/run on real device
Posted: Thu Apr 25, 2013 1:16 pm
by Pep
Hi Karl,
ok, I'm going to test the installer again with a clean installation and let you know something. In meantime you could get an alder installer, available at the customer download page.
Re: TeeChart for Xamarin.iOS does not compile/run on real device
Posted: Thu Apr 25, 2013 1:19 pm
by 17264961
About don't run in simulator it was uTorrent conflicting with Xamarin Studio... Closing it let Xamarin Studio to open simulator and run samples (and my apps).
Making some tests again (since here was a bit confusing on what things were made and tested on MonoDevelop or on Xamarin Studio...)
When running my app with SDK Assemblies Only on Simulator, it's not compiling, with a message:
error MT2002: Failed to resolve "System.Boolean System.Type::op_Inequality(System.Type,System.Type)" reference from "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"
When running with "dont' link", it run but when it founds a "chart.Series.Add (bar1);" it causes an exception:
Method not found: 'System.Type.op_Equality'.
Now running TChartFeatures demo:
- With Don't Link: Compile and run but when "tap" on the first option on menu on line 64 of ChartViewController.xib.cs (chart.Series.Add(series1);) it causes an exception:
Method not found: 'System.Type.op_Equality'.
- With Link SDK Assemblies only: Fails on compilation:
error MT2002: Failed to resolve "System.Boolean System.Type::op_Inequality(System.Type,System.Type)" reference from "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"
The last thing I see on status in top of Xamarin Studio screen is:
Compiling to native code
Building solution TChartFeatures (the error appear here)
The app I'm working on was made on MonoDevelop with old versions of everything. Only TeeChart I succeed to run on weeks ago while developing was on of june/2012 if I'm not mistaking something. But since I changed everything to last versions, that's the actual status of what's happening here. Changed everything because all was made on simulator and to compile to device it failed. Then I upgraded everything.
Re: TeeChart for Xamarin.iOS does not compile/run on real device
Posted: Fri Apr 26, 2013 3:19 pm
by Pep
Hi Karl,
I've been doing some tests here, using the installer available on our web site, and all worked fine here.
I remember to see get this error message time ago moving from MonoDevelop to Xamarin Studio, upgrading projects...
About the "link behaviour" I suggest you left as "Link SDK assemblies only".
Which Xamarin.iOS version are you using ?
Have you tried to create a clean and new project, and then reference to the TeeChart.iOS library ?
Does it compile and work on simulator and device ? And removing the reference ?
If we still having problem I can compile another dll and send it to you so you can test with it. But first of all we should make sure the problem comes from our library.
Thanks !
Re: TeeChart for Xamarin.iOS does not compile/run on real device
Posted: Fri Apr 26, 2013 6:06 pm
by 17264961
For now:
I remember to see get this error message time ago moving from MonoDevelop to Xamarin Studio, upgrading projects...
Well, this was created with MonoDevelop with a version from 2012 I think.
Which Xamarin.iOS version are you using ?
=== Xamarin Studio ===
Version 4.0.4 (build 2)
Installation UUID: ee65eb20-1d81-4d31-91c3-b1025353a7c9
Runtime:
Mono 2.10.12 (mono-2-10/c9b270d)
GTK 2.24.16
GTK# (2.12.0.0)
Package version: 210120000
=== Apple Developer Tools ===
Xcode 4.6.2 (2067,2)
Build 4H1003
=== Xamarin.iOS ===
Version: 6.2.3.0 (Enterprise Edition)
Hash: 8d98f5e
Branch:
Build date: 2013-10-04 14:08:06-0400
=== Xamarin.Mac ===
Xamarin.Mac: Not Installed
=== Xamarin.Android ===
Version: 4.6.4 (Enterprise Edition)
Android SDK: /Developer/android-sdk-mac_86
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8 )
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
4.0.3 (API level 15)
Java SDK: /usr
=== Build Information ===
Release ID: 400040002
Git revision: a8bf58d398a13bcc7595f5f85adae04865a834d4
Build date: 2013-04-17 16:35:47+0000
Xamarin addins: f24db65837464cb72995ce5e84fa62fb0069724c
=== Operating System ===
Mac OS X 10.8.3
Darwin MacBook-Pro-de-Karl.local 12.3.0 Darwin Kernel Version 12.3.0
Sun Jan 6 22:37:10 PST 2013
root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
Have you tried to create a clean and new project, and then reference to the TeeChart.iOS library ?
Does it compile and work on simulator and device ? And removing the reference ?
Not yet, will try today.
If we still having problem I can compile another dll and send it to you so you can test with it. But first of all we should make sure the problem comes from our library.
Ok, thanks
Karl
Re: TeeChart for Xamarin.iOS does not compile/run on real device
Posted: Sat Apr 27, 2013 2:04 am
by 17264961
Hi Pep,
I created a new project "Single View" for iPad.
Compiled as it came to the world and run.
Add reference to the TeeChart.iOS.dll from folder TeeChartNETMonoTouch_v4_13_04_05 and run ok.
Then I altered ViewDidLoad() with that:
Code: Select all
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
// Perform any additional setup after loading the view, typically from a nib.
Double qt;
TChart chart = new Steema.TeeChart.TChart();
RectangleF frame = new RectangleF (0, 0, this.View.Frame.Width, this.View.Frame.Height);
chart.Frame = frame;
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar();
bar1.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Value;
chart.Series.Add (bar1);
}
And run. The error occurred again exactly on "chart.Series.Add (bar1);" like demo and my app:
Method not found: 'System.Type.op_Equality'.
Karl
Re: TeeChart for Xamarin.iOS does not compile/run on real device
Posted: Sun Apr 28, 2013 12:12 pm
by Pep
Hi Karl,
it's a strange behaviour.
I've tried with a clean installation, using the latest updated versions of OSX and Xamarin, with the available installer of the TeeChart v4_13_04_05 and all is working fine here.
Here is my configuration :
Xamarin Studio
Version 4.1.0 (build 45)
Installation UUID: 730e1282-fa39-42d9-b370-78b0e5b89045
Runtime:
Mono 3.0.10 ((no/eff4cb5)
GTK 2.24.18
GTK# (2.12.0.0)
Package version: 300100000
Xamarin.Android
Version: 4.7.4 (Starter Edition)
Android SDK: /Users/pepjorge/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8 )
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
Java SDK: /usr
Apple Developer Tools
Xcode 4.6.1 (2067)
Build 4H512
Xamarin.iOS
Version: 6.3.4.36 (Business Edition)
Hash: 9eb42f8
Branch:
Build date: 2013-11-04 10:49:08-0400
Xamarin.Mac
Xamarin.Mac: Not Installed
Build Information
Release ID: 401000045
Git revision: 33f011263cd7ec136e1d42f2209ea5702a023db3
Build date: 2013-04-11 23:25:21+0000
Xamarin addins: 202128d30a960c61706608e750bd437a6d83535b
Operating System
Mac OS X 10.8.3
Darwin MacBook-Pro-de-PEP.local 12.3.0 Darwin Kernel Version 12.3.0
Sun Jan 6 22:37:10 PST 2013
root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
Could you please try to download again the latest TeeChart for Xamarin.iOS from our web site and try (just to test the file is not corrupted) and try it again.
In the case the proble still there I will send a private message with the .dll I'm using.
Re: TeeChart for Xamarin.iOS does not compile/run on real device
Posted: Sun Apr 28, 2013 1:33 pm
by 17264961
Hi Pep.
I noticed that you are using beta version of Mono 3.0.10 and I'm on stable 2.10.12. This could be important. Also you're with Xamarin.iOS 6.3.4.36 and I with 6.2.4.2 (downloaded today).
Is there a possibility for you to try with Mono 2.10.12? HEre I just have one Mac.. so I don't know if I can go to beta Mono 3 to try without compromise production things...
Thanks,
Karl
Re: TeeChart for Xamarin.iOS does not compile/run on real device
Posted: Sun Apr 28, 2013 2:19 pm
by Pep
Hi Karl,
ok, I'll give a try on another machine with the Mono 2.10.12.
The Xamarin version shouldn't be a problem, as I did tests before the update and all was working fine.
I'll let you know the results tomorrow, as I don't have another machine here.
Have you tried to download it again ? just to be sure that is the last update and that we're using the same files.
Re: TeeChart for Xamarin.iOS does not compile/run on real device
Posted: Mon Apr 29, 2013 9:37 am
by Pep
Hi Kark,
finally, I've been able to reproduce the problem ! As you said the Mono version seems to be very relevant. As the TeeChart library have been compiled with the latest beta version of Mono, this makes to appear that error.
I'm going to update the installers on out web site. Meanwhile I'm going to send to you directly the new dll as you can continue you work.
Thanks, and apologies for the wasted time with the tests.
Re: TeeChart for Xamarin.iOS does not compile/run on real device
Posted: Mon Apr 29, 2013 10:08 am
by Pep
Karl,
just let you know that I've updated the installers on our web site. Please download the same version again, which comes with the new compiled dll.