Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2158] Android: File System run time errors (createTimeStamp not supported) + crash

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2011-07-07T11:55:11.000+0000
Affected Version/sRelease 1.5.0
Fix Version/sSprint 2011-22
ComponentsAndroid
Labelsandroid, android_refactor, defect, file, regression, system
ReporterThomas Huelbert
AssigneeOpie Cyrus
Created2011-04-15T03:12:17.000+0000
Updated2011-07-07T11:56:19.000+0000

Description

1.5.0.70ce98 g2 running 2.2, G1 running 1.6, sim 2.2.

1.Platform>File test

results:runtime errors, followed by a crash

I/TiAPI (16627): (kroll$81) [84,5659266] Resources Directory :app://
I/TiAPI (16627): (kroll$81) [1,5659267] Temp Directory :undefined
I/TiAPI (16627): (kroll$81) [3,5659270] Application Directory :null
I/TiAPI (16627): (kroll$81) [1,5659271] Application Data Directory :appdata-private://
I/TiAPI (16627): (kroll$81) [0,5659271] Application Support Directory :undefined
I/TiAPI (16627): (kroll$81) [1,5659272] External Storage Available :undefined
I/TiAPI (16627): (kroll$81) [8,5659280] Separator :/
I/TiAPI (16627): (kroll$81) [2,5659282] Line Ending :
I/TiAPI (16627): (kroll$81) [7,5659289] file = [object TiFile]
I/TiAPI (16627): (kroll$81) [3,5659292] contents blob object = Hello World. this is a filesystem read test.
I/TiAPI (16627): (kroll$81) [6,5659298] contents = Hello World. this is a filesystem read test.
I/TiAPI (16627): (kroll$81) [1,5659299] mime type = text/plain
I/TiAPI (16627): (kroll$81) [2,5659301] nativePath = file:///android_asset/Resources/text.txt
I/TiAPI (16627): (kroll$81) [3,5659304] exists = true
I/TiAPI (16627): (kroll$81) [2,5659306] size = 44
I/TiAPI (16627): (kroll$81) [3,5659309] readonly = true
I/TiAPI (16627): (kroll$81) [1,5659310] symbolicLink = false
I/TiAPI (16627): (kroll$81) [1,5659311] executable = false
I/TiAPI (16627): (kroll$81) [6,5659317] hidden = false
I/TiAPI (16627): (kroll$81) [1,5659318] writeable = undefined
I/TiAPI (16627): (kroll$81) [1,5659319] name = text.txt
I/TiAPI (16627): (kroll$81) [2,5659321] extension = txt
I/TiAPI (16627): (kroll$81) [1,5659322] resolve = file:///android_asset/Resources/text.txt
W/TiBaseFile(16627): (kroll$81) [3,5659325] Method is not supported org.appcelerator.titanium.io.TiResourceFile : createTimestamp
I/TiAPI (16627): (kroll$81) [7,5659332] created = Wed Dec 31 1969 16:00:00 GMT-0800 (PST)
I/TiAPI (16627): (kroll$81) [84,5659416] directoryListing = app.js,app.jss,comic_zine_ot.otf,common.jss,cricket.wav,default_app_logo.png,echo.js,examples,images,jquery-1.3.2.js,label_basic.jss,main_windows,movie.mp4,my_js_include.js,my_js_include_2.js,paradise_lost.txt,params.js,pop.caf,test.css,testdb.db,text.txt,todo.js,welcome.js
W/TiBaseFile(16627): (kroll$81) [2,5659418] Method is not supported org.appcelerator.titanium.io.TiResourceFile : getParent
I/TiAPI (16627): (kroll$81) [0,5659418] getParent = null
I/TiAPI (16627): (kroll$81) [7,5659425] spaceAvailable = 0
E/KrollMethod(16627): (kroll$81) [6,5659431] Exception calling kroll method createDirectory
E/KrollMethod(16627): java.lang.IllegalArgumentException: Expected 1 arguments for createDirectory, got 0
E/KrollMethod(16627): at ti.modules.titanium.filesystem.FileProxyBindingGen$30.invoke(FileProxyBindingGen.java:822)
E/KrollMethod(16627): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:46)
E/KrollMethod(16627): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1711)
E/KrollMethod(16627): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
E/KrollMethod(16627): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
E/KrollMethod(16627): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
E/KrollMethod(16627): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3161)
E/KrollMethod(16627): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
E/KrollMethod(16627): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142)
E/KrollMethod(16627): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:193)
E/KrollMethod(16627): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:218)
E/KrollMethod(16627): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:115)
E/KrollMethod(16627): at android.os.Handler.dispatchMessage(Handler.java:95)
E/KrollMethod(16627): at android.os.Looper.loop(Looper.java:123)
E/KrollMethod(16627): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:73)
E/KrollContext(16627): (kroll$81) [7,5659438] Error evaluating source: Wrapped java.lang.IllegalArgumentException: Expected 1 arguments for createDirectory, got 0 (app://examples/filesystem.js#39)
E/KrollContext(16627): org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: Expected 1 arguments for createDirectory, got 0 (app://examples/filesystem.js#39)
E/KrollContext(16627): at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1781)
E/KrollContext(16627): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:77)
E/KrollContext(16627): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1711)
E/KrollContext(16627): at script(app://examples/filesystem.js:39)
E/KrollContext(16627): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
E/KrollContext(16627): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
E/KrollContext(16627): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
E/KrollContext(16627): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3161)
E/KrollContext(16627): at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
E/KrollContext(16627): at org.mozilla.javascript.Context.evaluateReader(Context.java:1142)
E/KrollContext(16627): at org.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:193)
E/KrollContext(16627): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:218)
E/KrollContext(16627): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:115)
E/KrollContext(16627): at android.os.Handler.dispatchMessage(Handler.java:95)
E/KrollContext(16627): at android.os.Looper.loop(Looper.java:123)
E/KrollContext(16627): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:73)
E/KrollContext(16627): Caused by: java.lang.IllegalArgumentException: Expected 1 arguments for createDirectory, got 0
E/KrollContext(16627): at ti.modules.titanium.filesystem.FileProxyBindingGen$30.invoke(FileProxyBindingGen.java:822)
E/KrollContext(16627): at org.appcelerator.kroll.KrollMethod.call(KrollMethod.java:46)
E/KrollContext(16627): ... 13 more

Comments

  1. Opie Cyrus 2011-06-01

    Spoke with iOS lead and agreed that it acceptable for iOS to return timestamp for Resource files while Android doesn't due to platform differences.

JSON Source