that is some fine debugging you did there!
Please note that the patch you sent makes changes to code that was
generated by crossmobile. For a proper fix, checkout crossmobile, edit
file advisor.xml and look for the line <alias name ="__NSCFDictionary"/>
Underneath you should add a second alias for __NSDictionaryM. Once you
have done that, run ant gen-xmlvm-ios in the crossmobile directory. This
will re-generate the wrapper code.
Arno
On 3/24/13 1:33 PM, JR Schmidt wrote:
> To follow up on my own question, I resolved this. This was tricky,
> since the debugger was of limited use as one cannot trace into native code.
>
> The crash happens in UIApplication:didFinishLaunching with options, but
> BEFORE hitting the "Java" version of this subroutine. It actually
> happens while trying to "wrap" the NSDictionary "launchOptions"
> argument, which explains why this only occurs when launching from Mail,
> and not from the home screen.
>
> The crash is due to a "bug" (really, omission) in the WRAPPER_CREATOR of
> NSDictionary. See patch below:
>
> --- src/xmlvm2c/lib/wrapper/org_xmlvm_ios_NSDictionary.m (revision 1)
> +++ src/xmlvm2c/lib/wrapper/org_xmlvm_ios_NSDictionary.m (working copy)
> @@ -17,7 +17,7 @@
>
> static JAVA_OBJECT __WRAPPER_CREATOR(NSObject* obj)
> {
> - if([obj class] == [NSDictionary class] || ([NSStringFromClass([obj
> class]) isEqual:@"__NSCFDictionary"]))
> + if([obj class] == [NSDictionary class] || ([NSStringFromClass([obj
> class]) isEqual:@"__NSCFDictionary"]) || ([NSStringFromClass([obj
> class]) isEqual:@"__NSDictionaryM"]))
> {
> [obj retain];
> JAVA_OBJECT jobj = __NEW_org_xmlvm_ios_NSDictionary();
>
>
> JR
>
|