mattmikolay / pocket-ctc Goto Github PK
View Code? Open in Web Editor NEWAn Android app to translate between Chinese characters and Chinese telegraph code
License: Other
An Android app to translate between Chinese characters and Chinese telegraph code
License: Other
Received the following app crash in version 1.0:
java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@8b1c184 rejected from java.util.concurrent.ThreadPoolExecutor@cbdcd6d[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2014)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:794)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1340)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:82)
at java.util.concurrent.Executors$DelegatedExecutorService.submit(Executors.java:594)
at com.mattmik.dianma.TranslateActivity.loadInputTextFromIntent(Unknown Source)
requestTranslation
access$000
access$100
at com.mattmik.dianma.TranslateActivity.loadInputTextFromIntent(Unknown Source)
requestTranslation
access$000
access$100
at com.mattmik.dianma.TranslateActivity$2.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
The ExecutorService
used for translation is shut down in onDestroy()
. Here's what I think is occurring:
TranslateActivity
and onDestroy()
is called. (This could be due to memory pressure while SettingsActivity
is started, or because the user is exiting the app.) Here, mExecutor
is shut down.MSG_REQUEST_TRANSLATION
is received by mHandler
in the dying TranslateActivity
.requestTranslation(String inputText)
is called from within this handler and attempts to submit a new Runnable
to mExecutor
.It should be possible to fix this by checking mExecutor.isShutdown()
before submitting the new Runnable
.
It would be handy to have this app distributed through F-Droid. Do you think that would be feasible?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.