Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Picture Chooser Android Exception #132

Open
Nickolas- opened this issue Sep 8, 2016 · 0 comments
Open

Picture Chooser Android Exception #132

Nickolas- opened this issue Sep 8, 2016 · 0 comments

Comments

@Nickolas-
Copy link

Nickolas- commented Sep 8, 2016

After updating MvvmCross plugins to latest stable version start receiving exception.


Problem seem in Exit Rotate IllegalArgumentException: filename cannot be null
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3540/1cf254db/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
  at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (JniObjectReference instance, JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x000a7] in /Users/builder/data/lanes/3540/1cf254db/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:12083 
  at Java.Interop.JniPeerMembers+JniInstanceMethods.FinishCreateInstance (System.String constructorSignature, IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00060] in /Users/builder/data/lanes/3540/1cf254db/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods.cs:148 
  at Android.Media.ExifInterface..ctor (System.String filename) [0x0006a] in /Users/builder/data/lanes/3540/1cf254db/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Media.ExifInterface.cs:149 
  at MvvmCross.Plugins.PictureChooser.Droid.MvxPictureChooserTask.ExifRotateBitmap (Android.Content.ContentResolver contentResolver, Android.Net.Uri uri, Android.Graphics.Bitmap bitmap) [0x0000d] in <filename unknown>:0 
  at MvvmCross.Plugins.PictureChooser.Droid.MvxPictureChooserTask.LoadScaledBitmap (Android.Net.Uri uri) [0x00073] in <filename unknown>:0 
  --- End of managed Java.Lang.IllegalArgumentException stack trace ---
java.lang.IllegalArgumentException: filename cannot be null
    at android.media.ExifInterface.<init>(ExifInterface.java:136)
    at md5ee74959b53a1c6d6b08dfbd4ba8a1175.MvxEventSourceAppCompatActivity.n_onActivityResult(Native Method)
    at md5ee74959b53a1c6d6b08dfbd4ba8a1175.MvxEventSourceAppCompatActivity.onActivityResult(MvxEventSourceAppCompatActivity.java:119)
    at android.app.Activity.dispatchActivityResult(Activity.java:6456)
    at android.app.ActivityThread.deliverResults(ActivityThread.java:3695)
    at android.app.ActivityThread.handleSendResult(ActivityThread.java:3742)
    at android.app.ActivityThread.-wrap16(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5417)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

[mvx]   at md5ee74959b53a1c6d6b08dfbd4ba8a1175.MvxEventSourceAppCompatActivity.n_onActivityResult(Native Method)
[mvx]   at md5ee74959b53a1c6d6b08dfbd4ba8a1175.MvxEventSourceAppCompatActivity.onActivityResult(MvxEventSourceAppCompatActivity.java:119)
[mvx]   at android.app.Activity.dispatchActivityResult(Activity.java:6456)
[mvx]   at android.app.ActivityThread.deliverResults(ActivityThread.java:3695)
[mvx]   at android.app.ActivityThread.handleSendResult(ActivityThread.java:3742)
[mvx]   at android.app.ActivityThread.-wrap16(ActivityThread.java)
[mvx]   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393)
[mvx]   at android.os.Handler.dispatchMessage(Handler.java:102)
[mvx]   at android.os.Looper.loop(Looper.java:148)
[mvx]   at android.app.ActivityThread.main(ActivityThread.java:5417)
[mvx]   at java.lang.reflect.Method.invoke(Native Method)
[mvx]   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[mvx]   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
[MvxBind]  19.70 Value was not a valid Bitmap
MvxBind:Warning: 19.70 Value was not a valid Bitmap

 <package id="MvvmCross" version="4.1.0" targetFramework="MonoAndroid60" />
  <package id="MvvmCross.Binding" version="4.2.3" targetFramework="MonoAndroid60" />
  <package id="MvvmCross.Core" version="4.2.3" targetFramework="MonoAndroid60" />
  <package id="MvvmCross.Droid.FullFragging" version="4.1.0" targetFramework="MonoAndroid60" />
  <package id="MvvmCross.Droid.Shared" version="4.1.4" targetFramework="MonoAndroid60" />
  <package id="MvvmCross.Droid.Support.V4" version="4.1.5" targetFramework="MonoAndroid60" />
  <package id="MvvmCross.Droid.Support.V7.AppCompat" version="4.1.5" targetFramework="MonoAndroid60" />
  <package id="MvvmCross.Droid.Support.V7.Fragging" version="4.1.0" targetFramework="MonoAndroid60" />
  <package id="MvvmCross.Droid.Support.V7.RecyclerView" version="4.2.3" targetFramework="MonoAndroid60" />
  <package id="MvvmCross.Platform" version="4.2.3" targetFramework="MonoAndroid60" />
  <package id="MvvmCross.Plugin.Color" version="4.2.3" targetFramework="MonoAndroid60" />
  <package id="MvvmCross.Plugin.File" version="4.2.3" targetFramework="MonoAndroid60" />
  <package id="MvvmCross.Plugin.Json" version="4.1.4" targetFramework="MonoAndroid60" />
  <package id="MvvmCross.Plugin.Messenger" version="4.2.3" targetFramework="MonoAndroid60" />
  <package id="MvvmCross.Plugin.Network" version="4.2.3" targetFramework="MonoAndroid60" />
  <package id="MvvmCross.Plugin.PictureChooser" version="4.2.3" targetFramework="MonoAndroid60" />
  <package id="Newtonsoft.Json" version="8.0.2" targetFramework="MonoAndroid60" />

Steps to reproduce

  1. Update packages to latest version
  2. Create a layout with MvxImageView
<MvxImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="10dp"
            android:scaleType="centerInside"
            local:MvxBind="ImageUrl PictureUrl; Bitmap NotUploadedImage,Converter=InMemoryImage" />

  1. Choose some picture from gallery

Expected behavior

Get corret byte[]

Actual behavior

Exception

Configuration

Version: 4.2.3

Platform: Android

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant