i-jetty icon indicating copy to clipboard operation
i-jetty copied to clipboard

GET media list for audio failed, status: 200 reason: parsererror exception: undefined

Open GoogleCodeExporter opened this issue 9 years ago • 6 comments

What steps will reproduce the problem?
1. Browse console application / Media folder
2. javascript alerts appear while previews are loading.
3.

What is the expected output? What do you see instead?
I have about 100 photos, 3gb of music and few views on the card. 

a) When I browse to the Media tab within the console application, I get two 
popups that say:

GET media list for audio failed, status: 200 reason: parsererror exception: 
undefined

b) The Audio entry on the page shows:

Audio
Failed to get audio!

c) The Video entry on the page shows a weird character:

Video



While investigating log cat, I see many OOM errors like the one below:

E/Jetty   ( 6261): Error for /console/media/db/fetch/images/external/72/thumb/
E/Jetty   ( 6261): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
E/Jetty   ( 6261):      at android.graphics.BitmapFactory.nativeDecodeStream(Nat
ive Method)
E/Jetty   ( 6261):      at android.graphics.BitmapFactory.decodeStream(BitmapFac
tory.java:470)
E/Jetty   ( 6261):      at android.graphics.BitmapFactory.decodeStream(BitmapFac
tory.java:525)
E/Jetty   ( 6261):      at android.provider.MediaStore$Images$Media.getBitmap(Me
diaStore.java:529)
E/Jetty   ( 6261):      at org.mortbay.ijetty.console.MediaBrowserServlet.doGetF
etchMedia(MediaBrowserServlet.java:248)
E/Jetty   ( 6261):      at org.mortbay.ijetty.console.MediaBrowserServlet.doGet(
MediaBrowserServlet.java:179)
E/Jetty   ( 6261):      at javax.servlet.http.HttpServlet.service(HttpServlet.ja
va:707)
E/Jetty   ( 6261):      at javax.servlet.http.HttpServlet.service(HttpServlet.ja
va:820)
E/Jetty   ( 6261):      at org.eclipse.jetty.servlet.ServletHolder.handle(Servle
tHolder.java:538)
E/Jetty   ( 6261):      at org.eclipse.jetty.servlet.ServletHandler.doHandle(Ser
vletHandler.java:478)
E/Jetty   ( 6261):      at org.eclipse.jetty.server.handler.ScopedHandler.handle
(ScopedHandler.java:119)
E/Jetty   ( 6261):      at org.eclipse.jetty.security.SecurityHandler.handle(Sec
urityHandler.java:468)
E/Jetty   ( 6261):      at org.eclipse.jetty.server.session.SessionHandler.doHan
dle(SessionHandler.java:227)
E/Jetty   ( 6261):      at org.eclipse.jetty.server.handler.ContextHandler.doHan
dle(ContextHandler.java:937)
E/Jetty   ( 6261):      at org.eclipse.jetty.servlet.ServletHandler.doScope(Serv
letHandler.java:406)
E/Jetty   ( 6261):      at org.eclipse.jetty.server.session.SessionHandler.doSco
pe(SessionHandler.java:186)
E/Jetty   ( 6261):      at org.eclipse.jetty.server.handler.ContextHandler.doSco
pe(ContextHandler.java:871)
E/Jetty   ( 6261):      at org.eclipse.jetty.server.handler.ScopedHandler.handle
(ScopedHandler.java:117)
E/Jetty   ( 6261):      at org.eclipse.jetty.server.handler.ContextHandlerCollec
tion.handle(ContextHandlerCollection.java:247)
E/Jetty   ( 6261):      at org.eclipse.jetty.server.handler.HandlerCollection.ha
ndle(HandlerCollection.java:149)
E/Jetty   ( 6261):      at org.eclipse.jetty.server.handler.HandlerWrapper.handl
e(HandlerWrapper.java:110)
E/Jetty   ( 6261):      at org.eclipse.jetty.server.Server.handle(Server.java:34
6)
E/Jetty   ( 6261):      at org.eclipse.jetty.server.HttpConnection.handleRequest
(HttpConnection.java:438)
E/Jetty   ( 6261):      at org.eclipse.jetty.server.HttpConnection$RequestHandle
r.headerComplete(HttpConnection.java:901)
E/Jetty   ( 6261):      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParse
r.java:562)
E/Jetty   ( 6261):      at org.eclipse.jetty.http.HttpParser.parseAvailable(Http
Parser.java:214)
E/Jetty   ( 6261):      at org.eclipse.jetty.server.AsyncHttpConnection.handle(A
syncHttpConnection.java:43)
E/Jetty   ( 6261):      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle
(SelectChannelEndPoint.java:545)
E/Jetty   ( 6261):      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(
SelectChannelEndPoint.java:43)
E/Jetty   ( 6261):      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
QueuedThreadPool.java:529)
E/Jetty   ( 6261):      at java.lang.Thread.run(Thread.java:1019)

