power off authomatically - page 4 - General Help and Assistance on using CHDK stable releases - CHDK Forum supplierdeeply

power off authomatically

  • 41 Replies
  • 9691 Views
*

Offline timgor

  • ***
  • 150
Re: power off authomatically
« Reply #30 on: 24 / May / 2013, 09:40:36 »
Advertisements
The change happens between revisions 2761 and 2762.  Revision 2761 failed after 2.5 hours and 2762 works well.
I will test revision 2761 with the fake md_detect_motion(void) function but it must be admitted that I already did it for some revision and I can say with 99% that it will crash.
Ok, I will generate debug files and publish it tomorrow.

*

Offline timgor

  • ***
  • 150
Re: power off authomatically
« Reply #31 on: 27 / May / 2013, 15:38:57 »
Hello reyalp,
It looks like my empty function works good without crash.
Can you please compile 2761 revision again with your debug output? I will test it. 

*

Offline reyalp

  • ******
  • 14111
Re: power off authomatically
« Reply #32 on: 27 / May / 2013, 15:58:03 »
Here's a build of 2761 with the debug code

Given what you've reported so far, I'd suspect it's the same compiler bug that was fixed in 2762, but I guess it would be good to confirm that if we can.
Don't forget what the H stands for.

*

Offline timgor

  • ***
  • 150
Re: power off authomatically
« Reply #33 on: 27 / May / 2013, 18:27:38 »
I have attached the output files. I have no idea what it means. Let me know if you need romlog.log or other files.


*

Offline reyalp

  • ******
  • 14111
Re: power off authomatically
« Reply #34 on: 27 / May / 2013, 19:46:30 »
I have attached the output files. I have no idea what it means. Let me know if you need romlog.log or other files.
Please post the romlog as well, thanks.
Don't forget what the H stands for.

*

Offline timgor

  • ***
  • 150
Re: power off authomatically
« Reply #35 on: 27 / May / 2013, 19:48:49 »
romlog and modules for the crash.

*

Offline timgor

  • ***
  • 150
Re: power off authomatically
« Reply #36 on: 30 / May / 2013, 11:31:07 »
Hello reyalp,
did you have a chance to look at the files? what is your priority suspicion?
is it
Code: [Select]
val = img[y + x + 1];line?
y+x+1 can be out of array size or what? I would be happy to continue some tests.
I just want to put val=1 and see if the crash will happen.
Unfortunately I'm not familiar with the structure of the camera and the software.

*

Offline reyalp

  • ******
  • 14111
Re: power off authomatically
« Reply #37 on: 30 / May / 2013, 15:43:08 »
Hello reyalp,
did you have a chance to look at the files? what is your priority suspicion?
is it
Code: [Select]
val = img[y + x + 1];line?
y+x+1 can be out of array size or what? I would be happy to continue some tests.
I just want to put val=1 and see if the crash will happen.
Unfortunately I'm not familiar with the structure of the camera and the software.
Sorry, I haven't had a chance to look into this yet. I do still plan to, I just got distracted with the DNG optimization project.

Just to confirm, you haven't seen this error in the builds after >  2761? If this is correct, I'd expect it is caused by the same optimization bug that was fixed in 2762, but I don't see immediately how it could cause the symptom.
Don't forget what the H stands for.


*

Offline timgor

  • ***
  • 150
Re: power off authomatically
« Reply #38 on: 30 / May / 2013, 15:53:30 »
Quote
Just to confirm, you haven't seen this error in the builds after >  2761? If this is correct
Yes, I have downloaded both revisions 2761 and 2762 and compiled them. 2762 works well and 2761 failed.

*

Offline reyalp

  • ******
  • 14111
Re: power off authomatically
« Reply #39 on: 02 / June / 2013, 19:10:41 »
Quote
Just to confirm, you haven't seen this error in the builds after >  2761? If this is correct
Yes, I have downloaded both revisions 2761 and 2762 and compiled them. 2762 works well and 2761 failed.
I finally made some time to look at this. I'm pretty sure it was caused by the same bug that was fixed in 2762.

shooting_get_prop() was vulnerable to the same problem, and called indirectly when calculating the img value because of the unneeded aspect ratio code. I haven't gone through and verified that the exact bogus value we see could be produced, but it certainly looks like it could. So unless the problem shows up again, I think we can say case closed.

Code: [Select]
03c2a530 <shooting_get_prop>:
 3c2a530: b510      push {r4, lr}
 3c2a532: b081      sub sp, #4
 3c2a534: 466c      mov r4, sp
 3c2a536: 3402      adds r4, #2
 3c2a538: 1c21      adds r1, r4, #0
 3c2a53a: 2202      movs r2, #2
 3c2a53c: f013 fc14 bl 3c3dd68 <__get_property_case_from_thumb>
 3c2a540: b001      add sp, #4         <<< Free stack
 3c2a542: 2300      movs r3, #0
 3c2a544: 5ee0      ldrsh r0, [r4, r3]   <<< value from freed stack
 3c2a546: bc10      pop {r4}
 3c2a548: bc02      pop {r1}
 3c2a54a: 4708      bx r1
This probably caused a few other mysterious problems  :blink:

The unneeded propcase calls were removed in r2773, so even if the optimization bug hadn't been fixed, this particular instance would have gone away.

Thanks for your help debugging.
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal