Bug Reports against Recent Builds -- Report bugs here - page 18 - CHDK Releases - CHDK Forum
supplierdeeply

Bug Reports against Recent Builds -- Report bugs here

  • 281 Replies
  • 126973 Views
Re: Bug Reports against Recent Builds -- Report bugs here
« Reply #170 on: 02 / August / 2012, 13:56:56 »
Advertisements
Few bugs found by cppcheck:

gps.c, buffer overrun:
char gpx_name[17];
...
sprintf(gpx_name, "A/GPS/Logging/%02d_%02d-%02d_%02d.gpx", ttm->tm_mon+1, ttm->tm_mday, ttm->tm_hour, ttm->tm_min);
Looking at this module there is plenty more sprintf calls that seems risky (i.e. taking result of lang_str() or other external function as a argument).

File handle leak at gps.c, gps_navigate_home():
sprintf(home_name, "A/GPS/Navigation/Home.txt");
FILE* fp = fopen(home_name, "r");
...

gui_space.c, gui_space_draw_mb(): these to sprintf calls seems to have redundant '%' in formatting string:
        if (freemb < 10000) sprintf(osd_buf+offset, "%4d%M\0",freemb);
        else sprintf(osd_buf+offset, "%4d%G\0",freemb/1024);   // if 10 GiB or more free, print in GiB instead of MiB

suba.c, possible NULL dereferencing suba pointer:
   if (suba)
   {
              .....
   }
              .....
    *allocated_size = suba->size_total;     // TODO check this is a reasonable value for this field

module_menu.c, these strings could be possibly not NULL-terminated:
   if ( minfo.moduleName < 0 )
     { strncpy( modulename, lang_str(-minfo.moduleName), sizeof(modulename)); }
   else if ( minfo.moduleName >= flat->entry )
     { strncpy( modulename, (content+minfo.moduleName), sizeof(modulename)); }

I'm not sure about this scheme (often used):
      FILE* fp = fopen(...);
      if( fp )
      {
                                ....
      }
      fclose(fp); <<< closing possibly invalid handle
I think all runtime error detection systems I know would report error when closing invalid handle and at least one runtime library I worked with would crash here.

Bug Report - CHDK, Canon G11 and battery problem
« Reply #171 on: 01 / September / 2012, 07:55:28 »
Hi,

Device:
 Canon G11 v1.00L

CHDK version:
 g11-100l-1.1.0-2057-full_BETA or later (I'm testing whether problem exists in 2004 build - I don't have access to earlier builds, but I remember that the problem didn't exit in CHDK v1.0 builds)

Problem description:
 After leaving a battery in camera for night (of course camera is turned off), the battery that is 100% draws to 0% in 24 hours, so when I start the camera next day I can only see a message: 'recharge the battery'. I don't know why it happens - I only suspect (I'm trying to verify this) that when you take at least one photo with flash and then turn off the camera, some CHDK process drains the battery, so next day it has 0%. It only happens when I use CHDK, so it's not a bug in Canon's firmware. I'm not using any scripts, only OSD like focal length, etc.  Have you had similar problems with battery? Can you fix it, because I like using CHDK...

BR
« Last Edit: 01 / September / 2012, 07:57:10 by mary »

Re: Bug Reports against Recent Builds -- Report bugs here
« Reply #172 on: 01 / September / 2012, 08:49:46 »
... some CHDK process drains the battery, so next day it has 0%. It only happens when I use CHDK, so it's not a bug in Canon's firmware.
This is quite bizarre. It seems unlikely that CHDK can drain a battery overnight on a camera that's turned off.  Unless of coarse the camera does not really turn off - something in CHDK causes the shutdown sequence to halt prior to completing.

I can build you an old v1.0.0 version if you want to test that.

Strange that nobody else has reported it.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Bug Reports against Recent Builds -- Report bugs here
« Reply #173 on: 02 / September / 2012, 07:57:10 »
Hi,

Thanks for the response. This happened three times over some time, so in rare situations something goes wrong.
I'm testing v1.1 build 2004 right now.
So far, I've tested the situation where I don't take any pictures - only power on and off the camera many times through the day - it seems to work OK (battery is 92% all the time after one day of tests). Next day, I'll test taking pictures only with flash (+one free day for battery check) and then I'll repeat the same procedure without flash. The worst thing that may happen is that the described problem will not show up in my tests (because it may be very rare).

BR


