Closed noon99jaki closed 5 years ago
The problem does not seem to be specific to a Duckling function, since the following simple function also crashed
foreign export java "@static org.mosaix.eta.Run.print_context"
print_context :: JString
print_context = toJava $ show (testContext)
08-23 15:45:55.430 20839 20839 D AndroidRuntime: Shutting down VM
08-23 15:45:55.434 20839 20839 E AndroidRuntime: FATAL EXCEPTION: main
08-23 15:45:55.434 20839 20839 E AndroidRuntime: Process: com.saymosaic.nlp.lite, PID: 20839
08-23 15:45:55.434 20839 20839 E AndroidRuntime: java.lang.NoSuchMethodError: No virtual method evaluateTail(Leta/runtime/stg/StgContext;)Leta/runtime/stg/Closure; in class Leta/runtime/stg/Closure; or its super classes (declaration of 'eta.runtime.stg.Closure' appears in /data/app/com.saymosaic.nlp.lite-3QHXqTDwvagYKe6yIZwc5Q==/base.apk!classes12.dex)
08-23 15:45:55.434 20839 20839 E AndroidRuntime: at base.ghc.Base.zpzp(Base.hs:1145)
08-23 15:45:55.434 20839 20839 E AndroidRuntime: at base.ghc.Base$sat$62.thunkEnter(Base.hs:1020)
08-23 15:45:55.434 20839 20839 E AndroidRuntime: at eta.runtime.thunk.UpdatableThunk.evaluate(UpdatableThunk.java:24)
08-23 15:45:55.434 20839 20839 E AndroidRuntime: at base.java.StringBase.$wgo(StringBase.hs:70)
08-23 15:45:55.434 20839 20839 E AndroidRuntime: at base.java.StringBase.$wtoJString(StringBase.hs:69)
08-23 15:45:55.434 20839 20839 E AndroidRuntime: at app.Run$print_context.thunkEnter(Run.hs:39)
08-23 15:45:55.434 20839 20839 E AndroidRuntime: at eta.runtime.thunk.CAF.evaluate(CAF.java:35)
...
while the following was not crashing
foreign export java "@static org.mosaix.eta.Run.hello"
hello :: JString -> JString
hello str = toJava "hello"
Actually there might be some caching going on. print_context() works after deleting ~/.gradle/caches
08-23 21:29:01.880 25204 25204 I haskell : Context {referenceTime = DucklingTime 2013-02-12 02:30:00 -0200, locale = EN_XX}
The issue is also gone for run_parse()
I've got duckling to compile and installed in Android, but at runtime eta cannot find the implementation of evaluateTail(). I can see that evaluateTail is written in Types.hs here. Is this part failing?
Somehow the eta-duckling project does not seem to have such an issue: https://github.com/typelead/eta-hackage/issues/143
Description
logcat
app/build.gradle:
build.gradle:
Expected Behavior
Actual Behavior
Possible Fix
Steps to Reproduce
1. 2. 3. 4.
Context
Your Environment