Bug 31076 - OxyPlot doesn't show chart when using "ARMv7+ARM64" and no debug info
Summary: OxyPlot doesn't show chart when using "ARMv7+ARM64" and no debug info
Alias: None
Product: Components
Classification: Xamarin
Component: Xamarin Components ()
Version: Production (addons.xamarin.com)
Hardware: Macintosh Mac OS
: High major
Target Milestone: ---
Assignee: Matthew Leibowitz
Depends on:
Reported: 2015-06-12 13:56 UTC by Robert Miles
Modified: 2016-11-20 18:24 UTC (History)
11 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 for Bug 31076 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Robert Miles 2015-06-12 13:56:12 UTC
In recent days, I noticed an issue with the OxyPlot plugin that used to work, but now doesn't in a certain scenario. When launching via the simulator, the chart seems to always show. However, when deploying to device, it only shows in certain configurations. In particular, my tests show...

=> "Link SDK" + Check "Enable Developer Instrumentation" + "ARMv7"
=> "Link SDK" + Check "Enable Developer Instrumentation" + "ARM64"
=> "Link SDK" + Check "Enable Developer Instrumentation" + "ARMv7 + ARM64"
=> "Link SDK" + Uncheck "Enable Developer Instrumentation" + "ARMv7"
=> "Link SDK" + Uncheck "Enable Developer Instrumentation" + "ARM64"

Doesn't Work:
=> "Link SDK" + Uncheck "Enable Developer Instrumentation" + "ARMv7 + ARM64"

I created a test project that shows the issue. See the attachment.

I also found more people having the issue via the discussion at https://github.com/oxyplot/oxyplot/issues/492

My current setup is:
Xamarin Studio 5.9.4
Xamarin iOS
Xamarin Forms
Comment 1 Robert Miles 2015-06-12 13:58:42 UTC
Example app attachment was too big...download it from:

Comment 2 Bill Holmes 2015-06-15 17:59:00 UTC
I am thinking that it would be better to file this bug with the Oxyplot GitHub repository.


However I am leaving it open for Matthew to evaluate if there is something that we can do on our end.
Comment 3 Robert Miles 2015-06-15 20:10:17 UTC
As stated in my original request, this has already been submitted and discussed on the OxyPlot issues. I posted here because it seemed to lean in a Xamarin direction given that it works in 5 of those 6 scenarios of build settings.

Do you have an idea/direction of what you think in OxyPlot it could be that wouldn't make it work?
Comment 4 Hippolyte Barraud 2015-06-18 12:10:59 UTC
I'm reporting the same problem.
Any FAT configuration for release will make PlotModel not rendered.
(Except if you're not linking at all)
It has been reported through the issue on Github that prior to Xamarin.iOS 8.9.1 (Apr 13, 2015) and Xamarin Studio 5.8.3 (Apr 14, 2015), it worked fine.

Comment 5 Matthew Leibowitz 2015-06-23 21:47:32 UTC
Just wanted to confirm that this can be reproduced.

When "ARMv7 + ARM64", the chart does not show.
When "ARM64", the chart is there

This seems to be something with the linker. I added this line to the AppDelegate:
    new global::OxyPlot.Xamarin.Forms.Platform.iOS.PlotViewRenderer();
Then, the chart displays.
I cracked open the final .app files and as far as I can see, the renderer is there for both configurations.

I don't think this has to do with OxyPlot.
Comment 6 Vassil 2015-08-11 11:15:44 UTC
  I am also hit by this bug. My linker options are "Don't link". I am not sure how to apply the suggested workaround. I tried and I get this error: AppDelegate.cs(62,62): Error CS0012: The type `OxyPlot.Xamarin.iOS.PlotView' is defined in an assembly that is not referenced. Consider adding a reference to assembly `OxyPlot.Xamarin.iOS, Version=2015.1.889.0, Culture=neutral, PublicKeyToken=null' (CS0012) (EuromedApp.iOS)

IIUC it tells me to install the OxyPlot.Xamarin.iOS, which in turn is incompatible with OxyPlot.Xamarin.

To recap: it looks an important issue to be looked at.

I'd be happy to try other workarounds!
Comment 7 Simon Taylor 2015-08-14 02:40:53 UTC
I had an issue with a time series chart displaying in the simulator but not on the device.

In OxyPlot.Axes.DateTimeAxis.CalculateActualInterval() there is the code below. The check "Math.Abs(nextInterval) < double.Epsilon" was failing if nextInterval was zero, so the loop never terminated. Changing it to "nextInterval == 0 || Math.Abs(nextInterval) < double.Epsilon" fixed the problem. Not sure if this is the same issue.

            var goodIntervals = new[]
                                        Second, 2 * Second, 5 * Second, 10 * Second, 30 * Second, Minute, 2 * Minute,
                                        5 * Minute, 10 * Minute, 30 * Minute, Hour, 4 * Hour, 8 * Hour, 12 * Hour, Day,
                                        2 * Day, 5 * Day, Week, 2 * Week, Month, 2 * Month, 3 * Month, 4 * Month,
                                        6 * Month, Year

            double interval = goodIntervals[0];

            int maxNumberOfIntervals = Math.Max((int)(availableSize / maxIntervalSize), 2);

            while (true)
                if (range / interval < maxNumberOfIntervals)

                double nextInterval = goodIntervals.FirstOrDefault(i => i > interval);
                if (Math.Abs(nextInterval) < double.Epsilon)
                    nextInterval = interval * 2;

                interval = nextInterval;
Comment 8 Simon Taylor 2015-08-17 23:28:20 UTC
I'm having all my charts appear on the simulator (iPhone 5 and iPhone 5s) and on an iPhone 5 device, but none are appearing on an iPhone 5s device. The user with the iPhone 5s isn't local, I'll have to wait until I get my hands on his device to investigate further.
Comment 9 Simon Taylor 2015-08-17 23:29:31 UTC
I've tried adding a reference to the OxyPlot.Xamarin.Forms.Platform.iOS.PlotViewRenderer class in AppDelegate.cs with no effect.
Comment 10 Simon Taylor 2015-08-18 22:36:19 UTC
Looking in ILSpy Microsoft's compiler seems to optimise away the type reference if it's an unused dummy variable as suggested on the forums. Adding it as a public static field in the AppDelegate class worked for me.
Comment 11 Fabien Molinet 2015-10-09 17:47:24 UTC
We got the same issue in our Xamarin Forms Custom Renderer for FFImageLoading.
We fixed it with Matthew Leibowitz suggested fix (thanks for it!).

Therefore this is still a big issue. People that are unaware of the fix can lost hours on this.
Comment 12 softlion 2016-11-20 18:24:26 UTC
+1 with XamSvg