I understand that phone memory is limited and so on - no problems with OOM 
errors.

However, I would like either to:
a) see the error messages in red somewhere on the page and not having to 
dismiss popup alerts.
b) possibility to disable previews when the page is displayed for the first 
time.

What version of the product are you using? On what operating system?
i-jetty / i-jetty console 3.0
Android 2.3.3 / Sony Xperia X10

Please provide any additional information below.
None. Keep up the good work :)

Original issue reported on code.google.com by [email protected] on 18 Aug 2011 at 6:11

GoogleCodeExporter avatar Mar 14 '15 08:03 GoogleCodeExporter

I think we need to do pagination of the media, just like we do in i-jetty-3.0 
for the contacts. Maybe we should also ditch the thumbnails????

Original comment by [email protected] on 19 Aug 2011 at 5:24

  • Changed state: Accepted

GoogleCodeExporter avatar Mar 14 '15 08:03 GoogleCodeExporter

Don't know if its already done, but if not, thumbnails could also be cached in 
a ".nomedia" folder ?

Original comment by [email protected] on 19 Aug 2011 at 5:46

GoogleCodeExporter avatar Mar 14 '15 08:03 GoogleCodeExporter

Checked in a fix to paginate media files. Also a fix to try to ensure that 
bitmaps get recycled correctly to try and avoid OOMs. 

I would appreciate it if someone that has a large amount of media files stored 
on their phone could give the changes to the console webapp a try out and see 
if that improves things.

Original comment by [email protected] on 25 Aug 2011 at 5:38

GoogleCodeExporter avatar Mar 14 '15 08:03 GoogleCodeExporter

I could test, but I don't have a full build environment for i-jetty and the 
console. Can you please upload an .apk file ? 
I will try to setup a build environment in the meantime.

Original comment by [email protected] on 25 Aug 2011 at 5:58

GoogleCodeExporter avatar Mar 14 '15 08:03 GoogleCodeExporter

Also, I think the original error was caused by the fact that login sessions 
were set to the default, so your login session timed out.

I've changed login sessions to timeout with the browser, so this won't happen 
again. Furthermore, I've changed the error message so it isn't an alert dialog, 
but on the page and with a bit more helpful text.

Original comment by [email protected] on 7 Sep 2011 at 6:14

GoogleCodeExporter avatar Mar 14 '15 08:03 GoogleCodeExporter

Here's a new console installer. Run it to replace the existing console webapp 
then restart i-jetty.  NOTE: I've found that sometimes i-jetty will crash if 
there is an /sdcard/jetty/work directory into which the old console webapp was 
unpacked. If it happens, just remove that directory and then restart i-jetty. 

Original comment by [email protected] on 7 Sep 2011 at 6:17

Attachments:

GoogleCodeExporter avatar Mar 14 '15 08:03 GoogleCodeExporter