Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash after XF 4.4 release. #57

Closed
heebaek opened this issue Dec 12, 2019 · 6 comments · Fixed by #59
Closed

crash after XF 4.4 release. #57

heebaek opened this issue Dec 12, 2019 · 6 comments · Fixed by #59
Assignees
Labels
need-info I need more info?

Comments

@heebaek
Copy link

heebaek commented Dec 12, 2019

When back to launcher from top page with image,

No constructor found for Android.Glide.ImageRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.

if i add a fake ctor, exception is not throwing.
public ImageRenderer(System.IntPtr intPtr, Android.Runtime.JniHandleOwnership jniHandleOwnership) { }

you can test this easily with default sample project(Shell Forms app template), please try back button from about tab(they use Xamarin logo image).

@jonathanpeppers
Copy link
Owner

@heebaek you made a new project that reproduces this? Can you upload it here? Thanks!

@jonathanpeppers jonathanpeppers added the need-info I need more info? label Dec 12, 2019
@jonathanpeppers jonathanpeppers self-assigned this Dec 12, 2019
@heebaek
Copy link
Author

heebaek commented Dec 13, 2019

ok. this is default empty template project and i added one image. (but image not visible...this is bug too.)

there are no tabs, so you just need to click back button after launch.

glidex.zip

@jonathanpeppers
Copy link
Owner

Thanks, yeah this is jacked up!

jonathanpeppers added a commit that referenced this issue Jan 11, 2020
Fixes: #57

Most of these are actually correctness fixes. I am not sure how
Xamarin.Forms 4.4 triggered these, but they were not quite right:

* We need an `ImageButtonRenderer` and call `CancelGlide` in `Dispose`

* `CancelGlide` should use the `Application.Context` to call
  `With(Application.Context).Clear(imageView)`. This will work even if
  the `Activity` is destroyed.

* Cases that check `IsActivityAlive` and `return` should call
  `CancelGlide`
jonathanpeppers added a commit that referenced this issue Jan 11, 2020
Fixes: #57

Most of these are actually correctness fixes. I am not sure how
Xamarin.Forms 4.4 triggered these, but they were not quite right:

* We need an `ImageButtonRenderer` and call `CancelGlide` in `Dispose`

* `CancelGlide` should use the `Application.Context` to call
  `With(Application.Context).Clear(imageView)`. This will work even if
  the `Activity` is destroyed.

* Cases that check `IsActivityAlive` and `return` should call
  `CancelGlide`
@jonathanpeppers
Copy link
Owner

@heebaek try out the latest update for me, and let me know, thanks!

https://www.nuget.org/packages/glidex.forms/2.0.1.394

@heebaek
Copy link
Author

heebaek commented Jan 12, 2020

crash bug has been fixed.
but the image still doesn't display correctly sometimes.

@jonathanpeppers
Copy link
Owner

glide has a behavior difference, you will need to supply WidthRequest or HeightRequest as mentioned here: #10 (comment)

I have not figured out a way to get around this issue yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-info I need more info?
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants