我在 Google 上搜索得手脚发麻,但我不知道如何解释 Google 发送给开发者的 ANR 报告。
所以在报告的顶部,这个 Intent 被列为原因:
ANR Executing service blah.blah.removed.UpdateEpisodesFileDetails
列出了以下线程。 (请注意,我们有很多这样的 ANR,并且在每种情况下 File.deleteImpl 都被列为在主线程上运行的内容,这似乎是一个线索,但列出的 Intent 并不删除):
DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0 hwl=0 hwll=0)
"main" prio=5 tid=1 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x40022268 self=0xcea0
| sysTid=313 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=-1345006432
| schedstat=( 6115674000 2882269000 4010 )
at java.io.File.deleteImpl(Native Method)
at java.io.File.delete(File.java:375)
at au.com.shiftyjelly.pocketcasts.a.i.a(SourceFile:256)
at au.com.shiftyjelly.pocketcasts.a.i.a(SourceFile:177)
at au.com.shiftyjelly.pocketcasts.a.i.c(SourceFile:374)
at au.com.shiftyjelly.pocketcasts.a.i.a(SourceFile:290)
at au.com.shiftyjelly.pocketcasts.a.e.a(SourceFile:1)
at au.com.shiftyjelly.pocketcasts.server.t.a(SourceFile:393)
at au.com.shiftyjelly.pocketcasts.server.x.onPostExecute(SourceFile:1)
at android.os.AsyncTask.finish(AsyncTask.java:417)
at android.os.AsyncTask.access$300(AsyncTask.java:127)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:429)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3806)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
"AsyncTask #1" prio=5 tid=13 WAIT
| group="main" sCount=1 dsCount=0 obj=0x4078adc0 self=0x415c80
| sysTid=2601 nice=10 sched=0/0 cgrp=[fopen-error:2] handle=4283832
| schedstat=( 270113000 194565000 1121 )
at java.lang.Object.wait(Native Method)
- waiting on <0x4078b000> (a java.lang.VMThread)
at java.lang.Thread.parkFor(Thread.java:1424)
at java.lang.LangAccessImpl.parkFor(LangAccessImpl.java:48)
at sun.misc.Unsafe.park(Unsafe.java:337)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:411)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1021)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
at java.lang.Thread.run(Thread.java:1019)
"Binder Thread #3" prio=5 tid=10 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x405be0c0 self=0x3ba1e8
| sysTid=700 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=3991064
| schedstat=( 8717000 2885597000 235 )
at dalvik.system.NativeStart.run(Native Method)
"Thread-16" prio=5 tid=11 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x40623f98 self=0x3a3600
| sysTid=332 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=3815224
| schedstat=( 24507000 2874905000 281 )
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:119)
at android.os.Looper.loop(Looper.java:117)
at au.com.shiftyjelly.pocketcasts.service.k.run(SourceFile:1078)
at java.lang.Thread.run(Thread.java:1019)
"background thread" prio=5 tid=9 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x40617c90 self=0x34eb00
| sysTid=330 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=3468344
| schedstat=( 8289000 2632928000 198 )
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:119)
at android.os.Looper.loop(Looper.java:117)
at android.os.HandlerThread.run(HandlerThread.java:60)
"pool-1-thread-1" prio=5 tid=8 WAIT
| group="main" sCount=1 dsCount=0 obj=0x405446b8 self=0x34ace0
| sysTid=329 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=3451952
| schedstat=( 39981000 2194522000 271 )
at java.lang.Object.wait(Native Method)
- waiting on <0x405447d8> (a java.lang.VMThread)
at java.lang.Thread.parkFor(Thread.java:1424)
at java.lang.LangAccessImpl.parkFor(LangAccessImpl.java:48)
at sun.misc.Unsafe.park(Unsafe.java:337)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:411)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1021)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
at java.lang.Thread.run(Thread.java:1019)
"Binder Thread #2" prio=5 tid=7 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x40514c80 self=0x1373b8
| sysTid=319 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=2641200
| schedstat=( 13291000 2392775000 260 )
at dalvik.system.NativeStart.run(Native Method)
"Binder Thread #1" prio=5 tid=6 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x40514b70 self=0x2849c0
| sysTid=318 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=603856
| schedstat=( 12253000 2190249000 264 )
at dalvik.system.NativeStart.run(Native Method)
"Compiler" daemon prio=5 tid=5 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x40510d28 self=0x29f0a0
| sysTid=317 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=602784
| schedstat=( 433121000 2151691000 3736 )
at dalvik.system.NativeStart.run(Native Method)
"Signal Catcher" daemon prio=5 tid=4 RUNNABLE
| group="system" sCount=0 dsCount=0 obj=0x40510c68 self=0x29ef68
| sysTid=316 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=602720
| schedstat=( 8292000 1519782000 208 )
at dalvik.system.NativeStart.run(Native Method)
"GC" daemon prio=5 tid=3 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x40510bc0 self=0x930a0
| sysTid=315 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=602208
| schedstat=( 37690000 1428592000 208 )
at dalvik.system.NativeStart.run(Native Method)
"HeapWorker" daemon prio=5 tid=2 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x40510b08 self=0x93510
| sysTid=314 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=602008
| schedstat=( 74593000 1863624000 297 )
at dalvik.system.NativeStart.run(Native Method)
最佳答案
ANR(应用程序无响应)表示您锁定 UI 线程的时间过长。通常这意味着您正在 UI 线程或类似的东西上进行网络调用。
关于android - 您如何解读 Android ANR 报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8935003/
我正在学习如何使用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还比较陌生,我正在为我正在创建的对象编写一些rspec测试用例。许多测试用例都非常基础,我只是想确保正确填充和返回值。我想知道是否有办法使用循环结构来执行此操作。不必为我要测试的每个方法都设置一个assertEquals。例如:describeitem,"TestingtheItem"doit"willhaveanullvaluetostart"doitem=Item.new#HereIcoulddotheitem.name.shouldbe_nil#thenIcoulddoitem.category.shouldbe_nilendend但我想要一些方法来使用
关闭。这个问题是opinion-based.它目前不接受答案。想要改进这个问题?更新问题,以便editingthispost可以用事实和引用来回答它.关闭4年前。Improvethisquestion我想在固定时间创建一系列低音和高音调的哔哔声。例如:在150毫秒时发出高音调的蜂鸣声在151毫秒时发出低音调的蜂鸣声200毫秒时发出低音调的蜂鸣声250毫秒的高音调蜂鸣声有没有办法在Ruby或Python中做到这一点?我真的不在乎输出编码是什么(.wav、.mp3、.ogg等等),但我确实想创建一个输出文件。
给定这段代码defcreate@upgrades=User.update_all(["role=?","upgraded"],:id=>params[:upgrade])redirect_toadmin_upgrades_path,:notice=>"Successfullyupgradeduser."end我如何在该操作中实际验证它们是否已保存或未重定向到适当的页面和消息? 最佳答案 在Rails3中,update_all不返回任何有意义的信息,除了已更新的记录数(这可能取决于您的DBMS是否返回该信息)。http://ar.ru
我在我的项目目录中完成了compasscreate.和compassinitrails。几个问题:我已将我的.sass文件放在public/stylesheets中。这是放置它们的正确位置吗?当我运行compasswatch时,它不会自动编译这些.sass文件。我必须手动指定文件:compasswatchpublic/stylesheets/myfile.sass等。如何让它自动运行?文件ie.css、print.css和screen.css已放在stylesheets/compiled。如何在编译后不让它们重新出现的情况下删除它们?我自己编译的.sass文件编译成compiled/t
我正在寻找执行以下操作的正确语法(在Perl、Shell或Ruby中):#variabletoaccessthedatalinesappendedasafileEND_OF_SCRIPT_MARKERrawdatastartshereanditcontinues. 最佳答案 Perl用__DATA__做这个:#!/usr/bin/perlusestrict;usewarnings;while(){print;}__DATA__Texttoprintgoeshere 关于ruby-如何将脚
Rackup通过Rack的默认处理程序成功运行任何Rack应用程序。例如:classRackAppdefcall(environment)['200',{'Content-Type'=>'text/html'},["Helloworld"]]endendrunRackApp.new但是当最后一行更改为使用Rack的内置CGI处理程序时,rackup给出“NoMethodErrorat/undefinedmethod`call'fornil:NilClass”:Rack::Handler::CGI.runRackApp.newRack的其他内置处理程序也提出了同样的反对意见。例如Rack
在选择我想要运行操作的频率时,唯一的选项是“每天”、“每小时”和“每10分钟”。谢谢!我想为我的Rails3.1应用程序运行调度程序。 最佳答案 这不是一个优雅的解决方案,但您可以安排它每天运行,并在实际开始工作之前检查日期是否为当月的第一天。 关于ruby-如何每月在Heroku运行一次Scheduler插件?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/8692687/
我有一个对象has_many应呈现为xml的子对象。这不是问题。我的问题是我创建了一个Hash包含此数据,就像解析器需要它一样。但是rails自动将整个文件包含在.........我需要摆脱type="array"和我该如何处理?我没有在文档中找到任何内容。 最佳答案 我遇到了同样的问题;这是我的XML:我在用这个:entries.to_xml将散列数据转换为XML,但这会将条目的数据包装到中所以我修改了:entries.to_xml(root:"Contacts")但这仍然将转换后的XML包装在“联系人”中,将我的XML代码修改为
我有一大串格式化数据(例如JSON),我想使用Psychinruby同时保留格式转储到YAML。基本上,我希望JSON使用literalstyle出现在YAML中:---json:|{"page":1,"results":["item","another"],"total_pages":0}但是,当我使用YAML.dump时,它不使用文字样式。我得到这样的东西:---json:!"{\n\"page\":1,\n\"results\":[\n\"item\",\"another\"\n],\n\"total_pages\":0\n}\n"我如何告诉Psych以想要的样式转储标量?解