Why does WP8 scheduled task load the actual app DLL? - windows-phone-8

Not sure if anyone else is experiencing this, but whenever I debug my scheduled task in visual studio, I find that the scheduled task host loads the parent app DLL. I see it in the output window. I have no reference to it nor am I using any resources in it.
'HeadlessHost.exe' (CLR C:\windows\system32\coreclr.dll: DefaultDomain): Loaded 'C:\windows\system32\mscorlib.ni.dll'.
'HeadlessHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Windows.RuntimeHost.ni.dll'.
'HeadlessHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Windows.ni.dll'.
'HeadlessHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Net.ni.dll'.
'HeadlessHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.ni.dll'.
'HeadlessHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Xml.ni.dll'.
// This is the actual app DLL!!
'HeadlessHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\Data\Programs\{79787132-3A86-445F-BDD5-206D298D732F}\Install\MyWP8App.DLL'. Symbols loaded.
'HeadlessHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\Microsoft.Phone.ni.dll'.
'HeadlessHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\Microsoft.Phone.Interop.ni.dll'.
// This is the scheduled task DLL (as expected)
'HeadlessHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\Data\Programs\{79787132-3A86-445F-BDD5-206D298D732F}\Install\MyWP8ScheduledTask.DLL'. Symbols loaded.
// This is the portable DLL for shared logic (as expected)
'HeadlessHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\Data\Programs\{79787132-3A86-445F-BDD5-206D298D732F}\Install\MyWP8App.Shared.DLL'. Symbols loaded.
'HeadlessHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Threading.Tasks.ni.dll'.
'HeadlessHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Core.ni.dll'.
'HeadlessHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Runtime.Serialization.ni.dll'.
Why does this happen? When the scheduled task starts, my memory usage is already at 4.4MB!

My guess is that it is being loaded to find the reference to the appropriate DLL that is the actual scheduled task.
Note that when profiling memory under the debugger, the debugger will add ~3MB to the memory that is used by the process. Because of this you can't accurately profile memory usage under the debugger. Also note that the memory limit is not enforced under the debugger so this isn't a realistic test.
The important thing is to only profile and concern yourself with memory issues when not under the debugger. Yes this makes it slightly more awkward to track but is a realistic test.
Unless you are having real issue which you can explicitly put down to this I wouldn't worry.

Related

Windows IOT Raspberry Pi File Load Exception

I have recently upgraded my Windows 10 machine to version 1709 and I have a problem debugging my app on my Raspberry pi.
The app is a background app and I get the following exception in the output window and the IBackgroundTask run method is never called.
Exception thrown: 'System.IO.FileLoadException' in System.Private.CoreLib.ni.dll
This is all I get - no idea on how to look further into this as there is no information on what it could not load.
I have tracked it down to me creating a class (simple creating am empty class is enough to show the error)
AquariumControllerPiLibrary.ABC c = new AquariumControllerPiLibrary.ABC();
This class is defined in a separate Class Library assembly.
The class source code is
using System;
namespace AquariumControllerPiLibrary
{
public class ABC
{
}
}
If I comment out the class the Run method executes and I can debug the application and I do not get the fileLoadException.
Any idea how I can find out what did not load?
The debug lines from the output window.
'backgroundTaskHost.exe' (CoreCLR: DefaultDomain): Loaded 'c:\data\Programs\WindowsApps\Microsoft.NET.CoreRuntime.1.1_1.1.25915.0_arm__8wekyb3d8bbwe\System.Private.CoreLib.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'backgroundTaskHost.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\AquariumControllerPIVS.Debug_ARM.CCROWE\AquariumControllerPi.winmd'. Symbols loaded.
'backgroundTaskHost.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\AquariumControllerPIVS.Debug_ARM.CCROWE\System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'backgroundTaskHost.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'c:\data\Programs\WindowsApps\Microsoft.NET.CoreRuntime.1.1_1.1.25915.0_arm__8wekyb3d8bbwe\mscorlib.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'backgroundTaskHost.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\AquariumControllerPIVS.Debug_ARM.CCROWE\WinMetadata\Windows.winmd'. Module was built without symbols.
'backgroundTaskHost.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\AquariumControllerPIVS.Debug_ARM.CCROWE\System.Runtime.InteropServices.WindowsRuntime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'backgroundTaskHost.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\AquariumControllerPIVS.Debug_ARM.CCROWE\System.Threading.Tasks.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'backgroundTaskHost.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded
'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\AquariumControllerPIVS.Debug_ARM.CCROWE\ABC.dll'. Symbols loaded.
'backgroundTaskHost.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\AquariumControllerPIVS.Debug_ARM.CCROWE\System.Runtime.WindowsRuntime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Exception thrown: 'System.IO.FileLoadException' in System.Private.CoreLib.ni.dll

Xamarin forms Windows Phone Silverlight 8.1 Application can't debug (VS2013 ultimate update 5)

When I trying Debug Xamain forms application target windows phone 8.1 (device or simulator) silverlight application, but always output this error and end the debug mode.
Anyone got idea how to fix this?
OS: windows 8.1 pro
IDE: visual studio 2013 ultimate update 5
Project: Xamarin forms windows phone 8.1 project
I have try another PC, same code but vs2013 update 4, it can run very well but some how I don't know why, it also appear this issues just now.
AéHost.exe’ (CoreCLR: Silverliéht AppDomain): Loaded lCIKwindows\system32KWinMetadataKWindows.winmd’. Cannot-find or open the PDB file.
AgHost.exe’ (CoreCLR:Silverlight AppDomain): Loaded lCI\DataKProgramsK{7AACo885n84A3u4FFE-B677-3218599B3691}\Install\Xamarin.Forms.Platform.WP8.DLL’.
AgHost.exe’ (CoreCLR:Silverlight AppDomain): Loaded lCI\DataKProgramsK{7AACo885n84A3u4FFE-B6??-3218599B3691}\Install\CrossPlatform.DLL’. Symbols loade
AgHost.exe’ (CoreCLR:Silverlight AppDomain): Loaded ’C:\DataKProgramsK{? AA50885*84A3“4FFE-B6??-3218599B3691}KInstallKXamarin.Forms.Core.DLL’. Module w
AgHost.exe’ (CoreCLR:Silverlight AppDomain): Loaded lCI\windowsKsystem32KSystem.Runtime.ni.dll’. Symbols loaded.
AgHost.exe’ (CoreCLR:Silverlight AppDomain): Loaded lCIKwindowsKsystem32KSystem.UbjectModel.ni.dll’. Symbols loaded.
AgHost.exe’ (CoreCLR:Silverlight AppDomain): Loaded lCIKwindowsKsystem32KSystem.Collections.ni.dll’. Symbols loaded.
AgHost.exe’ (CoreCLR:Silverlight AppDomain): Loaded lCI\windowsKsystem32KSystem.Linq.ni.dll’. Symbols loaded.
A first chance exception of type System.Io.FileNotFoundException occurred in CrossPlatform.WinPhone.DLL
AgHost.exe’ (CoreCLR:Silverlight AppDomain): Loaded lCI\windowsKsystem32Ken-USKmscorlib.debug.resources.dll’. Module was built without symbols.
A first chance exception of type lSystem.Reflection.TargetInvocationException’ occurred in mscorlib.ni.dll
A first chance exception of type lSystem.Reflection.TargetInvocationException’ occurred in Microsoft.Phone.ni.dll
The program ’[5328] AgHost.exe’ has exited with code -1 (Uxffffffff).
Package Manager Console Error List Output
After long time investigate, I found out that the windows phone 8.1 SDK isn't install correctly, for those who still have this kind of problem, please check your visual studio components.

CaptureElement was not found , missing assembly reference

I am using Visual Studio 2013 Express, developing new camera app for windows mobile 8.1 , getting error :
<CaptureElement x:Name="myCaptureElement"
HorizontalAlignment="Left"
Width="320" Height="240" />
CaptureElement was not found, missing assembly reference . .
As you have mentioned, you are targeting WP8.1 Silverlight - and as MSDN says, CaptureElement class is olny for Runtime:
Windows Phone 8.1 [Windows Runtime apps only]
If you need to take a photo in Silverlight, you may think of using Camera Capture Task, which:
Applies to: Windows Phone 8 and Windows Phone Silverlight 8.1 | Windows Phone OS 7.1
You may also have a look at this nice article.

Flash Builder Error Compiling Ipad Actionscript Mobile Project

I just bought a brand new ipad for testing. I am using flash buider 4.7 to make an actionscript mobile project. I created an app ID, provisioning profile, and certificate. I have done this before in flash professional so it wasn't too bad. However, when I run or debug even a blank application I get this error in flash builder:
Error occurred while packaging the application:
'Launching AppName' has encountered a problem.
Error occurred while packaging the application.
Exception in thread "main" java.lang.Error: Unable to find llvm JNI lib in:
/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/lib/adt.jar/Darwin
/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/lib/aot/lib/x64
/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/lib/adt.jar
/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/lib
at adobe.abc.LLVMEmitter.loadJNI(LLVMEmitter.java:582)
at adobe.abc.LLVMEmitter.<clinit>(LLVMEmitter.java:596)
at com.adobe.air.ipa.AOTCompiler.generateExtensionsGlue(AOTCompiler.java:419)
at com.adobe.air.ipa.AOTCompiler.generateMachineBinaries(AOTCompiler.java:1790)
at com.adobe.air.ipa.IPAOutputStream.createIosBinary(IPAOutputStream.java:378)
at com.adobe.air.ipa.IPAOutputStream.finalizeSig(IPAOutputStream.java:762)
at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java:91)
at com.adobe.air.ipa.IPAPackager.createPackage(IPAPackager.java:245)
at com.adobe.air.ADT.parseArgsAndGo(ADT.java:571)
at com.adobe.air.ADT.run(ADT.java:419)
at com.adobe.air.ADT.main(ADT.java:469)
I have no idea where to even start in trying to figure out what could be the problem. I am pretty sure the itunes developer information is correct. Are there any kinds of drivers or developer modes that I need to set for a new iPad?
Thanks!

AIR debug compile error ANE

I am trying to debug my air app but get the error:
Process terminated without establishing connection to debugger.
invalid profile specified 'Application does not support current profile'
Launch command details: "/Applications/Adobe Flash Builder 4.6/sdks/4.6.0 AIR 3.5/bin/adl" -runtime "/Applications/Adobe Flash Builder 4.6/sdks/4.6.0 AIR 3.5/runtimes/air/mac" -profile extendedMobileDevice -screensize 768x1004:768x1024 -XscreenDPI 132 -XversionPlatform IOS -extdir "/Users/kerepuki/Documents/Adobe Flash Builder 4.6/.metadata/.plugins/com.adobe.flexbuilder.project.ui/ANEFiles/AppName/macosx/" "/Volumes/Mobile Apps/AppName/Application/Final/bin-debug/AppName-app.xml" "/Volumes/Mobile Apps/AppName/Application/Final/bin-debug"
I don't think it is related to an ANE I am trying to add as I have tested the ANE in a blank project and it works fine.
If I package the app and install on iPad it works fine. I am using AIR 3.5 in Flash Builder and not sure how to debug this error message.
My application file starts with:
<application xmlns="http://ns.adobe.com/air/application/3.5">
Had to remove the supported profile node from the application description file.