Bug 127847 - graphics/libgphoto2: Too low fixed image limit in libgphoto2-2.4.2
Summary: graphics/libgphoto2: Too low fixed image limit in libgphoto2-2.4.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pav Lucistnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-04 08:20 UTC by Henrik Herranen
Modified: 2008-11-09 16:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Herranen 2008-10-04 08:20:09 UTC
gphoto2 cannot handle situations where there are more than 1024 images on a
memory card, which in itself is a situation is very typical already on 16 GB
Compact Flash cards, not to even speak of new 100 GB cards. The problem is
caused port libgphoto2-2.4.2 file gphoto2-list.c line 75 that says:
#define MAX_ENTRIES 1024

Fix: 

The quick fix is to change this to a larger number, i.e. 8192 or 16384. I've
been using a version modified as this and it works well for my needs.
#define MAX_ENTRIES 8192

However, who such an arbitrary restriction? The correct way would be to
dynamically allocate as much space as is needed.
How-To-Repeat: Take a memory card with over 1024 images, and try to copy images above the
1024th image, and you'll get the following message:
*** Error (-8: 'Fixed limit exceeded') ***
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2008-10-04 08:30:50 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Over to maintainer.
Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2008-11-09 16:09:44 UTC
State Changed
From-To: open->closed

I have raised the MAX_ENTRIES limit as a part of 2.4.3 update. 
BTW, the development "trunk" version already replaced this array with dynamic 
list, so 2.5.0 once it comes, will no longer need this hack.
Comment 3 dfilter service freebsd_committer freebsd_triage 2008-11-09 16:10:58 UTC
pav         2008-11-09 16:10:50 UTC

  FreeBSD ports repository

  Modified files:
    graphics/gphoto2     Makefile distinfo 
    graphics/libgphoto2  Makefile distinfo pkg-plist 
  Added files:
    graphics/libgphoto2/files patch-MAX_ENTRIES 
  Removed files:
    graphics/libgphoto2/files patch-camlibs-ptp2-library.c 
  Log:
  - Update to 2.4.3
  
  - Raise MAX_ENTRIES limit from 1024 to 8192 entries (a stopgap for 2.4.x
    series, 2.5.x will have adaptive list)
  PR:             ports/127847
  Requested by:   Henrik Herranen <leopold@iki.fi>
  
  Revision  Changes    Path
  1.55      +1 -1      ports/graphics/gphoto2/Makefile
  1.22      +3 -3      ports/graphics/gphoto2/distinfo
  1.42      +1 -2      ports/graphics/libgphoto2/Makefile
  1.16      +3 -3      ports/graphics/libgphoto2/distinfo
  1.1       +11 -0     ports/graphics/libgphoto2/files/patch-MAX_ENTRIES (new)
  1.2       +0 -11     ports/graphics/libgphoto2/files/patch-camlibs-ptp2-library.c (dead)
  1.17      +7 -0      ports/graphics/libgphoto2/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"