Cannot run an Xamarin UWP app in debug mode - xamarin.forms

I am trying to run my Xamarin UWP app in debug mode but if fails to open. The error code is
Output window errors
The thread 0x6dfc has exited with code 3221225595 (0xc000007b).
The thread 0x3344 has exited with code 3221225595 (0xc000007b).
The program '[35788] SheepsheadTheGame.UWP.exe' has exited with code 3221225595 (0xc000007b).
I was able to run the app in debug mode and then it just stop working. All my nuget packages are up to date. I have searched the web and tried various solutions other people have had success fixing this issue. I have not been successful.
I have found two lines in the build output window that may be causing the issue.
6>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.11-rel-30601-02\tools\Microsoft.NetNative.targets(805,5): warning : ILTransform : warning ILT0028: Found native library 'C:\Users\druch\Documents\xxx\xxxx\xxxxx.UWP\obj\x86\Debug\ilc\in\Cosmos.CRTCompat.dll' with unexpected CPU architecture 'amd64', while the current build target architecture is set to 'x86'. Your application may fail to launch. Please make sure to build your application with the matching CPU architecture.
6>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.11-rel-30601-02\tools\Microsoft.NetNative.targets(805,5): warning : ILTransform : warning ILT0028: Found native library
'C:\Users\druch\Documents\xxx\xxxx\xxxxx.UWP\obj\x86\Debug\ilc\in\Microsoft.Azure.Cosmos.ServiceInterop.dll' with unexpected CPU architecture 'amd64', while the current build target architecture is set to 'x86'. Your application may fail to launch. Please make sure to build your application with the matching CPU architecture.
Could this be the cause of my issue? If so, how do I fix it?

I ended up rebuilding my app (not fun). The UWP app started working again.

Related

Android Studio 4 Build ERROR : Execution failed for task ':app:mergeDebugResources'

Hello this is my first time make android program and found this error but the code not have an error point. the error message is below :
Execution failed for task ':app:mergeDebugResources'.
Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
Failed to transform aapt2-4.1.1-6503028-windows.jar (com.android.tools.build:aapt2:4.1.1-6503028) to match attributes {artifactType=_internal-android-aapt2-binary, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for Aapt2Extractor: C:\Users\lenovo.gradle\caches\modules-2\files-2.1\com.android.tools.build\aapt2\4.1.1-6503028\cc838ebadee3649d47e07d029371bc1054e2200d\aapt2-4.1.1-6503028-windows.jar.
> java.io.IOException: Unable to delete directory 'C:\Users\lenovo.gradle\caches\transforms-2\files-2.1\aa8b5888abc00f78a9403248465821cc'
Failed to delete some children. This might happen because a process has files open or has its working directory set in the target directory.
- C:\Users\lenovo.gradle\caches\transforms-2\files-2.1\aa8b5888abc00f78a9403248465821cc\aapt2-4.1.1-6503028-windows
can someone tell me how to fix it ?
i had same problem in linux
tried many ways and asked some question.
finally found out there is file missing named aap2 in build-tools
i couldn't find that file to place it in destination so i deleted whole file and re Download it with sdk manager and if it doesn't work too i guess u should try reinstall android studio
yes its not a good answer but it was all experience i had with this error.

Azure DevOps App Center task error: Test chunking failed

I have lately been trying to upload our UI-tests to App Center through an Azure DevOps pipeline task and seem to always run into this error. The same error also occurs if I try to run the CLI command locally. Our project is a cross platform Xamarin.Forms app using the Xamarin.UITest test framework.
The specified error:
Test chunking failed: Specified method is not supported.
Preparing tests... failed.
Error: Cannot prepare UI Test artifacts using command: C:\Users\VssAdministrator.nuget\packages\xamarin.uitest\3.0.7\tools\test-cloud.exe prepare "D:/a/1/b/Debug/Project.dev.apk" --assembly-dir "D:\a\1\s\ Project.UITest\bin\Debug" --artifacts-dir "D:\a\1\a\AppCenterTest".
Test chunking failed, please try again. If you can't work out how to fix this issue, please contact support.
##[error]Error: D:\a_tasks\AppCenterTest\1.152.3\node_modules.bin\appcenter.cmd failed with return code: 3
Any help is most appreciated.

The realm dot net base example does not compile

I am having trouble at getting the example "QuickJournal" to compile on iOS. The code compiles OK, but fails during the Fody step.
Goals
Try out the example application for .NET through the following
- Pull the repository
- Open the solution in examples/QuickJournal
- Compile and test
Expected Results
Smooth compilation & testing experience
Actual Results
Fody out of memory exception
Steps to Reproduce
See the setup, follow steps
I am using the latest Xamarin/Visual Studio Mac/XCode
Code Sample
The regular realm source code
Version of Realm and Tooling
git clone https://github.com/realm/realm-dotnet.git
git checkout 8f5e36ffd91e06b9c60b91f9de3fb312b411a4a4
The exception I am getting is
Fody: Found debug symbols at '~/realm-dotnet/examples/QuickJournal/QuickJournal/obj/Debug/QuickJournal.pdb'.
MSBUILD : error : Fody: An unhandled exception occurred:
MSBUILD : error : Exception:
MSBUILD : error : Out of memory
MSBUILD : error : StackTrace:
MSBUILD : error : at (wrapper alloc) System.Object:AllocVector (intptr,intptr)
MSBUILD : error : at Microsoft.Cci.Pdb.MsfDirectory..ctor (Microsoft.Cci.Pdb.PdbReader reader,
See log file
RealmCompilelog.txt
Realm 1.2.1 addresses that by using an updated version of Fody.
Answer for older Realm versions:
This is caused by a Cecil bug with Mono 5.0. As Realm depends on Fody, which uses Cecil, compilation will fail for project referencing it. Until new Cecil and Fody versions are released, the workaround is to revert to Mono 4.8:

Release does not run. This application failed to start

My application works when it built in debug mode. But it does not run in release.
This application failed to start because it could not find or load the
Qt platform plugin "windows".
Reinstalling the application may fix this problem.
I copied dlls which the application required. I copied also qwindows.dll, qoffscreen.dll and libEGL.dll.
But libEGL.dll located in C:\qt\5.3\msvc2013\bin and `C:Qt\ToolsQtCreator\bin'. I compiled my application by msvc-11.0(2012).
--
I put platforms folder to exe directory and now application runs but crashes immediately in ntdll.dll!771e56bc()
Now my problem is similar to this one Why is ntdll.dll crashing my c++ executable?.
Can I make debug working like release but save debug mode?
--
Here is Application Verifier result for release mode. It does not happen for debug.
=======================================
VERIFIER STOP 00000006: pid 0xDF0: Corrupted heap pointer or using wrong heap.
00161000 : Heap handle used in the call.
093F8FF8 : Heap block involved in the operation.
00000004 : Size of the heap block.
06441000 : Heap where block was originally allocated.
=======================================
This verifier stop is not continuable. Process will be terminated
when you use the `go' debugger command.
=======================================
MyApp.exe has triggered a breakpoint.
AVRF: Noncontinuable verifier stop 00000006 encountered. Terminating process ...
The thread 0x1724 has exited with code -1073740767 (0xc0000421).
The program '[3568] MyApp.exe' has exited with code -1073740767 (0xc0000421).
--
Here is a top of a call stack
vrfcore.dll!6ae43466() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for vrfcore.dll]
[External Code]
qwindows.dll!0f0642cb() Unknown
qwindows.dll!0f065f8a() Unknown
qwindows.dll!0f0662bb() Unknown
Qt5Gui.dll!0f774cf3() Unknown
Qt5Gui.dll!0f774e75() Unknown
Qt5Gui.dll!0f7778d5() Unknown
But libEGL.dll located in C:\qt\5.3\msvc2013\bin and `C:Qt\ToolsQtCreator\bin'
You must not take any DLLs from C:\Qt\Tools\QtCreator\ -- these are private DLLs for Qt Creator, and they are incompatible with your application.
Only take DLLs from C:\Qt\5.3\msvc2013\bin and C:\Qt\5.3\msvc2013\plugins. Here is the required folder structure:
(source: http://qt-project.org/wiki/Deploy_an_Application_on_Windows )
This sounds like either a DLL is missing or the application expects it in a different path.
a) Use the Dependency Walker on your release build executable to check whether all DLL dependencies can be resolved.
b) Make sure that your platform plugin files are at the right location. I think they need to be in a folder called "platforms" (not absolutely sure though).
c) There is a post in the Qt forum about a similar problem. Maybe this helps you to track it down.

New Static Library has build error "libtool exited with code 1"

I created a new static library in my iOS project and now I'm getting the build error
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool failed with exit code 1
How do I go about debugging this?
To see the actual output and not just the error message, try building your target or scheme with xcodebuild from command line.
I had a problem with the same error message. In my case, I couldn't build for the simulator, but it worked find when building for the device. The output from xcodebuild confirmed that Xcode could not set the proper architecture to build for the simulator.
Long story short, it turned out that one build setting was corrupted. The Mach-O Type setting in the Linking category was set to Relocatable Object File for some reason. I switched it back to Static Library and the error disappeared.

Resources