Are these software upgrades possible? - page 6 - General Help and Assistance on using CHDK stable releases - CHDK Forum supplierdeeply

Are these software upgrades possible?

  • 187 Replies
  • 49703 Views
*

Offline reyalp

  • ******
  • 14119
Re: Are these software upgrades possible?
« Reply #50 on: 14 / May / 2011, 01:35:54 »
Advertisements
1. what is a usage example for shoot()? Is it a function that takes no parameters? would the usage example just be .shoot?
In lua shoot()
Quote
2. ok, apparently the script that tells the firmware to save a log of errors is here: CHDK/SCRIPTS/TEST/ROMLOG.LUA and you can also give it a parameter of 0 or 1 to not overwrite or overwrite the log respectively. The question is, how is the ptp command formed that would tell it to run that script? I'm assuming I'll have to tell it to run every time the camera is powered on.
No. When the camera crashes, the canon firm records the crashdump to internal flash memory (not the SD card, but the "ROM" on the camera.)

The script just copies form ROM to SD card, so you can run it after you've rebooted the camera.
Don't forget what the H stands for.

Re: Are these software upgrades possible?
« Reply #51 on: 14 / May / 2011, 10:48:52 »
« Last Edit: 14 / May / 2011, 16:03:50 by John1234 »

*

Offline reyalp

  • ******
  • 14119
Re: Are these software upgrades possible?
« Reply #52 on: 14 / May / 2011, 16:25:44 »
EDIT: I've got romlog.lua autostarting at boot. I'm getting out of memory errors whenever I try to send any commands.
FWIW, if you want to get the romlog using ptp, you can just call the functions that romlog.lua would directly, e.g. the following in the CLI will get the romlog (on a modern dryos camera with native calls enabled) to ROMLOG.LOG in the current directory.

Code: [Select]
con> =return call_event_proc("System.Create")
con> =return call_event_proc("GetLogToFile","A/ROMLOG.LOG",1)
con> d A/ROMLOG.LOG
You might want to organize your romlogs by date, e.g, instead of the D command
Code: [Select]
con> !chdk.download("A/ROMLOG.LOG",string.format("ROMLOG-%s.LOG",os.date("%Y-%m-%d_%H-%M")))

If you want to run a script that file that is intended to be run from the menu, you should take care to set up the a,b etc variables that are normally set from @param and the menu., e.g.
Code: [Select]
> a=1;b=0; loadfile('A/CHDK/SCRIPTS/TEST/ROMLOG.LUA')()
Quote
So what it is doing, running out of memory? Why would it randomly try to access a memory address that doesn't exist in this instance yet have no problem executing the same command in another instance?
Memory corruption is more likely. This will happen if you try to run a script before the previous one has terminated, as I mentioned previously. There are also plenty of other things that could cause it, of course. Are you using a recent version of the chdku.lua file with chdkptp ?
Quote
Here is another oddity:
Code: [Select]
15:54:29 .shoot()
15:54:31 .shoot()
15:54:31 syntax
Odd indeed, but would also be explained by memory corruption.
Don't forget what the H stands for.

Re: Are these software upgrades possible?
« Reply #53 on: 14 / May / 2011, 16:52:41 »
Quote
Are you using a recent version of the chdku.lua file with chdkptp ?
I am unless you've updated it in the last week or so..


Here's another error. This time a prefetch abort:
Code: [Select]
Exception!! Vector 0x0C
Occured Time  2011:05:14 13:14:27
Task ID: 36372554
Task name: PTPSessionTA0
Exc Registers:
0xE59FF014
0x03C1C540
0x00000028
0x00000000
0xE59FF014
0x00000000
0x03C1C188
0x00000000
0xFFFFFFFF
0x0000587C
0x0027F130
0x19980218
0x03B1F909
0x003354B0
0x03B2C405
0xE59FF014
0x40000013
StackDump:
0x00000028
0x03C1C518
0x03C1C52C
0xFFFFFFFF
0x03C1C188
0x03B2ED81
0x00000065
0x00000000
0x03B2E9CD
0x03C1C540
0x00000002
0x00000001
0x00335500
0x03C1C518
0x00000000
0x0033556C
0x03B2EDEB
0x00000002
0x03C1C188
0x003355D8
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x03C1C540
0x003355D8
0x03C1C188
0x03C1C518
0x03B2EBC3
0x00000000
0x03C1C188
0x003355D8
0x03C1C518
0x03C1C188
0x03C1C188
0x03B2EB7F
0x03C1C3C8
0x03B45398
0x03C1C3C0
0x03B2F905
0x7631F05C
0x03C1C518
0x03C27A58
0x00000000
0x003355D8
0x03C1C188
0x03B45398
0x03C1C3C0
0x00000000
0x03B29ACB
0x03C27A58
0x00000004
0x03B3FAB8
0x03C1C188
0x00000000
0x03B30EEF
0x00000000
0xFFFFFFFE
0x03B45177
0x03C1C188
0xFFFFD8EE
0x03C1C4E0
0x03B30F31
0x03B32F69
0x03C1C188
0x03C1C3B0
0x00000000
0x03B33029
0x03C1C188
0x03B2B1FD
0x00000008
0x00000000
0x03C1C188
0x03C1C3B0
0x00000000
0x00000000
0x03B2B2BB
0x03C1C188
0x00000000
0x03C26F80
0x03B29947
0x03B3F894
0x03C1C188
0x03B31257
0x03B4C0B8
0x000A093C
0x03B1F049
0x003356A4
0x000A093C
0x03C26F80
0x03B1BFFD
0x03B1F67D
0xFF817DB4
0xFF817DB4
0x60000013
0x00000000
0x0027F284
0xFF813420
0x0000059A
0x00000001
0x60000013
0x00002001
0x00000001
0x00000126
01685960: UI:DSIC:48,0

01686030: SS:ChargeComplete

01686030: UI:DispSwCon_TurnOnDisplayDevice

01686030: UI:DispSwCon_MuteOffPhysicalScreen

01686030: UI:MuteOffPhysicalScreen

01686030: UI:ShootState:0x0

01686030: UI:ShtCon_Deactivate

01686030: UI:ChangePopupStrobe:Close

01686040: SS:StrbModChg

01686060: UI:Strobe:Close

01686060: UI:DSIC:14,0

01686060: UI:DSIC:60,0

01686060: UI:DispSwCon_TurnOnDisplayDevice

01686060: UI:ScreenLock

01686190: UI:Display_CaptInfo

01686220: UI:ScreenUnLock

01686270: UI:DispSw: Unlock

01686270: UI:DispSwCon:Unlock

01686270: UI:TerminateDeliverToZoomController

01686270: UI:ScreenLock

01686280: UI:ScreenUnLock

01686330: UI:OPTICAL_ZOOM_POS

01686330: UI:UnpressZoomLever

01686330: UI:ScreenLock

01686330: UI:ScreenUnLock

01686330: UI:ScreenLock

01686340: UI:Reduce ScreenUnLock

01686340: UI:_EntryIdleShoot

01686340: UI:ShootState:0x0

01686340: UI:DisplayPhysicalScreenCBR

01686340: UI:Re ScreenUnLock

01686340: UI:ScreenUnLock

01686340: UI:DisplayPhysicalScreenCBR

01686340: UI:DisplayPhysicalScreenCBR

01686360: UI:DisplayPhysicalScreenCBR

01798690: UI:AC:Rec2PB

01798690: UI:ShutdownRecMode

01798690: UI:UI_StrobeCon_Stop

01798690: UI:DSIC:e,0

01798690: UI:ScreenLock

01798690: UI:ScreenUnLock

01798690: UI:ScreenLock

01798700: UI:Reduce ScreenUnLock

01798700: UI:ExitRecModeBeforeStopEVF

01798700: UI:LogicalEvent:0x3007:adr:0,Para:0

01798700: SS:ToPlay

01798740: UI:ScreenLock

01798740: UI:ScreenUnLock

01798790: UI:DispSwCon_MuteOnPhysicalScreen

01798790: UI:MuteOnPhysicalScreen

01798790: UI:_PrepareShutDownShootCon

01798790: UI:Sht_CancelStrobeChargeTimer

01798790: UI:DSIC:4c,0

01798790: UI:ScreenLock

01798790: UI:ScreenUnLock

01798800: UI:LogicalEvent:0x3135:adr:0,Para:0

01798800: UI:ShootState:0x10

01798800: UI:DisplayPhysicalScreenCBR

01798800: UI:DisplayPhysicalScreenCBR

01798800: UI:_ShutDownShootCon

01798800: UI:DSIC:14,0

01798800: UI:DSIC:60,0

01798800: UI:DispSwCon_TurnOnDisplayDevice

01798800: UI:ScreenLock

01798900: UI:ScreenUnLock

01798920: UI:DispSw: Unlock

01798930: UI:DSIC:4a,0

01798970: SS:StopFdr 0

01798980: UI:ShtCon_Shut

01798990: UI:ScreenLock

01798990: UI:ScreenUnLock

01798990: UI:_StopBlinkSelfTimerLamp


01798990: UI:CC_ShtdwnRec

01798990: SS:#ImgSys

01799090: UI:Button:0x0000082A:PressMenuButton

01799130: UI:Button:0x0000082B:UnpressMenuButton

01799140: UI:Button:0x00000826:PressDownButton

01799180: UI:ScreenLock

01799180: UI:ScreenUnLock

01799200: UI:Button:0x00000827:UnpressDownButton

01799250: UI:ScreenLock

01799250: UI:ScreenUnLock


Why would it allow the second script to run before the first one is finished? That seems like a fundamental check that would be handled before the second script processed. Is a script currently running? (Yes) wait for script to finish : (no) execute new script. Or the logic could be like this: Is a script running? (Yes) ignore second script : (no) execute second script. I don't think that is the problem anyway. I've had it throw an error on an identical command that was sent about 2 minutes apart so I don't see how it interrupted itself...
« Last Edit: 14 / May / 2011, 17:07:41 by John1234 »


*

Offline reyalp

  • ******
  • 14119
Re: Are these software upgrades possible?
« Reply #54 on: 14 / May / 2011, 17:13:42 »
Why would it allow the second script to run before the first one is finished?
A design fault that has not yet been fixed. It is desirable to be able to abort a running script, it just needs to be done cleanly.

If you think you can do better, the code is all available ;)

As I said, if you use the recent versions of chdkptp lua files, this is prevented in chdku.exec. This change was added in revision 50, on the 7th. See http://www.assembla.com/spaces/chdkptp/stream
Quote
I don't think that is the problem anyway. I've had it throw an error on an identical command that was sent about 2 minutes apart so I don't see how it interrupted itself...
Note that the corruption could have happened earlier. But as I said, there are many other things that can cause memory corruption, and there are also other things that could cause prefetch abort.

edit:
What build of CHDK are you using ?

The romlog is much more useful with the core/main.bin (or core/main.dump) from the build that was running at the time of the crash. If you built it yourself, just posting the core/main.bin from that build will work. Otherwise, I can make you a build for testing from the chdk or chdkde source tree, but I need to know how the build you are currently using is configured.
« Last Edit: 14 / May / 2011, 17:42:33 by reyalp »
Don't forget what the H stands for.

Re: Are these software upgrades possible?
« Reply #55 on: 14 / May / 2011, 17:26:26 »
Quote
Note that the corruption could have happened earlier. But as I said, there are many other things that can cause memory corruption, and there are also other things that could cause prefetch abort.
What is the fastest path to getting the camera to stop crashing for infinitely mysterious, never to be fully understood reasons?

I got the newer version of the lua files but I probably already had them.

*

Offline reyalp

  • ******
  • 14119
Re: Are these software upgrades possible?
« Reply #56 on: 14 / May / 2011, 17:53:16 »
Quote
Note that the corruption could have happened earlier. But as I said, there are many other things that can cause memory corruption, and there are also other things that could cause prefetch abort.
What is the fastest path to getting the camera to stop crashing for infinitely mysterious, never to be fully understood reasons?
Debug it and fix the problem. If you aren't able to do that, you can attempt to narrow down the causes by trial and error. Otherwise, you are dependent on other people doing it in their spare time.

As I have tried to explain before, *all* of CHDK is a hack, the entire PTP feature is still especially immature and experimental, and you are using an alpha port on top of that. It's called "hack development kit" for a reason. If you want to hack, you've come to the right place.  If you are expecting a stable, mature product you can just run your application on, you are likely to be disappointed.
Quote
I got the newer version of the lua files but I probably already had them.
If you had diff'd the files to find out, that would have been far more helpful.
Don't forget what the H stands for.

Re: Are these software upgrades possible?
« Reply #57 on: 14 / May / 2011, 18:00:21 »
Quote
If you had diff'd the files to find out, that would have been far more helpful.
I just copied all of the lua files from trunk 55 over the old ones just to be sure. We'll see what happens. Has gone a whole 30 minutes without crashing.

