I have a strange problem, if I deploy my app through visual studio as debug or release version all is working well. But if I publish it to the store and download it from there the app crashes after Launcher.LaunchFileAsync or FileOpenPicker.
When my app launches for example the default app for photos, the photo is loaded into the photo app and got displayed. After pushing the Hardwarebackbutton, the store installation goes back to the windows phone home screen, the visual studio deployed version goes back to the last screen of my app. The same issue is with the FileOpenPicker.
In a previous version of my app this works and I haven't changed the code around this. New in this version is the usage of Unity and Prism (in the previous I haven't used any container framework).
I tried to debug this with an store beta app and write all UnhandledExceptions to a file in LocalStorage, but it seems that there are no UnhandledException.
Does anyone had the same problems and have some hints or experiences to find out the problem? Is there any possibility to debug my app downloaded from the store?
Exception from the store:
"Frame Bild Funktion Offset
0 Windows.UI.Xaml.dll DirectUI::NavigationHistory::WritePageStackEntryToString 0x000000f9
1 Windows.UI.Xaml.dll DirectUI::NavigationHistory::GetNavigationState 0x000000d7
2 Windows.UI.Xaml.dll DirectUI::Frame::GetNavigationStateImpl 0x0000002f
3 Windows.UI.Xaml.dll DirectUI::FrameGenerated::GetNavigationState 0x00000033
4 WINDOWS.NI.WINMD 0x00403a41
5 Microsoft.Practices.Prism.StoreApps.ni.DLL 0x0000c661
6 Microsoft.Practices.Prism.StoreApps.ni.DLL 0x0000d191
7 Microsoft.Practices.Prism.StoreApps.ni.DLL 0x0000e739
8 Microsoft.Practices.Prism.StoreApps.ni.DLL 0x0000f5df
9 Microsoft.Practices.Prism.StoreApps.ni.DLL 0x0000cc81
10 Microsoft.Practices.Prism.StoreApps.Phone.ni.DLL 0x00005ed3
11 Microsoft.Practices.Prism.StoreApps.Phone.ni.DLL 0x000063f3
12 Microsoft.Practices.Prism.StoreApps.Phone.ni.DLL 0x00005723
13 WINDOWS.NI.WINMD 0x004bacc5
14 CoreClr.dll COMToCLRDispatchHelper 0x0000003d
15 CoreClr.dll GenericComCallStub 0x00000019
16 Windows.UI.Xaml.dll Microsoft::WRL::EventSource_Windows::UI::Xaml::ISuspendingEventHandler,Microsoft::WRL::InvokeModeOptions_-2_ _::DoInvoke__lambda_23bdf1386dc85166ec5d0f15e3e7ceef_ _ 0x00000047
17 Windows.UI.Xaml.dll XAML::PLM::ASTAEventSource_Windows::UI::Xaml::ISuspendingEventHandler,IInspectable,Windows::ApplicationModel::ISuspendingEventArgs_::InvokeHandlers 0x0000000d
18 Windows.UI.Xaml.dll XAML::PLM::PLMHandler::OnSuspending 0x00000095
19 twinapi.appcore.dll Microsoft::WRL::InvokeTraits_-2_::InvokeDelegates__lambda_19fa2f90eeadc306808dc8b8c64b7666_,Windows::Foundation::IEventHandler_Windows::ApplicationModel::SuspendingEventArgs *_ _ 0x00000057
20 twinapi.appcore.dll Microsoft::WRL::EventSource_Windows::Foundation::IEventHandler_Windows::ApplicationModel::SuspendingEventArgs *_,Microsoft::WRL::InvokeModeOptions_-2_ _::DoInvoke__lambda_19fa2f90eeadc306808dc8b8c64b7666_ _ 0x0000004d
21 twinapi.appcore.dll Windows::ApplicationModel::Core::CoreApplicationView::SuspendResume 0x000000b3
22 twinapi.appcore.dll _lambda_806d9f75e467416c61267ff2e6219463_::operator 0x00000055
23 twinapi.appcore.dll Microsoft::WRL::Details::InvokeHelper_Microsoft::WRL::Implements_Microsoft::WRL::RuntimeClassFlags_2_,Windows::UI::Core::IDispatchedHandler,Microsoft::WRL::FtmBase,Microsoft::WRL::Details::Nil,Microsoft::WRL::Details::Nil,Microsoft::WRL::Detai 0x0000000f
24 windows.ui.dll Windows::UI::Core::CDispatcher::ProcessInvokeItem 0x000001b3
25 windows.ui.dll Windows::UI::Core::CDispatcher::WaitAndProcessMessages 0x000001dd
26 windows.ui.dll Windows::UI::Core::CDispatcher::ProcessEvents 0x00000063
27 Windows.UI.Xaml.dll CJupiterWindow::RunCoreWindowMessageLoop 0x0000003b
28 Windows.UI.Xaml.dll CJupiterControl::RunMessageLoop 0x0000001b
29 Windows.UI.Xaml.dll DirectUI::DXamlCore::RunMessageLoop 0x00000027
30 Windows.UI.Xaml.dll DirectUI::FrameworkView::Run 0x0000000f
31 twinapi.appcore.dll Windows::ApplicationModel::Core::CoreApplicationView::Run 0x00000027
32 twinapi.appcore.dll _lambda_57350c7fa2f68b1d43d8bfac2a0781a8_::operator 0x000000c7
33 shcore.dll _WrapperThreadProc 0x00000149
34 ntdll.dll RtlUserThreadStart 0x00000017"
Looks like you failed to use LaunchFileAsync/FileOpenPicker correctly. Follow this guide carefully.
Unless debugging, OS terminates your process just after you've called the picker (especially on low-memory devices with 512MB RAM). It's up to your application to save its state, and when reactivated restore the state and take user to the exact place in your app where she was.
Also, here’s how you can debug the problem.
Related
I am using the Apple NameAndPassword Xcode example to customize the macOS login experience. My goal is authenticate a user against Active Directory. I am using the NameAndPassword example as a jumping board to understanding the macOS login process. I don't particularly need a custom UI, but from looking at several threads, the example can also work with PAM authentication.
I am running the NameAndPassword plugin which I built on Catalina. I am performing local code signing. When I log out, the loginwindow app should call the invoke method of my plugin and show a custom SFAuthorizationView, which does not appear. I see the following error in the system.log...
Jan 24 11:20:48 Kolyas-Mac SecurityAgentHelper[890]: objc[890]: CLASS: class 'EXAuthorizationPlugin' 0x104fb7d58 small method list 0x104fb1ec8 is not in immutable memory
Jan 24 11:20:48 Kolyas-Mac com.apple.xpc.launchd[1] (com.apple.security.agent.login.00000000-0000-0000-0000-0000000186E3[883]): Service exited due to SIGILL | sent by exc handler[883]
and see that the SecurityAgentHelper crashes with the following...
Application Specific Information:
dyld3 mode
CLASS: class 'EXAuthorizationPlugin' 0x104fb7d58 small method list 0x104fb1ec8 is not in immutable memory
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff6d368ad6 __abort_with_payload + 10
1 libsystem_kernel.dylib 0x00007fff6d36a3df abort_with_payload_wrapper_internal + 80
2 libsystem_kernel.dylib 0x00007fff6d36a38f abort_with_reason + 19
3 libobjc.A.dylib 0x00007fff6c070820 _objc_fatalv(unsigned long long, unsigned long long, char const*, __va_list_tag*) + 114
4 libobjc.A.dylib 0x00007fff6c0707ae _objc_fatal(char const*, ...) + 135
5 libobjc.A.dylib 0x00007fff6c063e13 realizeClassWithoutSwift(objc_class*, objc_class*) + 2184
6 libobjc.A.dylib 0x00007fff6c0636a0 realizeClassWithoutSwift(objc_class*, objc_class*) + 277
7 libobjc.A.dylib 0x00007fff6c0634bb realizeClassMaybeSwiftMaybeRelock(objc_class*, mutex_tt<false>&, bool) + 317
8 libobjc.A.dylib 0x00007fff6c062ff4 initializeAndMaybeRelock(objc_class*, objc_object*, mutex_tt<false>&, bool) + 104
9 libobjc.A.dylib 0x00007fff6c053d45 lookUpImpOrForward + 1072
10 libobjc.A.dylib 0x00007fff6c053399 _objc_msgSend_uncached + 73
11 com.apple.securityAgentPlugin.NameAndPassword 0x0000000104faee74 AuthorizationPluginCreate + 148 (main.m:66)
Any suggestions on how to resolve this error? Would this be a compiler issue? Maybe a directive for memory?
This is the offending code:
OSStatus AuthorizationPluginCreate(const AuthorizationCallbacks *callbacks,
AuthorizationPluginRef *outPlugin,
const AuthorizationPluginInterface **outPluginInterface)
{
os_log_with_type(OS_LOG_DEFAULT, OS_LOG_TYPE_DEBUG, "AuthorizationPluginCreate");
*outPlugin = [[EXAuthPlugin alloc] initWithCallbacks:callbacks pluginInterface:outPluginInterface];
return noErr;
}
I got the same error when porting my iPad app to Mac using Catalyst. My app needed access to AppKit specific methods, and I added a bundle plugin following this guide. The program worked fine on my MacBook Air M1 running Monterey, but crashed on my 2012 MacBook Pro running Catalina with the error:
CLASS: class 'AppKitBridge.AppKitBridge' 0x11668c388 small method list
0x116687508 is not in immutable memory
After I changed the bundle identifier in the plugin bundle from $(PRODUCT_BUNDLE_IDENTIFIER).AppKitBridge to $(PRODUCT_BUNDLE_IDENTIFIER), and set the plugins deployment target to 10.15, the problem went away.
I have found that installing and using custom keyboard works fine for my app when launching from Xcode, but if I release it to TestFlight or the AppStore then it crashes when a user clicks on a textbox and tries to bring up the keyboard. As far as I am aware there is nothing special about any of the textboxes in my app. The stack trace is:
Thread : Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 6512725832 __exceptionPreprocess
1 libobjc.A.dylib 6869942144 objc_exception_throw
2 CoreFoundation 6512725528 +[NSException raise:format:]
3 Foundation 6528403996 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
4 UIKit 6606881444 -[UIColor encodeWithCoder:]
5 Foundation 6528169072 _encodeObject
6 Foundation 6528197336 +[NSKeyedArchiver archivedDataWithRootObject:]
7 UIKit 6609904352 -[_UIAppearanceRecorder _recordInvocation:withClassName:containerClassNames:traitCollection:selectorString:forRemoteProcess:]
8 UIKit 6609884356 __54+[_UIAppearance _recordersExcludingSource:withWindow:]_block_invoke
9 CoreFoundation 6511594744 __65-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke
10 CoreFoundation 6511594448 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]
11 UIKit 6609883592 +[_UIAppearance _recordersExcludingSource:withWindow:]
12 UIKit 6611900724 UIViewServiceCurrentAppearanceSerializedRepresentations
13 UIKit 6610654700 +[_UIRemoteViewController _requestViewController:traitCollection:fromServiceWithBundleIdentifier:service:connectionHandler:]
14 UIKit 6610654160 +[_UIRemoteViewController requestViewControllerWithService:connectionHandler:]
15 UIKit 6609355772 __117-[NSExtension(UIViewControllerAdditions) instantiateViewControllerWithInputItems:listenerEndpoint:connectionHandler:]_block_invoke_2
16 libdispatch.dylib 6878402280 _dispatch_call_block_and_release
17 libdispatch.dylib 6878402216 _dispatch_client_callout
18 libdispatch.dylib 6878424496 _dispatch_main_queue_callback_4CF
19 CoreFoundation 6512427512 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
20 CoreFoundation 6512418912 __CFRunLoopRun
21 CoreFoundation 6511561888 CFRunLoopRunSpecific
22 GraphicsServices 6701891720 GSEventRunModal
23 UIKit 6602887164 UIApplicationMain
24 MyApp 4296179280 main (main.m:16)
25 libdyld.dylib 6878603448 start
Looking at the live device console I see the following messages:
Dec 8 15:22:11 cjhills-iPhone poc[371] <Error>: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Only RGBA or White color spaces are supported in this situation.'
*** First throw call stack:
(0x18244cf48 0x1978f7f80 0x18244ce18 0x183340a1c 0x187e182a4 0x183307470 0x18330e2d8 0x1880fa2e0 0x1880f54c4 0x182338cf8 0x182338bac 0x1880f51c8 0x1882e1934 0x1881b15ec 0x1881b13d0 0x1880743fc 0x1981096e8 0x1981096a8 0x19810edb0 0x1824041f8 0x182402060 0x182330ca0 0x18d8b4088 0x187a48ffc 0x10014e434 0x19813a8b8)
Dec 8 15:22:11 cjhills-iPhone SpringBoard[58] <Warning>: HW kbd: Failed to set (null) as keyboard focus
Dec 8 15:22:11 cjhills-iPhone SpringBoard[58] <Warning>: HW kbd: Failed to set (null) as keyboard focus
Dec 8 15:22:11 cjhills-iPhone SwiftKey[337] <Warning>: host connection <NSXPCConnection: 0x14ce60290> connection from pid 371 invalidated
Dec 8 15:22:11 cjhills-iPhone SpringBoard[58] <Warning>: UNNotificationRegistrarConnectionListener connection invalidated
Dec 8 15:22:11 cjhills-iPhone com.apple.xpc.launchd[1] (UIKitApplication:com.cjhill.myapp[0x5a38][371]) <Notice>: Service exited due to signal: Abort trap: 6
Dec 8 15:22:11 cjhills-iPhone diagnosticd[85] <Error>: unable to find offset 0x9812fa5c in shared cache for arch 'arm64'
Dec 8 15:22:11 cjhills-iPhone ReportCrash[372] <Notice>: platform_thread_get_unique_id matched 66610
Dec 8 15:22:11 cjhills-iPhone ReportCrash[372] <Notice>: Formulating report for corpse[371] myapp
Dec 8 15:22:11 cjhills-iPhone ReportCrash[372] <Warning>: saved type '109_myapp' report (2 of max 25) as /var/mobile/Library/Logs/CrashReporter/myapp_2015-12-08-152211_cjhills-iPhone.ips
Dec 8 15:22:11 cjhills-iPhone SpringBoard[58] <Warning>: Application 'UIKitApplication:com.cjhill.myapp[0x5a38]' crashed.
Dec 8 15:22:11 cjhills-iPhone UserEventAgent[26] <Warning>: 549612077011: id=com.cjhill.myapp pid=371, state=0
It appears from the stack trace that you use UIAppearance proxies to set up your App's appearance.
An interesting quirk of iOS extensions is that the customizations made in the other apps using this API are actually passed to extensions contained in the app (at least in the case of keyboard extensions).
To ensure security, all objects passed must be encoded using NSSecureCoding, which therefore requires that any objects you use in UIAppearance must conform to this protocol (and actually fulfill what it promises), as long as a user is using a keyboard extension in your app.
It appears that your app in this case is attempting to pass a color which can't be archived. Perhaps you are using an image as a color using +[UIColor colorWithPatternImage:], which would fit the error -- an image probably has no color in the sense UIColor means.
I recommend you audit your app's code for any instances where a UIAppearance is used to set a color, particularly when exotic calls like colorWithPatternedImage: are used, and remove them. Perhaps swizzle all UIAppearance calls to no-ops, push up an internal beta in TestFlight, and see if the problem is solved to confirm that this is the issue.
Regardless of which of these it is: File a bug with Apple. Apps should not crash just because they can't encode their UIAppearance correctly, especially when doing something that is, frankly, undesirable.
EDIT: it is possible to reproduce this issue without using TestFlight, whilst running an app in release (you can turn this on by going to product->scheme->edit scheme) by adding a line of code to set the background color of a UIButton to a UIColor which is a patterned color, then invoking a keyboard extension.
I am populating a tableview which get data from an array. It has multiple selection and reloading multiple times. There's no problem in logic. It works fine on iOS 7, 8 but crash on iOS 9.02 with this error.
Any solution please ?
: HW kbd: Failed to set (null) as keyboard focus
Oct 14 10:40:06 iPhone SpringBoard[48] :
UNNotificationRegistrarConnectionListener connection invalidated
Oct 14 10:40:06 iPhone com.apple.xpc.launchd[1]
(UIKitApplication:com.projectname.catalogue[0x743e][369]) :
Service exited due to signal: Segmentation fault: 11
Oct 14 10:40:06 iPhone SpringBoard[48] : Application
'UIKitApplication:com.project_name.catalogue[0x743e]' crashed.
Oct 14 10:40:06 iPhone UserEventAgent[23] : 676658830601:
id=com.project_name.catalogue pid=369, state=0
Oct 14 10:40:06 iPhone ReportCrash[370] : Formulating report
for corpse[369] projectname
Oct 14 10:40:06 iPhone ReportCrash[370] :
platform_thread_get_unique_id matched 113197
Oct 14 10:40:06 iPhone ReportCrash[370] : saved type
'109_projectname' report (3 of max 25) as
/var/mobile/Library/Logs/CrashReporter/project_name_2015-10-14-104006_iPhone.ips
Oct 14 10:40:11 iPhone kernel[0] : AppleARMPMUCharger:
limiting USB input current to 500 mA (measured 519 mA)
Oct 14 10:40:11 iPhone kernel[0] : AppleARMPMUCharger:
limiting USB input current to 400 mA (measured 513 mA)
iOS 9.0 demands compulsory to create property for some classes. For example, I created UIImageView without property. When I accessed Table Cell again and again with multiple reloading, it does not able to save previous value of the property. And then it causes to crashes. But iOS<9.0 does show any crash.
I updated Xcode to the latest version via the App Store, as it normal.
I am unable to open any existing project.
I have deleted all Derived Data and have restarted my laptop. Still crashing. And, I have no 3rd party plug ins.
I am including most of the dump. Didn't include the binary images data.
It appears that it might be related to the interface builder. The one app that I want to open, has the Storyboard as the foremost tab.
Thanks for any help in solving this.
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 6D1002
ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilder/IDEInterfaceBuilder-7702/Foundation/Utilities/IBFoundationAdditions.m:3148
Details: No object for "NSFont" key.
Object: <NSDictionary>
Method: +ib_strictDictionaryWithKeysAndObjects:
Thread: <NSThread: 0x7ffa00c39650>{number = 1, name = main}
Hints: None
Backtrace:
0 0x000000010520cbfa -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:message Format:arguments:] (in IDEKit)
1 0x0000000103f6ab9f _DVTAssertionHandler (in DVTFoundation)
2 0x0000000103f6ae8e _DVTAssertionFailureHandler (in DVTFoundation)
3 0x000000010b307ab6 +[NSDictionary(IBDictionaryAdditions) ib_strictDictionaryWithKeysAndObjects:] (in IBFoundation)
4 0x000000010fb0e22f IBTextAttributesWithFontColorShadowAndAlignment (in IDEInterfaceBuilderKit)
5 0x000000010fb0e000 __48+[IBViewControllerPlaceholderStyle defaultStyle]_block_invoke (in IDEInterfaceBuilderKit)
6 0x00007fff8d1adc13 _dispatch_client_callout (in libdispatch.dylib)
7 0x00007fff8d1adb26 dispatch_once_f (in libdispatch.dylib)
8 0x000000010fb0dd8e +[IBViewControllerPlaceholderStyle defaultStyle] (in IDEInterfaceBuilderKit)
9 0x000000010fb0e458 IBDrawViewPlaceholder (in IDEInterfaceBuilderKit)
10 0x00000001141e23f9 (in IDEInterfaceBuilderCocoaTouchIntegration)
I fixed this by fixing another issue. OS X app store kept crashing on installation of 10.10. Solved it by downloading 10.10 from Apple directly.
Then, the issue with Xcode just simply went away! And, now app store app works right. Must have been some corruption in the app store itself.
I am trying to use the CorePlot 0.9 binding for monomac, but that seems to be a hard task. The monotouch sample builds and runs without any problems, but I don't need that one.
Since only a CorePlotiOS.dll was present in the binding, I had to build one for osx myself, but first of af all, no bmake.exe was present, so I had to download the monomac source and build it myself first. Then I tried to build the CorePlotOSX.dll but that caused some compilation problems. Looking at the build-script for mono touch I tried with this line instead:
MONO_PATH=$(MONOMAC)/src mono $(MONOMAC)/src/bmac.exe -e -unsafe coreplot.cs -s=enums.cs -x=extras.cs -x=AssemblyInfo.cs --sourceonly=list --tmpdir=osx -r:System.Drawing -r:MonoMac -lib:$(MONOMAC)/src -baselib:$(MONOMAC)/src/MonoMac.dll .
Anything wrong there?
I have reduced the problem to this:
graph = new CPTPieChart();
graph.Title = "Test";
The allocation seems to survive, but whenever I try to access the object, I crash:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000bf887fac
VM Regions Near 0xbf887fac:
Stack 00000000b038d000-00000000b040e000 [ 516K] rw-/rwx SM=COW
--> Stack 00000000bc088000-00000000bf888000 [ 56.0M] ---/rwx SM=NUL
Stack 00000000bf888000-00000000c0088000 [ 8192K] rw-/rwx SM=COW
Application Specific Information:
objc[17645]: garbage collection is OFF
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x97c8aebc __CFStringEncodeByteStream + 12
1 com.apple.Foundation 0x9ac8ed49 -[NSString(NSStringOtherEncodings) getBytes:maxLength:usedLength:encoding:options:range:remainingRange:] + 263
2 com.apple.Foundation 0x9ac8e8ee bytesInEncoding + 213
3 com.apple.Foundation 0x9ac8e814 -[NSString(NSStringOtherEncodings) UTF8String] + 42
4 com.apple.CoreFoundation 0x97ce478c -[__NSCFString UTF8String] + 204
5 ??? 0x00f91208 0 + 16323080
6 ??? 0x030d708c 0 + 51212428
7 ??? 0x030d703c 0 + 51212348
8 ??? 0x016877d4 0 + 23623636
Any ideas? Running Mac OSX 10.7.5 btw.
Ok, that was hard. After several days of fighting xcode and monomac, it turned out, that the native CorePlot framework (dynamic lib) was not loaded. I was not aware, that I was supposed to load it myself (I am a monomac newbie, sorry...but isn't it rather ugly it fails silently in that way??)
Two ways to do this: either
Dlfcn.dlopen ("CorePlot.framework/CorePlot", 2); // 2 = load now, 0 = lazy load
or [assembly:MonoMac.RequiredFramework("CorePlot.framework/CorePlot")]