>   * the JPEG viewer bus-errors and crashes the simulator:
> 
>     Fatal signal: Bus Error (SDL Parachute Deployed)
>     2006-05-10 20:49:50.356 rockboxui[7509] *** _NSAutoreleaseNoPool():
>          Object 0x318ce40 of class NSCFArray autoreleased with no pool in 
> place - just leaking
>     ...[another six or seven of those]...

The JPEG viewer seems to be really fragile.  It crashes if you mix
JPEG files with directories in the same folder; it crashes if you try
to use it twice.  Here's a patch which fixes those two bugs.  I'll see
if I can add this to the bug tracker.

Bill

Index: apps/plugins/jpeg.c
===================================================================
RCS file: /cvsroot/rockbox/apps/plugins/jpeg.c,v
retrieving revision 1.47
diff -c -r1.47 jpeg.c
*** apps/plugins/jpeg.c 3 May 2006 17:45:09 -0000       1.47
--- apps/plugins/jpeg.c 16 May 2006 21:06:30 -0000
***************
*** 1970,1981 ****
  
  bool jpg_ext(const char ext[])
  {
!     if(!rb->strcasecmp(ext,".jpg") ||
!        !rb->strcasecmp(ext,".jpe") ||
!        !rb->strcasecmp(ext,".jpeg"))
!             return true;
!     else
!             return false;
  }
  
  /*Read directory contents for scrolling. */
--- 1970,1983 ----
  
  bool jpg_ext(const char ext[])
  {
!   if (ext == 0)
!     return false;
!   else if(!rb->strcasecmp(ext,".jpg") ||
!           !rb->strcasecmp(ext,".jpe") ||
!           !rb->strcasecmp(ext,".jpeg"))
!     return true;
!   else
!     return false;
  }
  
  /*Read directory contents for scrolling. */
***************
*** 1991,1996 ****
--- 1993,1999 ----
  #else
      file_pt = rb->plugin_get_audio_buffer(&buf_size);
  #endif
+     entries = 0;
  
      for(i = 0; i < tree->filesindir; i++)
      {

Reply via email to