If the romlog script is always autostarted at boot can't I just use this command  to download it?
!chdk.download("A/ROMLOG.LOG",string.format("ROMLOG-%s.LOG",os.date("%Y-%m-%d_%H-%M")))

I want to make sure I understand this correctly. The romlog file is updated right after a crash correct? so if it crashes the correct sequence would be to, reboot it manually, then download the romlog right?


*

Offline reyalp

  • ******
  • 14119
Re: Are these software upgrades possible?
« Reply #58 on: 14 / May / 2011, 18:10:34 »
I want to make sure I understand this correctly. The romlog file is updated right after a crash correct? so if it crashes the correct sequence would be to, reboot it manually, then download the romlog right?
No. As I explained above, when the camera crashes, the Canon firmware stores the crashlog in *internal* ROM.

The romlog.lua just reads the area of internal ROM where the crashlog is saved, and copies it to the SD card. This can be done any time, and will always get the log from the most recent crash. It doesn't know if the log has been read previously, so it will always fetch the most recent log, even if it's already been read. You can check the timestamp inside the log file to see if it is new.
Don't forget what the H stands for.

Re: Are these software upgrades possible?
« Reply #59 on: 15 / May / 2011, 01:26:00 »
Here is the most recent error:
Code: [Select]
19:36:01 .shoot()
19:36:03 .shoot()
19:36:03 syntax
19:36:05 .shoot()
19:36:07 .shoot()
19:36:09 .shoot()
19:36:10 failed
19:36:11 .shoot()
19:36:11 failed
and the romlog (the clock on the camera is an hour off):
Code: [Select]
Exception!! Vector 0x0C
Occured Time  2011:05:14 18:37:07
Task ID: 36110410
Task name: PTPSessionTA0
Exc Registers:
0x55555555
0x03C651F8
0x00000040
0x00000080
0x55555555
0x010100DC
0x03C52638
0x00000080
0xFFFFFFFF
0x0000587C
0x0027F018
0x19980218
0x03B1F825
0x00334C8C
0x03B2C405
0x55555554
0x00000033
StackDump:
0x00000040
0x03C622D0
0x00000020
0x00000004
0x03C52638
0x03B2C493
0x03C651F8
0x00000021
0x00334F28
0x03C622A0
0x00018005
0x00000001
0x03B31557
0x7FFFFFFD
0x03B44FAC
0x00334D04
0x00334F28
0x00334F28
0x00334DAC
0x03B3158B
0x03B31609
0x00334DAC
0x00334F28
0x00334D04
0x03B31D2F
0x0000000B
0x003354F8
0x03B2D7F7
0x03B31C77
0x00000001
0x00000008
0x00000006
0x00334F28
0xFFFFFFFF
0xFFFFFFFF
0x003354F8
0x00334DAC
0x00334F28
0x0000011E
0x03B2D8B9
0x00334F28
0x03C622A0
0x00010281
0x00000001
0x03B314F3
0x0000000D
0x00334F28
0x03B31511
0x00334DAC
0x00334F28
0x003354F8
0x00334DAC
0x00334DAC
0x0000000A
0x03B2D3ED
0x03B31A67
0x003354F8
0x00000003
0x00334DAC
0x03B2D447
0x00000000
0x03C62150
0x03C52638
0x003354F8
0x003354F8
0x03C52638
0x003354F8
0x00334F28
0x03C65240
0x0000000A
0x03B2D4AD
0x03B2DAE1
0x0000000C
0x0000000B
0x00000105
0xFFFFFFFF
0xFFFFFFFF
0x003354F8
0x00334F28
0x03C65240
0x03B2DF17
0x00000003
0x00000001
0x003354F8
0x00000001
0x00334F28
0x00000003
0x03B2E075
0x00334E20
0xFFFFFFFF
0x0001000A
0x003354F8
0x00000001
0x00000002
0x03B2DBE5
0x003354F8
0x00334F28
0x03B2DC59
0x003354F8
0x00334F28
0x03B2DCA1
0x00334E78
0xFFFFFFFF
0x0000000A
0x003354F8
0x0000000C
0x03B2DCD1
0x003354F8
0x00334F28
0x03B2DCED
0x00000001
0xFFFFFFFF
0x003354F8
0x00000001
0x00000002
0x00000003
0x03B2DBBB
0x003354F8
0x00000000
0x03B2DC59
0x003354F8
0x00334F28
0x03B2DCA1
0x00334E9C
0xFFFFFFFF
0x03000008
0x00334F28
0x003354F8
00276290: UI:_EntryPre_PrepareShoot

