iOS app crashes when dimissing trial popup

1 Answer 36 Views
CollectionView
Luis
Top achievements
Rank 1
Luis asked on 18 Feb 2025, 02:23 PM | edited on 21 Feb 2025, 11:42 AM

I'm trialing telerik maui controls and got this issue specific to iOS.
The app launches, an alert dialog injected by telerik is shown with the "this is a trial" information.
when dismissing the alert, the app crashes:

[0:] An error occurred: 'Object reference not set to an instance of an object.'. Callstack: '   at Telerik.Maui.Controls.TelerikLicense.<>c__DisplayClass12_0.<ShowLicenseMessage>b__1()

any ideas?
it works fine on windows and android, just iOS keeps failing and stopping me from validating telerik controls.

 

####EDIT####

I've managed to reproduce this issue on a separate project.

  • Created a new default maui project in visual studio for windows.
  • added the telerik trial 10.0 package, updated maui to 9.0.40
  • Added a new blank ContentPage called Loading.xaml. changed nothing on it.
  • In app.xaml.cs, modified the `CreateWindow method to `return new Window(new Loading());` as we're not using Shell.
  • Added another new ContentPage called PageWithTelerik.xaml
  • on that page, simply added a telerik RadButton, which should trigger the trial popup.
    • <telerik:RadButton x:Name="button" Text="Click me!" />
  • back on app.xaml.cs, overridden the OnStart() method:
        protected override void OnStart()
        {
            var mainPage = Application.Current.Windows[0].Page;

            if (mainPage is Loading)
            {
                Page target = new PageWithTelerik();

                MainThread.BeginInvokeOnMainThread(() => { Application.Current.Windows[0].Page = target; });
            }
        }

if you then run this app, it'll:

  1. get to PageWithTelerik
  2. display the trial popup (but the watermark that is usually is shown behind the popup is not visible!)
  3. crash with a null reference exception when you dismiss the popup.
Didi
Telerik team
commented on 19 Feb 2025, 05:45 PM

Hi Luis,

I tested the scenario and cannot reproduce the exception. These are the steps I did:

1. Downloaded  the .pkg file of the Telerik MAUI 10.0.0 trial version from my Telerik account

2. Installed the .pkg

3. Opened the SDK Browser app in visual studio code for mac

4. Build and run on MacCatalyst - the app works as expected when I close the trial popup

5. Build and run on iOS - same, the app works when closing the trial popup message.

Images are attached.

Let me know what are the steps you use to reproduce the behavior? Also send a sample app and the full stack-trace of the exception.

Stephen
Top achievements
Rank 1
commented on 20 Feb 2025, 05:26 PM | edited

I'm experiencing the same issue, but on an Android device using Telerik MAUI 10.0.0 trial version.

The moment I dismiss the Trial Info popup, an exception is thrown and the app crashes.

Exception:

System.ObjectDisposedException
  Message=Cannot access a disposed object.
Object name: 'AndroidX.CoordinatorLayout.Widget.CoordinatorLayout'.
Luis
Top achievements
Rank 1
commented on 21 Feb 2025, 09:02 AM | edited

I've now noticed that sometimes this also fails on Android (got a crash report) although it mostly works without issue. On iOS it fails pretty much every time.

System.NullReferenceException: Object reference not set to an instance of an object
  ?, in void TelerikLicense.ShowLicenseMessage(Page page)+() => { } [1]
  ?, in void RunnableImplementor.Run()
  ?, in void IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this)

I'm sorry - I don't have a sample repro yet. What I can say is that this seems to fail when running a local build from visual studio 2022. builds that come from the build agent as part of the proper pipeline don't seem to show the licensing popup (which is weird) and as the popup isn't displayed, you can't dismiss it to trigger the crash.

I am testing this on a real iPhone (not a simulator), sometimes that makes a difference for some more exotic issues...

ultimately, I've seen this crash in more than one platform so it seems like a cross platform issue (of differing severity). If I manage to make a reproduction I'll share it here but my time is limited...

Luis
Top achievements
Rank 1
commented on 21 Feb 2025, 11:43 AM

I've managed to find a way to reproduce this issue, updated my original post. 
Nikola
Telerik team
commented on 21 Feb 2025, 03:44 PM

Hi Luis,

Thank you for sharing the details of your scenario.

I am currently working on reproducing the issue. I will provide you with an update at the beginning of the next week.

Regards, Nikola Progress Telerik

Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!

1 Answer, 1 is accepted

Sort by
0
Nikola
Telerik team
answered on 24 Feb 2025, 01:17 PM

Hi Luis,

I was able to reproduce this behavior and as a result, I logged a new bug report in our feedback portal. It can be found at this link where it can be voted for, as well as followed, in order to get notified via e-mail when its status gets changed.

In addition, as a token of gratitude for bringing this to our attention, I updated your Telerik points.

I hope the provided information will be of help to you.

Regards, Nikola Progress Telerik

Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!

Tags
CollectionView
Asked by
Luis
Top achievements
Rank 1
Answers by
Nikola
Telerik team
Share this question
or