I am currently attempting to develop a cross-platform mobile app using Xamarin.forms. As a part of this application I need to include a 3rd party .framework in my Xamarin.iOS project. I have successfully created a Xamarin.iOS Bindings Library .dll and included it in my project. I am able to reference the library and compile without errors, however when I attempt to deploy the app to the iPhone simulator the app will start and then crash with a “Failed to install” message.
Error Message
If I remove any lines of code which reference this .dll the app will run fine.
Does anyone have any insight on how to solve this?
Potentially useful information:
I am developing in Visual Studio for Windows
Xamarin version: 16.7.000.440
Xamarin.iOS version: 13.20.2.2
XCode version: 12.0.1
iOS version: 14.0
Device Crash Log:
Incident Identifier: 882D82AB-5511-48C1-AFCD-4B86933B2A5C
CrashReporter Key: 1cc59f0bc819c0d806e2c1ccdf7b24a413699a4f
Hardware Model: iPad7,11
Process: MyApp.iOS [452]
Path: /private/var/containers/Bundle/Application/A31E102C-4BB8-431A-ABDF-E17A503E1778/MyApp.iOS.app/MyApp.iOS
Identifier: com.Crossroads.MyApp
Version: 1.0 (1.0)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.Crossroads.MyApp [614]
Date/Time: 2020-10-16 09:46:53.9542 -0500
Launch Time: 2020-10-16 09:46:53.9106 -0500
OS Version: iPhone OS 13.5.1 (17F80)
Release Type: User
Baseband Version: n/a
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Description: DYLD, dependent dylib '#rpath/MyFramework.framework/MyFramework' not found for '/private/var/containers/Bundle/Application/A31E102C-4BB8-431A-ABDF-E17A503E1778/MyApp.iOS.app/MyApp.iOS', tried but didn't find: '#rpath/MyFramework.framework/MyFramework' '/System/Library/Frameworks/MyFramework.framework/MyFramework'
Highlighted by Thread: 0
Backtrace not available
Unknown thread crashed with ARM Thread State (64-bit):
x0: 0x0000000000000006 x1: 0x0000000000000001 x2: 0x000000016b701390 x3: 0x00000000000000c7
x4: 0x000000016b700f90 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000
x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x6f4d706163617461 x11: 0x656b6f54656c6962
x12: 0x6f77656d6172662e x13: 0x63617461442f6b72 x14: 0x656c69626f4d7061 x15: 0x0020276e656b6f54
x16: 0x0000000000000209 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000000000000
x20: 0x000000016b700f90 x21: 0x00000000000000c7 x22: 0x000000016b701390 x23: 0x0000000000000001
x24: 0x0000000000000006 x25: 0x0000000106cd4000 x26: 0x0000000000000001 x27: 0x0000000106cd4000
x28: 0x0000000000000000 fp: 0x000000016b700f60 lr: 0x0000000106cbbee8
sp: 0x000000016b700f20 pc: 0x0000000106cb4f68 cpsr: 0x00000000
esr: 0x00000000 Address size fault
Binary images description not available
Error Formulating Crash Report:
Failed to create CSSymbolicatorRef - corpse still valid ¯\_(ツ)_/¯
EOF
From the apple document, the errors means you have linked the frame while does not ember it.
The app crashes at launch, because the dynamic linker can’t locate the
missing framework.
So what you need to do is ember the framework and here is the document you can refer:
Linking the dependencies
binding-objective-c
I'm trying to run a script under IDLE in a fresh install of Python 3.7.0 on a Mac running OS 10.12.6, but it appears to crash once it hits "root = Tk()".
The error generated is:
Process: Python [877]
Path: /Library/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 3.7.0 (3.7.0)
Code Type: X86-64 (Native)
Parent Process: Python [872]
Responsible: Python [877]
User ID: 501
Date/Time: 2018-08-08 08:58:47.934 -0400
OS Version: Mac OS X 10.12.6 (16G1510)
Report Version: 12
Anonymous UUID: F9CEC001-40B2-1F01-C918-48794CEB9A07
Sleep/Wake UUID: 6743F7F2-F98A-4114-8742-809CF7F2C43B
Time Awake Since Boot: 22000 seconds
Time Since Wake: 5400 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fba344e3f60'
abort() called
terminating with uncaught exception of type NSException
I have interrogated the tcl/tk library using:
print(root.tk.exprstring('$tcl_library'))
print(root.tk.exprstring('$tk_library'))
This reports the following:
/Library/Frameworks/Python.framework/Versions/3.7/lib/tcl8.6
/Library/Frameworks/Python.framework/Versions/3.7/lib/tk8.6
This appears to be correct given the information on Python.org here.
What should I be doing differently?
After downloading from Apple's site and installing Xcode 9 beta 2, it fails to launch on Sierra OS X version 10.12.5 with a following bug report:
Process: Xcode [4789] Path:
/Applications/Xcode-beta.app/Contents/MacOS/Xcode Identifier:
com.apple.dt.Xcode Version: 9.0 (13158.29) Build Info:
IDEFrameworks-13158029000000000~6 Code Type: X86-64
(Native) Parent Process: ??? [1] Responsible: Xcode
[4789] User ID: 501
Date/Time: 2017-07-10 09:27:38.822 +0300 OS Version:
Mac OS X 10.12.5 (16F73) Report Version: 12 Anonymous UUID:
D8406E47-CD80-D96B-2976-599E84980DE2
Sleep/Wake UUID: A8F0AF0B-2FF1-45A9-89AD-505F25730705
Time Awake Since Boot: 20000 seconds Time Since Wake: 3800
seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT) Exception Codes:
0x0000000000000000, 0x0000000000000000 Exception Note:
EXC_CORPSE_NOTIFY
Application Specific Information: ProductBuildVersion: 9M137d UNCAUGHT
EXCEPTION (NSInternalInconsistencyException): Error getting value for
parameter key 'name' of extension
'Xcode.InterfaceBuilderKit.PepperIntegration.Singletons' in plug-in
'com.apple.dt.IDE.IDEInterfaceBuilderWatchKitIntegration' UserInfo: {
NSUnderlyingError = "Error Domain=DVTPlugInErrorDomain Code=2 \"Loading a plug-in failed.\"
UserInfo={DVTPlugInIdentifierErrorKey=com.apple.dt.IDE.IDEInterfaceBuilderCocoaTouchIntegration,
DVTPlugInExecutablePathErrorKey=/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration,
NSLocalizedRecoverySuggestion=The plug-in or one of its prerequisite
plug-ins may be missing or damaged and may need to be reinstalled.,
DVTPlugInDYLDErrorMessageErrorKey=dlopen(/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration,
0): Library not loaded:
/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator\n
Referenced from:
/Applications/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit\n
Reason: image not found, NSLocalizedDescription=Loading a plug-in
failed.,
NSFilePath=/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework,
NSLocalizedFailureReason=The plug-in
\U201ccom.apple.dt.IDE.IDEInterfaceBuilderCocoaTouchIntegration\U201d
at path
\U201c/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework\U201d
could not be loaded. The plug-in or one of its prerequisite plug-ins
may be missing or damaged., NSUnderlyingError=0x7fc8df3cb340 {Error
Domain=NSCocoaErrorDomain Code=3587
\"dlopen_preflight(/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration):
Library not loaded:
/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator\n
Referenced from:
/Applications/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit\n
Reason: image not found\" UserInfo={NSLocalizedFailureReason=The
bundle is damaged or missing necessary resources.,
NSLocalizedRecoverySuggestion=Try reinstalling the bundle.,
NSFilePath=/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration,
NSDebugDescription=dlopen_preflight(/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration):
Library not loaded:
/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator\n
Referenced from:
/Applications/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit\n
Reason: image not found,
NSBundlePath=/Applications/Xcode-beta.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework,
NSLocalizedDescription=The bundle
\U201cIDEInterfaceBuilderCocoaTouchIntegration\U201d couldn\U2019t be
loaded because it is damaged or missing necessary resources.}}}"; }
I had the same issue. I have reinstalled XcodeSystemResources.pkg package. You will find it in here:
/Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg
The installer will recreate /Library/Developer/PrivateFrameworks folder with its content. After that Xcode 9 started working for me.
Filtered syslog:
None found
Dyld Error Message:
Dyld Message: Library not loaded: #rpath/RichRelevanceSDK.framework/RichRelevanceSDK
Referenced from: /var/mobile/Containers/Bundle/Application/2B4C7D0D-F3B9-404D-A27E-1023D3468B7B/RRTestApp.app/RRTestApp
Reason: image not found
Dyld Version: 370.6
Binary Images:
0xe6000 - 0x5a9fff RRTestApp armv7 /var/mobile/Containers/Bundle/Application/2B4C7D0D-F3B9-404D-A27E-1023D3468B7B/RRTestApp.app/RRTestApp
0x1feef000 - 0x1ff16fff dyld armv7s /usr/lib/dyld
When I use the web application, the application logs me out. I think it might be an IIS recycle.
EventViewer Message:
.NET Runtime version 2.0.50727.4927 - Fatal Execution Engine Error (000007FEF582FA42) (80131506)
----------
Faulting application name: w3wp.exe, version: 7.5.7600.16385, time stamp: 0x4a5bd0eb
Faulting module name: mscorwks.dll, version: 2.0.50727.4927, time stamp: 0x4a27466f
Exception code: 0xc0000005
Fault offset: 0x00000000006be81f
Faulting process id: 0x%9
Faulting application start time: 0x%10
Faulting application path: %11
Faulting module path: %12
Report Id: %13
-------------
Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0
Problem signature:
P1: w3wp.exe
P2: 7.5.7600.16385
P3: 4a5bd0eb
P4: mscorwks.dll
P5: 2.0.50727.4927
P6: 4a27466f
P7: c0000005
P8: 00000000006be81f
P9:
P10:
Attached files:
These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_w3wp.exe_6a41af6fc5f73afd65a4b62225f4f0ff51ba820_60e9d666
Analysis symbol:
Rechecking for solution: 0
Report Id: d745615a-e67c-11df-83c0-d8d385b73c58
Report Status: 4
I analyzed the crash dump with windbg but I dont know how can I solve and what is problem:
0:056> !analyze -v
*******************************************************************************
* *
* Exception Analysis *
* *
*******************************************************************************
Unable to load image C:\Windows\assembly\NativeImages_v2.0.50727_64\mscorlib\9a017aa8d51322f18a40f414fa35872d\mscorlib.ni.dll, Win32 error 0n2
*** WARNING: Unable to verify checksum for mscorlib.ni.dll
Unable to load image C:\Windows\assembly\NativeImages_v2.0.50727_64\System.Web.RegularE#\bf11731ff6e75c72e9939a05151e7484\System.Web.RegularExpressions.ni.dll, Win32 error 0n2
*** WARNING: Unable to verify checksum for System.Web.RegularExpressions.ni.dll
Unable to load image C:\Windows\assembly\NativeImages_v2.0.50727_64\System.Web\d753bba0990df9a19883f05d5b681d3b\System.Web.ni.dll, Win32 error 0n2
*** WARNING: Unable to verify checksum for System.Web.ni.dll
Unable to load image C:\Windows\assembly\NativeImages_v2.0.50727_64\System.Data\46a0336046744a9f29986b208b8d38d4\System.Data.ni.dll, Win32 error 0n2
*** WARNING: Unable to verify checksum for System.Data.ni.dll
Unable to load image C:\Windows\winsxs\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7600.16385_none_2b4f45e87195fcc4\GdiPlus.dll, Win32 error 0n2
*** WARNING: Unable to verify timestamp for GdiPlus.dll
Unable to load image C:\Windows\assembly\NativeImages_v2.0.50727_64\System\247913fa7ae6fcf04ea33d28d24ab611\System.ni.dll, Win32 error 0n2
*** WARNING: Unable to verify checksum for System.ni.dll
GetPageUrlData failed, server returned HTTP status 500
URL requested: http://watson.microsoft.com/StageOne/w3wp_exe/7_5_7600_16385/4a5bd0eb/mscorwks_dll/2_0_50727_4927/4a27466f/c0000005/006be81f.htm?Retriage=1
FAULTING_IP:
mscorwks!COMCryptography::_GetKeyParameter+24f
000007fe`f5dde81f 418b4514 mov eax,dword ptr [r13+14h]
EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 000007fef5dde81f (mscorwks!COMCryptography::_GetKeyParameter+0x000000000000024f)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: 0000000000000014
Attempt to read from address 0000000000000014
PROCESS_NAME: w3wp.exe
ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
EXCEPTION_PARAMETER1: 0000000000000000
EXCEPTION_PARAMETER2: 0000000000000014
READ_ADDRESS: 0000000000000014
FOLLOWUP_IP:
mscorwks!COMCryptography::_GetKeyParameter+24f
000007fe`f5dde81f 418b4514 mov eax,dword ptr [r13+14h]
MOD_LIST: <ANALYSIS/>
NTGLOBALFLAG: 0
APPLICATION_VERIFIER_FLAGS: 0
MANAGED_STACK: !dumpstack -EE
No export dumpstack found
MANAGED_BITNESS_MISMATCH:
Managed code needs matching platform of sos.dll for proper analysis. Use 'x64' debugger.
ADDITIONAL_DEBUG_TEXT: Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD]
LAST_CONTROL_TRANSFER: from 000007fef3a0bf50 to 000007fef5dde81f
FAULTING_THREAD: ffffffffffffffff
DEFAULT_BUCKET_ID: NOSOS
PRIMARY_PROBLEM_CLASS: NOSOS
BUGCHECK_STR: APPLICATION_FAULT_NOSOS_NULL_CLASS_PTR_DEREFERENCE_INVALID_POINTER_READ_WRONG_SYMBOLS_CALL_STACKIMMUNE
STACK_TEXT:
00000000`00000000 00000000`00000000 w3wp.exe+0x0
SYMBOL_NAME: w3wp.exe
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: w3wp
IMAGE_NAME: w3wp.exe
DEBUG_FLR_IMAGE_TIMESTAMP: 4a5bd0eb
STACK_COMMAND: ** Pseudo Context ** ; kb
FAILURE_BUCKET_ID: NOSOS_c0000005_w3wp.exe!Unknown
BUCKET_ID: X64_APPLICATION_FAULT_NOSOS_NULL_CLASS_PTR_DEREFERENCE_INVALID_POINTER_READ_WRONG_SYMBOLS_CALL_STACKIMMUNE_w3wp.exe
Followup: MachineOwner
I solved this problem.
Solution Steps:
First I open ControlPanel> ActionCenter> Problem Reports
I saw list of problems. and my IIS Crash problem.
I entered item detail and save it is dumps.
I downloaded Windbg then open this dump with it.
and enter command !analyze -v
Windbg analized and show a text like this:
GetPageUrlData failed, server returned HTTP status 404
URL requested: http://watson.microsoft.com/StageOne/w3wp_exe/7_5_7600_16385/4a5bd0eb/mscorwks_dll/2_0_50727_4927/4a27466f/c0000005/006be81f.htm?Retriage=1
FAULTING_IP:
mscorwks!COMCryptography::_GetKeyParameter+24f
000007fe`f5dde81f 418b4514 mov eax,dword ptr [r13+14h]
EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 000007fef5dde81f (mscorwks!COMCryptography::_GetKeyParameter+0x000000000000024f)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: 0000000000000014
Attempt to read from address 0000000000000014
PROCESS_NAME: w3wp.exe
ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
EXCEPTION_PARAMETER1: 0000000000000000
EXCEPTION_PARAMETER2: 0000000000000014
READ_ADDRESS: 0000000000000014
FOLLOWUP_IP:
mscorwks!COMCryptography::_GetKeyParameter+24f
000007fe`f5dde81f 418b4514 mov eax,dword ptr [r13+14h]
MOD_LIST: <ANALYSIS/>
NTGLOBALFLAG: 0
APPLICATION_VERIFIER_FLAGS: 0
MANAGED_STACK: !dumpstack -EE
No export dumpstack found
MANAGED_BITNESS_MISMATCH:
Managed code needs matching platform of sos.dll for proper analysis. Use 'x64' debugger.
ADDITIONAL_DEBUG_TEXT: Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD]
LAST_CONTROL_TRANSFER: from 000007fef3a0bf50 to 000007fef5dde81f
FAULTING_THREAD: ffffffffffffffff
DEFAULT_BUCKET_ID: NOSOS
PRIMARY_PROBLEM_CLASS: NOSOS
BUGCHECK_STR: APPLICATION_FAULT_NOSOS_NULL_CLASS_PTR_DEREFERENCE_INVALID_POINTER_READ_WRONG_SYMBOLS_CALL_STACKIMMUNE
STACK_TEXT:
00000000`00000000 00000000`00000000 w3wp.exe+0x0
SYMBOL_NAME: w3wp.exe
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: w3wp
IMAGE_NAME: w3wp.exe
DEBUG_FLR_IMAGE_TIMESTAMP: 4a5bd0eb
STACK_COMMAND: ** Pseudo Context ** ; kb
FAILURE_BUCKET_ID: NOSOS_c0000005_w3wp.exe!Unknown
BUCKET_ID: X64_APPLICATION_FAULT_NOSOS_NULL_CLASS_PTR_DEREFERENCE_INVALID_POINTER_READ_WRONG_SYMBOLS_CALL_STACKIMMUNE_w3wp.exe
WATSON_STAGEONE_URL:
Followup: MachineOwner
0:056> .exr 0xffffffffffffffff
ExceptionAddress: 000007fef5dde81f (mscorwks!COMCryptography::_GetKeyParameter+0x000000000000024f)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: 0000000000000014
Attempt to read from address 0000000000000014
So I added this code to Decrypt Method: if (String.IsNullOrEmpty(value)) return String.Empty;
public static string Decrypt(string value)
{
SymmetricAlgorithm algorithm = SymmetricAlgorithm.Create();
ICryptoTransform decryptor = algorithm.CreateDecryptor(EncryptionKey, EncryptionVector);
// I control value
**if (String.IsNullOrEmpty(value))
return String.Empty;**
byte[] encryptedBytes = Convert.FromBase64String(value);
MemoryStream memoryStream = new MemoryStream(encryptedBytes);
CryptoStream cryptoStream = new CryptoStream(memoryStream, decryptor, CryptoStreamMode.Read);
...
}
problem was solved.
I know I'm late, but I just debug a similar problem with WinDbg. I finally managed to find the cause of the problem.
It's a reported bug at microsoft:
http://connect.microsoft.com/VisualStudio/feedback/details/330926/cryptostream-flushfinalblock-fatal-on-64-bit-os-if-bytearray-is-null
I just add this to the discussion as a lead for others who search the web.
Tess Ferrandez has some great tutorials and information on how to use DebugDiag and WinDbg to nail down why this is happening:
If it is broken, fix it you should
There's also a lab to walk you through analysing worker process crashes:
.NET Debugging Demos Lab 5: Crash
.NET Debugging Demos Lab 2: Crash - Review
I ran into exactly the same symptoms, and the real reason was that I accidentally created an infinite recursion, which in turn caused a stack overflow. Please note that you need to restart the app pool after correcting the error.
The ASP.NET worker process is crashing with Access Violation. This is usually a result of dereferencing a NULL or an invalid pointer. Attempting to access a null reference in C# normally generates a managed exception which ASP.NET is capable of catching, I would assume that your web app is using COM interop or is invoking unmanaged (C++) code that crashes.
Unfortunately, that's about as much as we can tell you from the info above. You will need to debug your process to understand the exact cause of the crash.