00276290: UI:ShootState:0x5

00276290: UI:_EntryPrepareShoot

00276290: UI:ShootState:0x7

00276290: UI:ShootState:0x8

00276290: UI:ShootState:0x9

00276290: UI:ShtCon_ContiShootPicture

00276290: UI:ChangePopupStrobe:Close

00276300: UI:Button:0x000009A4:UnpressSwTwo

00276300: UI:Button:0x000009A2:UnpressSwOne

00276300: SS:PopChg

00276300: UI:DSIC:14,0

00276300: UI:_MuteOn

00276300: UI:DSIC:43,0

00276300: UI:DispSwCon_MuteOnPhysicalScreen

00276300: UI:MuteOnPhysicalScreen

00276300: SS:Shoot

00276310: UI:DSIC:63,0

00276310: UI:ScreenLock

00276320: SS: Raw[1]

00276320: SS: Raw[1]

00276320: UI:ScreenUnLock

00276330: UI:ScreenLock

00276330: UI:Reduce ScreenUnLock

00276340: UI:Sht_CancelStrobeChargeTimer

00276340: UI:DSIC:4c,0

00276340: UI:_CaptureStanbyForReview

00276340: UI:DisplayPhysicalScreenCBR

00276340: UI:Re ScreenUnLock

00276340: UI:ScreenUnLock

00276340: UI:ShootSeqToUI:0x2029:adr:0x64f8,Para:25848

00276350: UI:comp

00276350: SS:NextAvail(7),ReviewAvail(5)

00276350: UI:DisplayPhysicalScreenCBR

00276450: UI:ShootSeqToUI:0x2022:adr:0,Para:0

00276450: UI:DSIC:64,0

00276660: UI:DSIC:48,0

00277080: UI:DSIC:45,0

00277080: UI:DispSwCon_MuteOffPhysicalScreen

00277080: UI:MuteOffPhysicalScreen

00277770: UI:ShootSeqToUI:0x2008:adr:0x64f9,Para:25849

00277770: UI:_MuteOff

00277770: UI:DSIC:44,0

00277770: UI:ScreenLock

00277770: UI:ScreenUnLock

00277770: UI:ShootState:0xA

00277770: UI:ShtCon_StartReview

00277770: UI:ShootState:0xC

00277770: SS:ExitShoot

00277780: UI:_EntryPrepareRecreviewOff

00277780: UI:ShootState:0xB

00277780: UI:ShtCon_StopReview

00277780: UI:_fReservExitConti

00277780: UI:DisplayPhysicalScreenCBR

00277900: UI:DSIC:47,0

00277900: UI:ShootSeqToUI:0x2007:adr:0x64f9,Para:25849

00277910: UI:ShootSeqToUI:0x2001:adr:0,Para:0

00277910: UI:Sht_CancelStrobeChargeTimer

00277910: UI:DSIC:4c,0

00277910: UI:_CaptureStanbyForReview

00277910: UI:DSIC:46,0

00277920: UI:ShootSeqToUI:0x201e:adr:0x64f9,Para:25849

00277920: UI:_ExitContiSequence

00277920: SS:StopContiShoot

00277920: UI:ShootSeqToUI:0x2018:adr:0xfffffffb,Para:-5

00277920: UI:ShootSeqToUI:0x2001:adr:0,Para:0

00277920: UI:Sht_CancelStrobeChargeTimer

00277920: UI:DSIC:4c,0

00277930: UI:Sht_CancelStrobeChargeTimer

00277930: UI:DSIC:4c,0

00277930: UI:_CaptureStanbyForReview

00277930: UI:ShootSeqToUI:0x2029:adr:0x64f9,Para:25849

00277930: UI:_ExitSequence

00277930: UI:Sht_CancelStrobeChargeTimer

00277930: UI:DSIC:4c,0

00277940: SS:StopFcsChk

00277940: SS:CancelPre

00277940: SS:NextAvail(7),ReviewAvail(5)

00278010: UI:ScreenLock

00278010: UI:ScreenUnLock

What is the next step in fixing this? What experiments can I try that will give us the info needed to move forward?
« Last Edit: 15 / May / 2011, 01:28:08 by John1234 »

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal