Error while upgrading to latest version of PDFTron - ios

I was using the previous version of PDFTron for iOS (6.5.4a). Now since a new version is available so I decided to upgrade to 6.7.2 . I am using static framework. Now when I open a pdf, go back from it and again try to open the same pdf the app crashes with the following error :
libc++abi.dylib: terminating with uncaught exception of type trn::Common::Exception: Exception:
Message: Bad image dimensions
Conditional expression: inout_size.x>0 && inout_size.y>0
Version : 6.7.1.53210N
Filename : PDFDraw.cpp
Function : CalcDevMtxFromSize
Linenumber : 239

There have been improvements to image reading, and this exception should no longer occur. Please update to the latest version. If the latest version doesn't help, then we would need access to the file in question.

Related

After Updating iZettle SDK 3 in Xcode issue occur

After updating iZettle SDK 3, shows a error and build failed.
The error is
No visible #interface for 'iZettleSDK' declares the selector 'enforcedUserAccount'
Error showing on this code
[[iZettleSDK shared]enforcedUserAccount];
Project written in Objective-C.
If you search the iZettle SDK on GitHub it quickly becomes apparent that they have refactored this API call into another class - AccountManager.
From : https://github.com/iZettle/sdk-ios/blob/d16ed180a20acc36676222a595db0e7863556ed4/Example/Sample/iZettleSDKSample/ViewController.m#L100
[AccountManager shared].enforcedUserAccount = email.length > 0 ? email : nil;

The type initializer for 'Android.Runtime.UncaughtExceptionHandler' threw an exception

my xamarin android app, which was working fine, started to crash on each launch with this exception.
The app is built from appcenter's build service, as it always has. If i build it locally in Debug or Release mode, it launches fine. Using a device with Android 7.
Did anyone encountered this exception and knows what to do ?
Ty !
18828 W monodroid: Calling into managed runtime init
E mono :
E mono : Unhandled Exception:
E mono : System.TypeInitializationException: The type initializer for 'Android.Runtime.UncaughtExceptionHandler' threw an exception. ---> System.ArgumentNullException: Value cannot be null.
E mono : Parameter name: method
E mono : at System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure, System.Boolean allowClosed) <0x56d026b4 + 0x00d74> in :0
E mono : at System.Delegate.CreateDelegate (System.Type type, System.Reflection.MethodInfo method) <0x56d03594 + 0x0001f> in :0
: at Android.Runtime.UncaughtExceptionHandler..cctor () <0x57d908a4 + 0x0003f> in :0
: --- End of inner exception stack trace ---
: at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_generic_class_init (intptr)
: at Android.Runtime.JNIEnv.Initialize (Android.Runtime.JnienvInitializeArgs* args)
-- EDIT
All AOT/LVVM/Concurrent garbage collector/proguard/multidex options are enabled
-- EDIT 2
Source code of error: https://github.com/xamarin/xamarin-android/blob/master/src/Mono.Android/Android.Runtime/UncaughtExceptionHandler.cs
static UncaughtExceptionHandler ()
{
var mono_UnhandledException = typeof (System.Diagnostics.Debugger)
.GetMethod ("Mono_UnhandledException", BindingFlags.NonPublic | BindingFlags.Static);
mono_unhandled_exception = (Action<Exception>) Delegate.CreateDelegate (typeof(Action<Exception>), mono_UnhandledException);
var ad_due = typeof (AppDomain)
.GetMethod ("DoUnhandledException",
bindingAttr: BindingFlags.NonPublic | BindingFlags.Instance,
binder: null,
types: new []{typeof (UnhandledExceptionEventArgs)},
modifiers: null);
if (ad_due != null) {
AppDomain_DoUnhandledException = (Action<AppDomain, UnhandledExceptionEventArgs>) Delegate.CreateDelegate (
typeof (Action<AppDomain, UnhandledExceptionEventArgs>), ad_due);
}
}
So it seems either mono_UnhandledException is null or AppDomain_DoUnhandledException is null.
Will try to upgrade or downgrade mono version in appcenter. It should be wrong.
-- EDIT 3
AppDomain.cs has changed recently in mono:
https://github.com/mono/mono/commits/c1cbe060f617707258fd5111fd5ffd7ccd581899/mcs/class/corlib/System/AppDomain.cs
But DoUnhandledException has not changed.
-- EDIT 4
Works fine when built/published locally. So the problem is specific to appcenter.
AppCenter has recently released Mono 5.8 bundled with Xamarin.Android 8.2 (which supports TargetFrameworkVersion: 8.1), in order to use it, please change your branch configuration -> Save&Build.
Also filed the issue for investigation by Xamarin.Android team.
In my case, the issue was caused by using Android SDK 8.1 which App Center doesn't support yet.
I had to downgrade to SDK 8.0 and now build works fine.
App Center team promised to add support to SDK 8.1, but they don't have an ETA yet.
we faced the same issue with jenkins and msbuild. rollback to 8.0 as target and disable 'use latest' works. locally, with 'use latest', build tools 26.0.3 and msbuild on macos app works like a charm. not sure what build tools installed on jenkins.
I'm having the same issue in App Center. My Android app is set to target android 8.1 (latest) and builds ok in App Center but when running "launch test" it fails.
The app is running fine locally in Debug and Release modes.
I tried disabling launch test so the app can be distributed to my collaborators. When any of my collabortors download the app and use it, the app doesn't work.
I built it using VSTS and distributed through App Center to my collaborators and they said the app is working, so I can conclude it's an App Center build issue.
I didn't try to build my app using Android 8.0 because some nuget packages only work on Android 8.1 and I didn't have time to downgrade them.

Use different framework for another framework

In my app I want to use Wikitude and Openalpr. I try to integrate both of them as frameworks in my XCode Project. The problem is that if I integrate OpenCV.framework (It is required by Openalpr) I get the following error when initializing Openalpr:
OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /Volumes/Linux/builds/precommit_ios/opencv/modules/imgproc/src/color.cpp, line 7564
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /Volumes/Linux/builds/precommit_ios/opencv/modules/imgproc/src/color.cpp:7564: error: (-215) scn == 3 || scn == 4 in function cvtColor
I think that Wikitude is also using openCV (should be included in the framework already) and I assume it uses a different version of it and Openalpr is not compatible with the version of OpenCV which Wikitude requires. So maybe there is a conflict between these two frameworks and their usage of OpenCV.framework
My question is: Is there a way to import the OpenCV.framework so that only Openalpr.framework can use it and Wikitude.framework still uses it´s version of OpenCV?
Thanks very much!

Trigger.io forge.topbar.setTint() error

I am trying to change colour of top and status bars like so:
forge.topbar.setTint([255,0,0,50], function() {
console.log('Success!');
}, function(content) {
console.log(content);
});
but it spits out the error:
"-[ForgeApp statusBarBox]: unrecognized selector sent to instance 0x16638080"
I am using latest TopBar module Version: 2.2 and Toolkit version 2.0.1
It does not work on iOS7. Maybe this could be an issue?
I resolved this problem by upgrading the platform version to 2.0.3
It's marked as unstable however (2.0.1 is current stable) so YMMV.
I haven't had any crashes yet.
edit: I just saw proxim0 answered this in the comments an hour ago, too.

Blackberry runtime store class cast exception

The following line in my BLackBerry app causes no errors when run with JRE 7 but it gives a ClassCastException otherwise. Does anyone have an idea about what can be wrong?
DataBuffer databuffer =
(DataBuffer) RuntimeStore.getRuntimeStore().get(AppMain.databufferID);

Resources