Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7797613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:44:27+00:00 2026-06-01T23:44:27+00:00

I have a strange problem where MonoTouch seems to be either not compiling methods

  • 0

I have a strange problem where MonoTouch seems to be either not compiling methods or not able to find a compiled method it is instructed to call, and only on the device in the Release configuration – Debug builds are fine. I’ve tried reproducing it with a simpler code sample with no luck, so I doubt you will be able to see the behavior with the code below. But this is essentially what I’m doing:

using System;
using MonoTouch.UIKit;

public class MyClass
{
    private UINavigationController _navController;
    private UIViewControler _viewController;

    public UINavigationController NavController
    {
        get
        {
            if (_navController == null)
            {
                if (_viewController == null)
                {
                    _viewController = new UIViewController();
                }
                _navController = new UINavigationController(_viewController);
            }
            return _navController;
        }
    }
}

Then, in some other method…

public void SomeMethod()
{
    MyClass myClass = new MyClass();
    var navController = myClass.NavController; // <-- This is where it throws
}

The exception I get is the standard JIT compile message, saying that it attempted to JIT get_NavController(). I find this very strange, because there’s no virtual generics, no LINQ, the linker is off, and nothing else that normally causes JITs seems to be involved. I’ve also verified that it will throw for other methods and properties defined on MyClass, but not the constructor or System.Object inherited methods. Reflection reveals that myClass.GetType().GetMembers() has a MemberInfo for everything I would expect. Yet, only for Release|iPhone, I can’t access these methods or properties. The only logical conclusion I can come to is that the aot compilation step is missing them, and I don’t know why that would happen at all, let alone only in the Release configuration.

My question is, what could be causing such a situation, and what is the next step to fixing it? I’m not even sure where to go from here on debugging this, or what to file a bug about, because I can’t reproduce it out of the context of our (much) larger project.

Update: The exact exception text was requested.

System.ExecutionException: Attempting to JIT compile method
'MyNamespace.MyClass.get_NavController ()' while running with --aot-only
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T23:44:29+00:00Added an answer on June 1, 2026 at 11:44 pm

    This doesn’t look like something that can be solved here.

    I suggest filing a bug, and attach the entire project if you’re unable to make a smaller test case. You can file private bugs only Xamarin employees have access to if you don’t want your project to be publicly visible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange problem that I could not solve. When I try to
Have a strange problem in that I have a Rake task that seems to
I have strange problem. When I use @return Model\Article in the model-loading method then
I have a strange problem with a method is called each time a button
I have some strange problem with PIL not resizing the image. from PIL import
I have strange problem when using at() method of std::string. I'd like to calculate
I have searched and searched and couldn't find the answer. I have strange problem,
i have strange problem doing reporting: i have numerous clients with different issued invoices.
I have strange problem with receiving data from socket. On client im using air
I have a strange problem with lxml when using the deployed version of my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.