Why does Uno.UI.Toolkit.VisibleBoundsPadding.PaddingMask="All" crash a UWP app occasionally? - uno-platform

I use Uno Platform to target Windows, web, iOS, macOS, Android and Linux with a single code base. Uno.UI.Toolkit.VisibleBoundsPadding.PaddingMask="All" is used on almost every page of an app like the following:
<Grid
x:Name="gridRoot"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
toolkit:VisibleBoundsPadding.PaddingMask="All"
>
Occasionally, the UWP version crashes with the following exception:
Exception: Object reference not set to an instance of an object.
Type: System.NullReferenceException
Stack trace: at Uno.UI.Toolkit.VisibleBoundsPadding.VisibleBoundsDetails.UpdatePadding() + 0x8d
at Uno.UI.Toolkit.VisibleBoundsPadding.VisibleBoundsDetails.<.ctor>b__5_0(ApplicationView, Object) + 0x8
at System.EventHandler`1.Invoke(Object, TEventArgs) + 0x2e
at __Interop.Intrinsics.HasThisCall__51(Object, IntPtr, Object, Object) + 0x26
at SharedLibrary!<BaseAddress>+0x94ca05
It happens rarely (probably less than 0.1% of sessions), but it happens on different versions of Windows 10, so it is probably not related to the OS. Could anyone shed some light on this?

Related

Is there a way to get Firebase Crashlytics Unity C# line number crash information?

I've been using Firebase crashlytics for some time and have been trying to get more information on crashes and exceptions on iOS & Google builds. However, I'm can't seem to get the line numbers to show up in Unity C# scripts. Does Crashlytics offer line number details? or I'll have to include another sdk?
Below is an example of an iOS crash.
Non-fatal Exception: InvalidOperationException
0 ??? 0x0 ThrowIfCheckDependenciesRunning (Firebase.FirebaseApp)
1 ??? 0x0 GetInstance (Firebase.FirebaseApp)
2 ??? 0x0 get_DefaultInstance (Firebase.FirebaseApp)
3 ??? 0x0 get_DefaultInstance (Firebase.RemoteConfig.FirebaseRemoteConfig)
4 ??? 0x0 FetchRemoteConfig (FirebaseServer)
5 ??? 0x0 ForegroundPostSynced ()
6 ??? 0x0 OnSuccessEmp ()
7 ??? 0x0 OnSuccessEmp ()
8 ??? 0x0 OnSuccess
9 ??? 0x0 OnSuccess
Unity iOS builds should upload crashlytics symbols automatically (after Crashlytics version 8.6.1) as part of the Xcode build process. This then allows stacktraces to show c# line numbers.
What versions of the following are you using?
Unity Editor
Firebase SDKs (they should all be at the same version number)
External Dependency Manager for Unity
Additionally, as another thing to check, are those stack frames/method calls in your user code, in a plugin or somewhere else? If they are not in your code, less information may be available.

How to check if the biometric scanner is available and initialized in Xamarin android BiometricPrompt

Failed biometric(fingerprint) scan attempts are handled by OnAuthenticationFailed() callback of BiometricPrompt.AuthenticationCallback class.
The behavior I noticed is, it lets the user attempt 5 invalid fingerprint scans (each time the fail callback is invoked) and then the prompt dismisses. Within the next 30 secs, if we try to re-build a BiometricPrompt instance and try to authenticate, it does not show the prompt which I think is the default behavior of BiometricPrompt.
Is there anyway to check if the biometric scanner is available and initialised if the user attempts to re-invoke biometric prompt within the said 30secs?
How can I handle that use case?
xamarin android BiometricPrompt.AuthenticationCallback does not have an override method "onAuthenticationError" to handle error callbacks and thus I'm unable to handle error code "BIOMETRIC_ERROR_TIMEOUT".
If someone has a solution for this, please do let me know your resolution.
I believe that BiometricPrompt is not fully ported to Xamarin yet...
I'm still looking for a source that can double check this info for me, but I haven't found it either.

UWP - Create push notification channel error

I have a strange issue for creating a push notification channel uri.
When I try to execute the following code:
receivedChannel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
I catch an exception with the following message:
A notification channel request for the provided application identifier is in progress. (Exception from HRESULT: 0x803E0103)
(nothing special in the call stack)
The problem appeared suddenly while it worked fine.
I tried to restart my phone without success.
Note: I have this issue only on my development mobile. It works fine on others mobiles.
It's properbly not relevant any more, but I had a support call earlier this year with Microsoft. This kind of error message is actually due to an error in the whole push notification framework. The problem has been resolved in the Fall Creator's update released on October 17th, 2017. As a matter of fact I have not encountered the error since then on any of the ~500 devices in my domain.
So, error resolution: Update your device. Hope that helps.

NReco.PdfGenerator in ASP.NET stopped working on server

Local PDF generation works well, but the same application stoped working on server. Event log says:
Faulting application wkhtmltopdf.exe, version 0.12.2.1, time stamp 0x54bd0265, faulting module MSVCP120.dll, version 6.0.6002.18881, time stamp 0x51da3e00, exception code 0xc0000135, fault offset 0x0006f52f, process id 0x44b8, application start time 0x01d07ce4c087128f.
and
Exception information:
Exception type: IOException
Exception message: The pipe has been ended.
at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath)
at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
at NReco.PdfGenerator.HtmlToPdfConverter.GeneratePdfInternal(String htmlFilePath, Byte[] inputBytes, String coverHtml, String outputPdfFilePath, Stream outputStream)
I've spent 4 hours wrestling with this today, so I thought i'd post my solution to help anyone else suffering in thr future.
wkhtmltopdf was updated and worked on my local machine.
Pushed the code to the server and nothing.
I eventually tracked this down to needing to install the 32 bit version of C++Runtime from here https://www.microsoft.com/en-GB/download/details.aspx?id=40784
In my case, due to some 3rd party libraries I cannot remove yet, I was forced to run the website in 32 bit mode. As my server is 64 bit, the 32 bit versions were not present. (As my PC is a Dev Machine, I assume that I got all the relevent libraries from MS, hence why I had no local issue.)
Solution is to check accesibility of dll's msvcp120.dll and msvcr120.dll. Local copy of libraries into app bin dir solve my problem.

X11 error BadRequest when running OpenGL applications

I compiled Xorg for a custom Linux I'm building for an ARM device. I'm trying to run OpenGL applications using EGL with the Qt framework but I get these errors:
X Error: BadRequest (invalid request code or no such operation) 1
Extension: 198 (Uknown extension)
Minor opcode: 0 (Unknown request)
Resource id: 0x600082
and this:
X Error: BadRequest (invalid request code or no such operation) 1
Extension: 160 (Uknown extension)
Minor opcode: 0 (Unknown request)
Resource id: 0x600082
repeated many times. What does this mean? How can I investigate on what is wrong? Something is drawn on the screen correctly with OpenGL, but after that everything is screwed up.
It seems like something is missing in my Xorg, but I can't find anything about these extensions 198 and 160. How does one figure out what is missing or anyway what is wrong? Do I have to compile anything specific to be able to run OpenGL applications for X11?
Thanks!
The extension numbers are dynamically assigned by the X server based on the extensions supported in a particular codebase and enabled in a particular configuration. To get a list of the extension name to number mappings on the current display, you can run xdpyinfo -queryExtensions | grep opcode — the opcode value listed for each one should match the extension number in Xlib error reports. If none of the extensions match, then it seems likely you've got memory corruption or are calling an extension without first verifying it's currently available in the X server.

Resources