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

x/mobile: OutOfResourcesException when load webpage by webview on some devices #18624

Closed
kuloud opened this issue Jan 12, 2017 · 3 comments
Closed
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Milestone

Comments

@kuloud
Copy link

kuloud commented Jan 12, 2017

gobind c-shared lib for android, it crashed when load webpage on some devices.

What version of Go are you using (go version)?

go version go1.7.3 darwin/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/kuloud/Dev/Go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/dq/1jrcxg1156l7ncr_8jsmwwpc0000gn/T/go-build062445652=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

What did you do?

init a object which implements Seq.Proxy ,then load a normal web page by webview, crashed with OutOfResourcesException as log below. It happens on my Huawei and Meizu devices.

What did you expect to see?

Load the web page normally

What did you see instead?

throw OutOfResourcesException

crash log:

01-12 13:10:38.269 I/chromium(32009): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
01-12 13:10:38.334 I/chromium(32009): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
01-12 13:10:38.429 I/dalvikvm(32009): Jit: resizing JitTable from 4096 to 8192
01-12 13:10:38.499 E/StubController( 3509): service = null
01-12 13:10:38.504 E/StubController( 3509): service = null
01-12 13:10:38.594 E/StubController( 3056): service = null
01-12 13:10:38.594 E/StubController( 3056): service = null
01-12 13:10:38.619 E/StubController( 3509): service = null
01-12 13:10:38.629 E/StubController( 3056): service = null
01-12 13:10:38.639 E/StubController( 3056): service = null
01-12 13:10:38.749 E/StubController( 3509): service = null
01-12 13:10:38.844 E/StubController( 3509): service = null
01-12 13:10:38.959 E/logserver( 2384): Recvfrom netlink message failed, errno = 22
01-12 13:10:39.169 E/Gralloc-ERROR: int gralloc_backend_register(private_handle_t*):82 mmap( share_fd:331 ) failed with Out of memory
01-12 13:10:39.169 W/GraphicBufferMapper(32009): registerBuffer(0xbbecf150) failed -12 (Out of memory)
01-12 13:10:39.169 E/GraphicBuffer(32009): unflatten: registerBuffer failed: Out of memory (-12)
01-12 13:10:39.169 E/Surface (32009): dequeueBuffer: IGraphicBufferProducer::requestBuffer failed: -12
01-12 13:10:39.169 W/HardwareRenderer(32009): EGL error: EGL_BAD_ALLOC
01-12 13:10:39.174 W/HardwareRenderer(32009): Mountain View, we've had a problem here. Switching back to software rendering.
01-12 13:10:39.354 E/Gralloc-ERROR: int gralloc_backend_register(private_handle_t*):82 mmap( share_fd:330 ) failed with Out of memory
01-12 13:10:39.354 W/GraphicBufferMapper(32009): registerBuffer(0xb62a9478) failed -12 (Out of memory)
01-12 13:10:39.354 E/GraphicBuffer(32009): unflatten: registerBuffer failed: Out of memory (-12)
01-12 13:10:39.354 E/Surface (32009): dequeueBuffer: IGraphicBufferProducer::requestBuffer failed: -12
01-12 13:10:39.354 E/Surface (32009): dequeueBuffer failed (Out of memory)
01-12 13:10:39.364 E/ViewRootImpl(32009): OutOfResourcesException initializing HW surface
01-12 13:10:39.364 E/ViewRootImpl(32009): android.view.Surface$OutOfResourcesException
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.view.Surface.nativeLockCanvas(Native Method)
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.view.Surface.lockCanvas(Surface.java:266)
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2515)
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2467)
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2306)
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1936)
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1036)
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5795)
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:764)
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.view.Choreographer.doCallbacks(Choreographer.java:577)
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.view.Choreographer.doFrame(Choreographer.java:547)
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:750)
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.os.Handler.handleCallback(Handler.java:733)
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.os.Handler.dispatchMessage(Handler.java:95)
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.os.Looper.loop(Looper.java:136)
01-12 13:10:39.364 E/ViewRootImpl(32009): at android.app.ActivityThread.main(ActivityThread.java:5294)
01-12 13:10:39.364 E/ViewRootImpl(32009): at java.lang.reflect.Method.invokeNative(Native Method)
01-12 13:10:39.364 E/ViewRootImpl(32009): at java.lang.reflect.Method.invoke(Method.java:515)
01-12 13:10:39.364 E/ViewRootImpl(32009): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
01-12 13:10:39.364 E/ViewRootImpl(32009): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)
01-12 13:10:39.364 E/ViewRootImpl(32009): at dalvik.system.NativeStart.main(Native Method)
01-12 13:10:39.364 I/Process (32009): Sending signal. PID: 32009 SIG: 9
01-12 13:10:39.469 E/logserver( 2384): Object Path:/data/system/dropbox/, mask=0x00000080
01-12 13:10:39.469 E/logserver( 2384): event->len=48, name=system_server_wtf@1484197839472.txt
01-12 13:10:39.469 E/logserver( 2384): find_first_match: find match, plogs(type=2, pfile=/data/system/dropbox/, match=_wtf)
01-12 13:10:39.484 E/logserver( 2384): move_dir:src_path=/data/log/dbox/appdbg/logcache
01-12 13:10:39.484 E/logserver( 2384): move_dir:dst_path=/data/log/logcache/24794912/
01-12 13:10:39.484 E/logserver( 2384): is_all_ready, all key files were ready.
01-12 13:10:39.484 E/logserver( 2384): find_fault_appname, 1433, type is not ANR/FC/VMREBOOT.
01-12 13:10:39.484 E/logserver( 2384): is_only_tombstone, not force close type, return.
01-12 13:10:39.484 E/logserver( 2384): archive_and_send, pos=3, type=wtf, output=20170112131039_wtf
01-12 13:10:39.489 E/logserver( 2384): get alarm time = 68586 (sec.)!
01-12 13:10:39.489 E/logserver( 2384): log_apr_add_record open file:/data/log/apr/H60-L01_V100R001CHNC00B121SP06_DU2SSE154V021506_20160425142010_statistics
01-12 13:10:39.489 E/logserver( 2384): archive_and_send, don't tar and send (wtf)
01-12 13:10:39.489 E/logserver( 2384): clean_cur_cache:962, system(rm -r /data/log/logcache/24794912/* > /dev/null 2>&1)
01-12 13:10:39.504 E/logserver( 2384): Object Path:/data/log/apr/, mask=0x00000008
01-12 13:10:39.504 E/logserver( 2384): event->len=80, name=H60-L01_V100R001CHNC00B121SP06_DU2SSE154V021506_20160425142010_statistics
01-12 13:10:39.504 E/logserver( 2384): process_one_event, can not find this event(H60-L01_V100R001CHNC00B121SP06_DU2SSE154V021506_20160425142010_statistics)
01-12 13:10:39.504 E/logserver( 2384): clean_cur_cache:962, system(rm -r /data/log/logcache/24794912/* > /dev/null 2>&1)

device cpu info

shell@hwH60:/ $ cat /proc/cpuinfo
Processor : ARMv7 Processor rev 5 (v7l)
processor : 0
BogoMIPS : 41.44

processor : 1
BogoMIPS : 41.44

processor : 2
BogoMIPS : 41.44

processor : 3
BogoMIPS : 41.44

processor : 4
BogoMIPS : 81.37

processor : 5
BogoMIPS : 81.37

processor : 6
BogoMIPS : 81.37

processor : 7
BogoMIPS : 81.37

Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0 & 0x3
CPU part : 0xc07 & 0xc0f
CPU revision : 5 & 3

Hardware : Kirin920
Revision : 0000
Serial : 0000000000000000

@bradfitz bradfitz changed the title OutOfResourcesException when load webpage by webview on some devices x/mobile: OutOfResourcesException when load webpage by webview on some devices Jan 12, 2017
@bradfitz bradfitz added this to the Unreleased milestone Jan 13, 2017
@eliasnaur
Copy link
Contributor

Can you provide a small sample that reproduces the error you're seeing? Also, how much memory do the devices have and what version of Android are they running?

@kuloud
Copy link
Author

kuloud commented Jan 15, 2017

Huawei H60, Android version 4.4.2, but the devices are not with me yet, maybe need somedays to wait. @eliasnaur

@bradfitz bradfitz added the mobile Android, iOS, and x/mobile label Jul 20, 2017
@eliasnaur
Copy link
Contributor

The go tip version (to become Go 1.11) now uses sparse heap mappings, improving memory use on constrained deviced. If you like, try go tip to see if the situation improves.

@eliasnaur eliasnaur removed their assignment Oct 15, 2018
@kuloud kuloud closed this as completed Aug 24, 2019
@golang golang locked and limited conversation to collaborators Aug 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

4 participants