[TIMOB-9666] Android: Application doesn't work with Fastdev enabled
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-07-05T03:39:11.000+0000 |
| Affected Version/s | Release 2.0.2, Release 2.0.1 |
| Fix Version/s | Release 2.1.0, Sprint 2012-13 Core |
| Components | Android |
| Labels | core, module_imageview, qe-testadded, regression |
| Reporter | Nikhil Sharma |
| Assignee | Josh Roesslein |
| Created | 2012-06-20T14:23:49.000+0000 |
| Updated | 2012-07-05T14:31:21.000+0000 |
Description
The application doesn't run on the emulator with fastdev enabled. It only works if the fastdev is disabled. I'm attaching the error logs. Please send me an e-mail if you need the source code.
To reproduce this issue here's a test case. The bug occurs when you set the "image"
property of an ImageView to an empty string or a path that points to a directory.
var win = Ti.UI.createWindow();
win.add(Ti.UI.createImageView({
image: ""
}));
win.open();
Attachments
| File | Date | Size |
|---|---|---|
| error_log.rtf | 2012-06-20T14:23:49.000+0000 | 16672 |
This is caused by an exception in the fastdev server:
Exception happened during processing of request from ('127.0.0.1', 63348) Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 582, in process_request_thread self.finish_request(request, client_address) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 323, in finish_request self.RequestHandlerClass(request, client_address, self) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 639, in __init__ self.handle() File "/Users/jroesslein/Development/Appcelerator/titanium_mobile/support/android/fastdev.py", line 170, in handle self.handle_get(tokens[1]) File "/Users/jroesslein/Development/Appcelerator/titanium_mobile/support/android/fastdev.py", line 226, in handle_get self.send_file(path) File "/Users/jroesslein/Development/Appcelerator/titanium_mobile/support/android/fastdev.py", line 238, in send_file buffer = open(path, mode).read() IOError: [Errno 21] Is a directory: '/Users/<user>/Desktop/<app>/Resources/<app>/ui/'Created [PR #2445](https://github.com/appcelerator/titanium_mobile/pull/2445) to resolve issue. Test by running the simplified test case above. Before the fix you should get a crash similar to the one being reported in the error_log.rtf file. Apply the fix then run the application again. There should be no more crash. Try various values for the "image" property such as a directory path or a string with just whitespace.
Closing as fixed. Verified with: Titanium Studio, build: 2.1.0.201206221045 Titanium SDK: 2.1.0.v20120622174154 Device: Samsung Galaxy tab (3.2)
Re-opening to edit the label.