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

Out of memory #8

Open
shubhank12 opened this issue Apr 25, 2017 · 27 comments
Open

Out of memory #8

shubhank12 opened this issue Apr 25, 2017 · 27 comments

Comments

@shubhank12
Copy link

Its work perfect in 6.0.1 but error in some device mostly in lollipop

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.coincide.ridetog, PID: 12679
java.lang.OutOfMemoryError: Failed to allocate a 81000012 byte allocation with 16775712 free bytes and 60MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreateFromParcel(Native Method)
at android.graphics.Bitmap.access$000(Bitmap.java:32)
at android.graphics.Bitmap$1.createFromParcel(Bitmap.java:1484)
at android.graphics.Bitmap$1.createFromParcel(Bitmap.java:1476)
at com.google.android.gms.maps.model.internal.b.onTransact(:com.google.android.gms.DynamiteModulesB:101)
at android.os.Binder.transact(Binder.java:380)
at uyr.a(:com.google.android.gms:242)
at uqu.a(:com.google.android.gms:1252)
at uqw.a(:com.google.android.gms:187)
at uqo.a(:com.google.android.gms:6164)
at uyq.onTransact(:com.google.android.gms:106)
at android.os.Binder.transact(Binder.java:380)
at com.google.android.gms.maps.model.internal.zza$zza$zza.zze(Unknown Source)
at com.google.android.gms.maps.model.BitmapDescriptorFactory.fromBitmap(Unknown Source)
at com.arsy.maps_library.MapRipple$1.run(MapRipple.java:133)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5247)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:707)

@cheetahdeliverys
Copy link

I have the same problem

@shubhank12
Copy link
Author

not resolve yet

@shubhank12
Copy link
Author

@cheetahdeliverys instead of this i use another animation if you want i can share the code its work fine in every mobile i tested that

@felixeduardo15
Copy link

@shubhank12 can you bring example to use this library?

@amanjain08
Copy link

@cheetahdeliverys I would appreciate if you can share the code.

@shubhank12
Copy link
Author

@amanjain08
Copy link

@cheetahdeliverys Thank you for quick response. But how are you using that view to show ripple effect on map marker

@shubhank12
Copy link
Author

private MapRadar mapRadar;

/////////////////////////////////////////////////////////////////////////////////
Marker marker = mMap.addMarker(new MarkerOptions()
.position(new LatLng(userSourceLat, userSourceLng))
.title("No match Found")
.snippet("Searching for Match"));
mRadarView.setShowCircles(true);
if (mRadarView != null) mRadarView.startAnimation();
////////////////////////////////////////////////////////////////////////////////////

Note: i don't know for what reason you need that animation. but i use that by default marker is place in center of the map. i place map inside the relativelayout and i also place raderView at the center of the RelativeLayout.

////////////////////////////////////////////////////////////////////////////////////////////

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_above="@+id/bootomLayout">

    <fragment
        android:id="@+id/mapView"
        class="com.google.android.gms.maps.SupportMapFragment"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <your.packagename.RadarView
        android:id="@+id/radarView"
        android:layout_width="240dp"
        android:layout_height="240dp"
        android:layout_centerInParent="true"
        android:visibility="gone" />

</RelativeLayout>

////////////////////////////////////////////////////////////////////////////////

@amanjain08 if you specify the reason of anim maybe i help more

@amanjain08
Copy link

@shubhank12 You haven't using ripple view on marker on map. I want ripple view on marker that could be anywhere on map. You have fixed your view on center of screen. For my case there could be a multiple marker on map so I want the ripple view for all that markers.

@shubhank12
Copy link
Author

@amanjain08 ya thats true i use different animation which differ from your requirement

@Ok-Alex
Copy link

Ok-Alex commented Jun 25, 2017

Also getting OutOfMemory for MapRadar. @aarsy did you checked it?

@Ok-Alex
Copy link

Ok-Alex commented Jun 30, 2017

I was managed to fix the issue. I downloaded sources of GoogleMapsAnimations to my project and updated play services version in gradle. Tested on API 19, 24, 25

@fjn89
Copy link

fjn89 commented Jul 3, 2017

@Ok-Alex what exactly did you do? I cant solve the problem

@hanuor
Copy link
Collaborator

hanuor commented Jul 13, 2017

If you have any modified version of the code which resolves this issue then please issue a pull request and we'll merge.
Thanks.

@pranjal-joshi
Copy link

Same Fatal issue on some devices, error occurence varies from device to device. Please update the new version with resolved issue.

@charlescruz07
Copy link

have you guys found a fix for this?

@ashishguptasanu
Copy link

ashishguptasanu commented Sep 11, 2017

This error is thrown by the Java Virtual Machine (JVM) when an object cannot be allocated due to lack of memory space and also, the garbage collector cannot free some space.

Add these two lines in your manifest files inside Application Tag:
android:largeHeap="true"
android:hardwareAccelerated="false"

Something like this, It had solved the problem:
<application android:allowBackup="true" android:icon="@mipmap/app_logo" android:label="@string/app_name" android:roundIcon="@mipmap/app_logo" android:supportsRtl="true" android:theme="@style/AppTheme" android:largeHeap="true" android:hardwareAccelerated="false"></application>

@pcg92
Copy link

pcg92 commented Nov 2, 2017

java.lang.OutOfMemoryError: Failed to allocate a 268435468 byte allocation with 16777216 free bytes and 201MB until OOM

Just using one radar

@yusufonderd
Copy link

yusufonderd commented Nov 28, 2017

same problem on Android 7.1.1

@chihung93
Copy link

I have the same problem with Android 6.0

@sebasira
Copy link

Same here! with Nougat

@nodahikaru
Copy link

Same problem. This Ripple Animation was unable to be used in android any more ?

@wanglouin1990925
Copy link

same here

@anudeepreddygopu
Copy link

Even I am facing the same issue

@aarsy
Copy link
Owner

aarsy commented Dec 12, 2018

Hello Guys, I would be very thankful to you guys if someone create patch for this issue and raise a PR.

@hanuor
Copy link
Collaborator

hanuor commented Dec 12, 2018

@aarsy Looking into it. I'll see what I can do.

@dvGomez
Copy link

dvGomez commented May 18, 2019

Hi guys,

I got same error:

E/Surface: getSlotFromBufferLocked: unknown buffer: 0xb96509f8 05-18 16:19:40.094 32198-32294/test.taxiapp.novotaxi E/AndroidRuntime: FATAL EXCEPTION: GLThread 3019 Process: test.taxiapp.novotaxi, PID: 32198 java.lang.IllegalArgumentException: Textures with dimensions8192x8192 are larger than the maximum supported size 4096x4096 at com.google.maps.api.android.lib6.gmm6.vector.gl.ag.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040308-245988633):75) at com.google.maps.api.android.lib6.gmm6.vector.gl.ag.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040308-245988633):29) at com.google.maps.api.android.lib6.gmm6.api.i.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040308-245988633):48) at com.google.maps.api.android.lib6.gmm6.api.o.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040308-245988633):54) at com.google.maps.api.android.lib6.gmm6.vector.bz.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040308-245988633):378) at com.google.maps.api.android.lib6.gmm6.vector.ax.run(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (040308-245988633):85)

Android 6.0

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

No branches or pull requests