Wpf client of TipCalc Tutorial not working - xamarin.forms

I tried to follow the tipcalc tutorial on mvvmcross.com. All clients work except the Wpf client. I would like to get it running as it promises to be a performat debugging platform for Mvx together with XForms.
I followed the tutorial using the nupkgs MvvmCross.Forms.Platforms.Wpf (instead of the MvvmCross.Platforms.Wpf given there which I suppose is wrong there). But when I try to start it, I get the following exception:
"Could not find a setup class for application", the innermost stacktrace being:
bei MvvmCross.Core.MvxSetupExtensions.CreateSetup[TSetup]() in C:\projects\mvvmcross\MvvmCross\Core\MvxSetupExtensions.cs:Zeile 41.
bei MvvmCross.Core.MvxSetup.Instance() in C:\projects\mvvmcross\MvvmCross\Core\MvxSetup.cs:Zeile 48.
bei MvvmCross.Core.MvxSetupSingleton.CreateSetup() in C:\projects\mvvmcross\MvvmCross\Core\MvxSetupSingleton.cs:Zeile 158.
Actually the Application class is derived from MvvmCross.Platforms.Wpf.Views.MvxApplication but the RegisterSetup method is not called during startup.
My supposition is that the framework is not yet ready to get Wpf running together with Xamarin.Forms. Am I correct here?
If not: I would appreciate any hint or link to a running code sample Mvx/XForms/Wpf

Related

CurlResources Init null reference exception

I have a WebAPI .NET Framework 4.8 application which needs to make a RESTful GET request to another, third-party web service using a specific cipher. I found a code sample using the CurlThin NuGet packages in a response to this question, and then perused the little documentation on CurlThin I could find, along with taking a peek at the open source library code on GitHub. All examples and documentation talk about the need for an initial call to
CurlResources.Init();
This call only needs to be made a single time at the initialization stage to copy the appropriate DLLs to the application output folder.
I placed this call in my web app's Application_Start method, but cannot get past a NullReferenceException:
I fully expect that I am overlooking something simple that's been staring back at me for hours. Any guidance would be much appreciated.

Xamarin's Forms Chip Error on launch of app

I am getting the following error in Xamrain forms and their is no more detail I can give until you ask me as unfamiliar with the error never had it before.
Severity Code Description Project File Line Suppression State
Error error: CGViewProvider_1 is not abstract and does not override
abstract method checkView(View,int) in ChipItemViewProvider public
class
CGViewProvider_1 THEHOCKEYLAB.Android D:\GitMaster\thehockeylabl.mobile\THEHOCKEYLAB\THEHOCKEYLAB.Android\obj\Debug\110\android\src\crc640a67887a4134e062\CGViewProvider_1.java 4
It seems to be something to do with their conversation code that converts the code into real time java, I see no obv way of getting to what the error is from here it happens on launch and cancels the build..
Its making a referring to ChipItemViewProdiver I have not changed processers or any part of my pc this application works.
If you let me no how to get extra debug info to diagnose this I would be greatfull
Edit 2
It would be appear to do with having fast debug on and the linker at the same time I am trailing it here and see if it works.
This was caused by having the linker and fast debug switched on your settings for Android should be like this. To avoid the error.
BTW I didnt change this manually folks this was after VS Update

UWP: AccessViolationException on an attempt to open a page

I have a Xamarin.Forms application that uses FreshMvvm. On an attempt to open a particular page with this code:
await CoreMethods.PushPageModel<DistributorsLocatorPageModel>();
after the execution passes the page's Init() method and all properties, the app crashes with the following error:
System.AccessViolationException
HResult=0x80004003
Message=Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.
Source=Cannot evaluate the exception source
StackTrace: Cannot evaluate the exception stack trace
This happens only in UWP. iOS and Android have no issue. And other pages also open fine even in UWP.
I would appreciate your suggestions.
just found this through desperate googling and didn't find much in the way of answers.
one thing i'll say for it is that the issue lies in thread safety - when navigation is done explicitly on the main thread the problem doesn't arise, however if you're using AppShell navigation on a tabpage or some other place where you don't invoke the navigation in your own code, there doesn't seem to be a lot you can do.
I'm currently attempting to find a good place to override OnNavigatedTo, but so far have come up short.
so I guess this is a long way of saying "bump"

