我们的 Android Espresso UI 测试在正常的窗口 Linux Android 模拟器上运行时能够通过,但当我们使用 -no-window -no-audio 标志运行它们时失败。我们提取了 Test Orchestrator 文件和 Logcat 信息,但似乎无法找到问题的根源。
我们现在有两个 UI 测试,它们基本上什么都不做。删除第二个使测试通过。
两者都可以正常工作,就像在 Windows 上使用 Android 模拟器一样(使用和不使用 -no-window -no-audio)。
/data/data/......./SettingsActivityTest#useAppContext.txt
onError: commandError=true message=null
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:764)
at android.app.IActivityManager$Stub$Proxy.startInstrumentation(IActivityManager.java:5061)
at com.android.commands.am.Instrument.run(Instrument.java:419)
at com.android.commands.am.Am.runInstrument(Am.java:187)
at com.android.commands.am.Am.onRun(Am.java:80)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:54)
at com.android.commands.am.Am.main(Am.java:50)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:285)
Logcat 输出(我们认为问题所在的摘录)
--------- beginning of crash
05-25 02:13:02.182 1629 2688 F libc : Fatal signal 11 (SIGSEGV), code 2, fault addr 0xc9d86050 in tid 2688 (RenderThread), pid 1629 (system_server)
05-25 02:13:02.830 3347 3347 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-25 02:13:02.830 3347 3347 F DEBUG : Build fingerprint: 'google/sdk_gphone_x86/generic_x86:8.1.0/OSM1.180201.021/4741582:userdebug/dev-keys'
05-25 02:13:02.830 3347 3347 F DEBUG : Revision: '0'
05-25 02:13:02.830 3347 3347 F DEBUG : ABI: 'x86'
05-25 02:13:02.830 3347 3347 F DEBUG : pid: 1629, tid: 2688, name: RenderThread >>> system_server <<<
05-25 02:13:02.830 3347 3347 F DEBUG : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xc9d86050
05-25 02:13:02.830 3347 3347 F DEBUG : eax cc0ff1e8 ebx e504cc64 ecx cc64be50 edx 00000000
05-25 02:13:02.830 3347 3347 F DEBUG : esi 00000058 edi 00000034
05-25 02:13:02.830 3347 3347 F DEBUG : xcs 00000023 xds 0000002b xes 0000002b xfs 0000006b xss 0000002b
05-25 02:13:02.830 3347 3347 F DEBUG : eip c9d86050 ebp cc0ff808 esp cc0ff1ac flags 00010246
05-25 02:13:03.186 3347 3347 F DEBUG :
05-25 02:13:03.186 3347 3347 F DEBUG : backtrace:
05-25 02:13:03.186 3347 3347 F DEBUG : #00 pc 00006050 [anon:libc_malloc:c9d80000]
05-25 02:13:03.186 3347 3347 F DEBUG : #01 pc 000dfd3d /vendor/lib/egl/libGLESv2_swiftshader.so (sw::Renderer::executeTask(int)+189)
05-25 02:13:03.186 3347 3347 F DEBUG : #02 pc 000dfa07 /vendor/lib/egl/libGLESv2_swiftshader.so (sw::Renderer::threadLoop(int)+103)
05-25 02:13:03.186 3347 3347 F DEBUG : #03 pc 000df98e /vendor/lib/egl/libGLESv2_swiftshader.so (sw::Renderer::threadFunction(void*)+78)
05-25 02:13:03.186 3347 3347 F DEBUG : #04 pc 000ce064 /vendor/lib/egl/libGLESv2_swiftshader.so (sw::Thread::startFunction(void*)+84)
05-25 02:13:03.186 3347 3347 F DEBUG : #05 pc 00071445 /system/lib/libc.so (__pthread_start(void*)+53)
05-25 02:13:03.186 3347 3347 F DEBUG : #06 pc 000205db /system/lib/libc.so (__start_thread+75)
05-25 02:13:03.186 3347 3347 F DEBUG : #07 pc 0001ec16 /system/lib/libc.so (__bionic_clone+70)
05-25 02:13:08.316 2695 2955 E AndroidRuntime: FATAL EXCEPTION: lowpool[1]
05-25 02:13:08.316 2695 2955 E AndroidRuntime: Process: com.google.android.gms, PID: 2695
05-25 02:13:08.316 2695 2955 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.320 2820 2820 E AndroidRuntime: FATAL EXCEPTION: main
05-25 02:13:08.320 2820 2820 E AndroidRuntime: Process: com.google.android.googlequicksearchbox:search, PID: 2820
05-25 02:13:08.320 2820 2820 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.329 2695 2695 E AndroidRuntime: FATAL EXCEPTION: main
05-25 02:13:08.329 2695 2695 E AndroidRuntime: Process: com.google.android.gms, PID: 2695
05-25 02:13:08.329 2695 2695 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.338 1781 1781 E AndroidRuntime: FATAL EXCEPTION: main
05-25 02:13:08.338 1781 1781 E AndroidRuntime: Process: com.google.android.inputmethod.latin, PID: 1781
05-25 02:13:08.338 1781 1781 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.349 2695 2897 E AndroidRuntime: FATAL EXCEPTION: [cxt] processing com.google.android.gms.chimera.container.FileApkIntentOperation for action com.google.android.gms.chimera.container.STAGE_MODULE_APKS
05-25 02:13:08.349 2695 2897 E AndroidRuntime: Process: com.google.android.gms, PID: 2695
05-25 02:13:08.349 2695 2897 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.349 2695 3238 E AndroidRuntime: FATAL EXCEPTION: [cxt] processing com.google.android.gms.common.analytics.CoreAnalyticsInitHandler for action com.google.android.chimera.IntentOperation.NEW_MODULE
05-25 02:13:08.349 2695 3238 E AndroidRuntime: Process: com.google.android.gms, PID: 2695
05-25 02:13:08.349 2695 3238 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.350 2695 3230 E AndroidRuntime: FATAL EXCEPTION: [cxt] processing com.google.android.gms.chimera.container.FileApkIntentOperation for action com.google.android.gms.chimera.container.LOG_LOAD_ATTEMPT
05-25 02:13:08.350 2695 3230 E AndroidRuntime: Process: com.google.android.gms, PID: 2695
05-25 02:13:08.350 2695 3230 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.354 2437 3285 E AndroidRuntime: FATAL EXCEPTION: GCMWriter
05-25 02:13:08.354 2437 3285 E AndroidRuntime: Process: com.google.android.gms.persistent, PID: 2437
05-25 02:13:08.354 2437 3285 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.358 3307 3325 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
05-25 02:13:08.358 3307 3325 E AndroidRuntime: Process: com.google.android.gm, PID: 3307
05-25 02:13:08.358 3307 3325 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.420 2437 2437 E AndroidRuntime: FATAL EXCEPTION: main
05-25 02:13:08.420 2437 2437 E AndroidRuntime: Process: com.google.android.gms.persistent, PID: 2437
05-25 02:13:08.420 2437 2437 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.423 2437 2978 E AndroidRuntime: FATAL EXCEPTION: lowpool[4]
05-25 02:13:08.423 2437 2978 E AndroidRuntime: Process: com.google.android.gms.persistent, PID: 2437
05-25 02:13:08.423 2437 2978 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.423 2437 3350 E AndroidRuntime: FATAL EXCEPTION: FetchTask
05-25 02:13:08.423 2437 3350 E AndroidRuntime: Process: com.google.android.gms.persistent, PID: 2437
05-25 02:13:08.423 2437 3350 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.508 1868 1868 E AndroidRuntime: FATAL EXCEPTION: main
05-25 02:13:08.508 1868 1868 E AndroidRuntime: Process: com.android.phone, PID: 1868
05-25 02:13:08.508 1868 1868 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.547 2993 2993 E AndroidRuntime: FATAL EXCEPTION: main
05-25 02:13:08.547 2993 2993 E AndroidRuntime: Process: com.google.android.apps.messaging, PID: 2993
05-25 02:13:08.547 2993 2993 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.614 2437 3211 E AndroidRuntime: FATAL EXCEPTION: netscheduler-queue-handler
05-25 02:13:08.614 2437 3211 E AndroidRuntime: Process: com.google.android.gms.persistent, PID: 2437
05-25 02:13:08.614 2437 3211 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.630 2437 2981 E AndroidRuntime: FATAL EXCEPTION: lowpool[6]
05-25 02:13:08.630 2437 2981 E AndroidRuntime: Process: com.google.android.gms.persistent, PID: 2437
05-25 02:13:08.630 2437 2981 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.734 3074 3074 E AndroidRuntime: FATAL EXCEPTION: main
05-25 02:13:08.734 3074 3074 E AndroidRuntime: Process: com.google.android.apps.messaging:rcs, PID: 3074
05-25 02:13:08.734 3074 3074 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.739 2513 2513 E AndroidRuntime: FATAL EXCEPTION: main
05-25 02:13:08.739 2513 2513 E AndroidRuntime: Process: com.google.android.apps.nexuslauncher, PID: 2513
05-25 02:13:08.739 2513 2513 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
05-25 02:13:08.741 1950 1950 E AndroidRuntime: FATAL EXCEPTION: main
05-25 02:13:08.741 1950 1950 E AndroidRuntime: Process: com.google.android.setupwizard, PID: 1950
05-25 02:13:08.741 1950 1950 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
最佳答案
也许是一个非常古老的线程,但是:
[anon:libc_malloc:c9d80000] - 你的 RAM 可能用完了
关于android - 使用 -no-window 在模拟器中运行时测试检测进程崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50521487/
我正在学习如何使用Nokogiri,根据这段代码我遇到了一些问题:require'rubygems'require'mechanize'post_agent=WWW::Mechanize.newpost_page=post_agent.get('http://www.vbulletin.org/forum/showthread.php?t=230708')puts"\nabsolutepathwithtbodygivesnil"putspost_page.parser.xpath('/html/body/div/div/div/div/div/table/tbody/tr/td/div
我有一个Ruby程序,它使用rubyzip压缩XML文件的目录树。gem。我的问题是文件开始变得很重,我想提高压缩级别,因为压缩时间不是问题。我在rubyzipdocumentation中找不到一种为创建的ZIP文件指定压缩级别的方法。有人知道如何更改此设置吗?是否有另一个允许指定压缩级别的Ruby库? 最佳答案 这是我通过查看rubyzip内部创建的代码。level=Zlib::BEST_COMPRESSIONZip::ZipOutputStream.open(zip_file)do|zip|Dir.glob("**/*")d
类classAprivatedeffooputs:fooendpublicdefbarputs:barendprivatedefzimputs:zimendprotecteddefdibputs:dibendendA的实例a=A.new测试a.foorescueputs:faila.barrescueputs:faila.zimrescueputs:faila.dibrescueputs:faila.gazrescueputs:fail测试输出failbarfailfailfail.发送测试[:foo,:bar,:zim,:dib,:gaz].each{|m|a.send(m)resc
很好奇,就使用rubyonrails自动化单元测试而言,你们正在做什么?您是否创建了一个脚本来在cron中运行rake作业并将结果邮寄给您?git中的预提交Hook?只是手动调用?我完全理解测试,但想知道在错误发生之前捕获错误的最佳实践是什么。让我们理所当然地认为测试本身是完美无缺的,并且可以正常工作。下一步是什么以确保他们在正确的时间将可能有害的结果传达给您? 最佳答案 不确定您到底想听什么,但是有几个级别的自动代码库控制:在处理某项功能时,您可以使用类似autotest的内容获得关于哪些有效,哪些无效的即时反馈。要确保您的提
假设我做了一个模块如下:m=Module.newdoclassCendend三个问题:除了对m的引用之外,还有什么方法可以访问C和m中的其他内容?我可以在创建匿名模块后为其命名吗(就像我输入“module...”一样)?如何在使用完匿名模块后将其删除,使其定义的常量不再存在? 最佳答案 三个答案:是的,使用ObjectSpace.此代码使c引用你的类(class)C不引用m:c=nilObjectSpace.each_object{|obj|c=objif(Class===objandobj.name=~/::C$/)}当然这取决于
我正在尝试使用ruby和Savon来使用网络服务。测试服务为http://www.webservicex.net/WS/WSDetails.aspx?WSID=9&CATID=2require'rubygems'require'savon'client=Savon::Client.new"http://www.webservicex.net/stockquote.asmx?WSDL"client.get_quotedo|soap|soap.body={:symbol=>"AAPL"}end返回SOAP异常。检查soap信封,在我看来soap请求没有正确的命名空间。任何人都可以建议我
我需要在客户计算机上运行Ruby应用程序。通常需要几天才能完成(复制大备份文件)。问题是如果启用sleep,它会中断应用程序。否则,计算机将持续运行数周,直到我下次访问为止。有什么方法可以防止执行期间休眠并让Windows在执行后休眠吗?欢迎任何疯狂的想法;-) 最佳答案 Here建议使用SetThreadExecutionStateWinAPI函数,使应用程序能够通知系统它正在使用中,从而防止系统在应用程序运行时进入休眠状态或关闭显示。像这样的东西:require'Win32API'ES_AWAYMODE_REQUIRED=0x0
关闭。这个问题是opinion-based.它目前不接受答案。想要改进这个问题?更新问题,以便editingthispost可以用事实和引用来回答它.关闭4年前。Improvethisquestion我想在固定时间创建一系列低音和高音调的哔哔声。例如:在150毫秒时发出高音调的蜂鸣声在151毫秒时发出低音调的蜂鸣声200毫秒时发出低音调的蜂鸣声250毫秒的高音调蜂鸣声有没有办法在Ruby或Python中做到这一点?我真的不在乎输出编码是什么(.wav、.mp3、.ogg等等),但我确实想创建一个输出文件。
我在我的项目目录中完成了compasscreate.和compassinitrails。几个问题:我已将我的.sass文件放在public/stylesheets中。这是放置它们的正确位置吗?当我运行compasswatch时,它不会自动编译这些.sass文件。我必须手动指定文件:compasswatchpublic/stylesheets/myfile.sass等。如何让它自动运行?文件ie.css、print.css和screen.css已放在stylesheets/compiled。如何在编译后不让它们重新出现的情况下删除它们?我自己编译的.sass文件编译成compiled/t
我想将html转换为纯文本。不过,我不想只删除标签,我想智能地保留尽可能多的格式。为插入换行符标签,检测段落并格式化它们等。输入非常简单,通常是格式良好的html(不是整个文档,只是一堆内容,通常没有anchor或图像)。我可以将几个正则表达式放在一起,让我达到80%,但我认为可能有一些现有的解决方案更智能。 最佳答案 首先,不要尝试为此使用正则表达式。很有可能你会想出一个脆弱/脆弱的解决方案,它会随着HTML的变化而崩溃,或者很难管理和维护。您可以使用Nokogiri快速解析HTML并提取文本:require'nokogiri'h