Re: Bug Reports against Recent Builds -- Report bugs here
« Reply #174 on: 15 / September / 2012, 00:29:42 »
Wrong ISO value in EXIF data for DNG files - SX20

Device: SX20 1.02B

CHDK Ver.: sx20-102b-1.2.0-2137-full (and earlier, I think I first noticed in 2027)

Problem: The ISO value always appears as 100 in DNG files regardless of the actual setting.  The value in JPG files is correct.  I'm using DNG version 1.3 (my whole reason for using dev releases), DFS set to off, extension .DNG.  If I can provide any more information, please let me know.

Re: Bug Reports against Recent Builds -- Report bugs here
« Reply #175 on: 16 / September / 2012, 03:53:56 »
Did I post this in the wrong place?

I know the first post says to use a bug tracker, but that link is broken.  If someone can point me in the right direction, I'd appreciate it.

Thanks a bunch!

Re: Bug Reports against Recent Builds -- Report bugs here
« Reply #176 on: 16 / September / 2012, 09:06:06 »
Did I post this in the wrong place?  I know the first post says to use a bug tracker, but that link is broken.  If someone can point me in the right direction, I'd appreciate it.
The bugtracker is  not being used as most bugs were reported in this forum instead.

Typically,  the best place to report a bug is the "porting thread" for the particular camera model.  This thread is the second best place.   

For the sx20, the porting thread is here :  http://chdk.setepontos.com/index.php?topic=4348.0

Please bear in mind that there are only a few actual CHDK developers and they are all volunteer.  There is no formal support team or mechanism so when you do report a bug,  you may not get an answer because nobody knows what is wrong (and they likely don't have the same camera that you do).  That's why the porting thread is a good place to start - the person who ported your camera might still be getting email notices when somebody posts in "his" thread.

All that being said,  the DNG and ISO code is common to all cameras.  Seems strange it would be broken just on the SX20.  I'll take a quick look but can't promise anything.

BTW : the worst way to report a bug is to post the same thing in several threads - the devs get cranky when you do that.  Fortunately, you did not do that.


Ported :   A1200    SD940   G10    Powershot N    G16

Re: Bug Reports against Recent Builds -- Report bugs here
« Reply #177 on: 16 / September / 2012, 09:57:21 »
If someone can point me in the right direction, I'd appreciate it.
Update 1:  I rebuilt all three sx20 firmware versions and the all have stub addresses that the latest version of the sigfinder thinks are "wrong".   There was nothing that actually says "DNG ISO value" but if you want to test a rebuilt version with the addresses corrected I will post one for you.


Update 2:  tried your test on my G10.  Changed the Canon ISO setting for each of three shots - all the DNG's report ISO100 - all the JPG's report the correct setting.   So its not just a problem with the sx20.


Update 3:  same test but on my A1200.  ISO value in the DNG match those in the JPG.


Update 4:  same test but on my IXUS120_SD940.  ISO value in the DNG all report 100
« Last Edit: 16 / September / 2012, 11:32:42 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


Re: Bug Reports against Recent Builds -- Report bugs here
« Reply #178 on: 17 / September / 2012, 00:07:03 »
[...]but if you want to test a rebuilt version with the addresses corrected I will post one for you.

Thanks a lot for the reply! I'm happy to test anything if it will help track down the issue.  I also have an a530 I can test on.  I don't use it much and don't know if it exhibits the same behavior right now.  From your later updates, I'm guessing the problem is more widespread.

Quote from: waterwingz
BTW : the worst way to report a bug is to post the same thing in several threads - the devs get cranky when you do that.  Fortunately, you did not do that.

Yes, I know that's generally bad forum etiquette anywhere you go.  That's why I wanted to make sure I was in the right place.  I'll use the porting thread for any future issues with the SX20.  Thanks for the link.

*

Offline srsa_4c

  • ******
  • 4451
Re: Bug Reports against Recent Builds -- Report bugs here
« Reply #179 on: 19 / September / 2012, 20:52:20 »
Regarding this DNG exif problem:
Make sure you update the CHDK modules too when you update to a new release. The DNG code resides in a module, and unfortunately, module version checks do not seem to be 100% reliable.
I have experienced an issue with DNG a while ago when I started the porting of S1 with a codebase from April 2012 and later upgraded to another from July. I forgot to upgrade the modules on one of my cards, and later I found that the DNGs I created on that card are badly corrupted (in their header). Upgrading the modules solved this issue.

Also, try to check how the latest 1.0 release works. http://chdk.wikia.com/wiki/Downloads#Conserved_Versions

 

Related Topics