Qt Application throws an Access violation exception during startup

I have a Qt Application that works in Debug mode without any problems. Since two days I'm trying to make it work in Release mode. After some Project property modification I managed to compile without errors. But unfortunalty the application crashes before even reaching the main method.
That's my environment:
MS VS 2010
Qt 4.8.4
Qwt 6.0.0
I don't know if this is relevant, but I also installed the Qt plugin for VS and used Qt Designer to create my GUI.
As I said in Debug mode there is no problem. Starting the release version from the Visual Studio produces the following error:
Unhandled exception at 0x77c415de in Application.exe: 0xC0000005: Access violation reading location 0x0000000c.
The last function I can "debug" is the the "WinMain" method called inside the method "__declspec(noinline) int __tmainCRTStartup", which is located in crtexe.c (honestly I have no idea what this is). The call stack looks like this:
ntdll.dll!77c415de()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!77c415de()
ntdll.dll!77c3014e()
msvcr100.dll!718f0269()
msvcr100.dll!718f233b()
msvcr100.dll!718f233b()
msvcr100.dll!718f233b()
QtCore4.dll!5b2cfc49()
QtGui4.dll!57bf54ea()
Application.exe!__tmainCRTStartup() Line 547 + 0x1c bytes C
kernel32.dll!754633aa()
ntdll.dll!77c59ef2()
ntdll.dll!77c59ec5()
In the moment I'm totaly lost with this problem. No idea what to try further...
I've tried to reduce the program and commented out the complete main function. But the result was the same behaviour. As I said the error occurs even before the main function is called. I also turned off all optimization and recompiled... didn't changed anything.
What completly puzzles me, is the fact that it "works" when I call "Application.exe" from the command prompt (ok it also crashes but much later during execution). Weird, isn't it? What is the difference between starting from command prompt and starting from Visual Studio application?
AnatolyS and npiau thanks for you tips. Meanwhile I continued digging in my code. More or less I started from the very beginning and finally got the place the error occurs. I suppose npiau is right, it has nothing to do with Qt.
It's still (for me) a strange problem. I posted it in a new thread (because it has little to do with this thread): C++ Creation of a Singleton object in initializer list causes an Access Violation (only Release Mode)
The problem is not in QT but in your source code. "0xC0000005: Access violation reading location 0x0000000c" means that you try to access a wrong memory location.
Check out your arrays, ans pointers.

Exception that goes away with Clean/Rebuild. How to diagnose/prevent?

Pre-Problem: our office was hit by a worm due to a corporate patching oversight, and the boys in the lab repaved my machine. I needed to re-install all my development tools (Visual Studio 2005, SP1, and the Web Application Project Setup patch) again. The following problem did not occur before this event.
I've been working on an ASP.NET web application project for several months now. I've been editing, debugging, etc without a problem. Then, I added a single line of code, ran it in Debug and got this error:
System.Web.HttpUnhandledException:
Exception of type 'System.Web.HttpUnhandledException'
was thrown.
System.IO.FileLoadException: The given assembly name
or codebase was invalid. (Exception from HRESULT: 0x80131047)
I uncommented the new code, built the project and ran in debug again, but got the same error.
New Code:
Me.frm.btnSubmitChanges.Attributes.Add("onclick", "javascript:return validateSubmit();")
The only way I've been able to fix this is to Clean, then Rebuild the project. I haven't been able to trap where it's happening using breakpoints.
It's happened a couple times in the last few days. What should I be looking at to fix this?
Thank you!
Have you tried to enable Fusion Logger to see if it's an assembly that is failing to load? In C# you can tell the debugger to break at any exception (There's a command you can add by customizing the tool bar called Exceptions). I'm not sure if VB has this but I would assume they do. Can you tell it break on FileLoadException and that might help you understand what's going on.
The line of code you added is pretty innocuous. When you add the code it breaks, have you then done a clean build with that line of code still in and does it work or not?
I did run the Fusion Logger, but did not get any results when the exception occurred. I tried all 4 settings.
The new line of code runs fine after a clean/rebuild.
I haven't used the break on all exceptions before; I'll see if I can find it.

Resources