Author Topic: Canon 1200D  (Read 354324 times)

nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1197
Re: Canon 1200D
« Reply #150 on: July 05, 2016, 04:08:13 PM »
Ok now you could blink your LED to see where the cam gets a problem. I suppose "hello world" is running on your cam and the cam is able to do the ROM dumps into ML\LOGS, right?

Check src\boot-hack.c:

You can copy led blink code "info_led_blink(1, 500, 500);" and place it further down in code for analyzing where in the init task your cam gets stuck. Hope that sheds some light into your issue. I would do it step by step. For e.g. it is a good idea to place it after

Code: [Select]
_find_ml_card();
_info_led_blink(1, 500, 500);

If that works then redo your change and retry after

Code: [Select]
_load_fonts();
_info_led_blink(1, 500, 500);

Redo above procedure moving down in code until the led doesn't blink any more and you found a sign for the root cause of your issue...

You probably either got one of the FIO stubs wrong if the camera doesn't do a ROM backup or maybe BFNT consts are wrong in platform dir etc etc etc or whatever  8)  ;D  8). Happy Hacking!

The led blink code will help you analyze your issue.
70D.112 & 100D.101

mathias

  • New to the forum
  • *
  • Posts: 29
Re: Canon 1200D
« Reply #151 on: July 06, 2016, 03:44:14 AM »
You gonna killme, but my sd card was not booteable (I thought that the fir file wich a1ex gave have setted sd card bootable), sorry my bad!

After all I enabled by code the console so I could see the same error from qemu in my cam

tcc invalid option -nostdlib

whats the problem with tcc???

nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 1197
Re: Canon 1200D
« Reply #152 on: July 06, 2016, 07:45:37 AM »
No clue what's wrong with your qemu repo or why you get the error you mentioned. Again in your case, I would try it on the cam and do it like described in my previous post with the LED blink code to find out where you get stuck.
Probably a1ex's fir only enabled cam's bootflag so move on and check http://pel.hu/eoscard/ and make your card bootable with EOSCARD again. Afterwards try it out on your cam and report back your results. Don't forget about the 8.3 "sym.file" naming like mentioned earlier, too.
70D.112 & 100D.101

gulwantgill

  • New to the forum
  • *
  • Posts: 8
Re: Canon 1200D
« Reply #153 on: July 11, 2016, 05:30:47 AM »
Hi guys i also have canon 1200d .So if i can help in any way please tell me.i urgently need magic lantern for my camera.  ;) ;)

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8339
Re: Canon 1200D
« Reply #154 on: July 11, 2016, 07:54:30 AM »
If there is no ML for your cam (which is the case right now): Act like there will be no ML for your cam ever.
ML project does not have timetables, milestones or any way to predict progress. It's a project done by highly skilled people in their spare time and sometimes there are priorities in things like work/family/health ...

If you do know C and assembler for embedded devices (preferable ARM architecture): Dig in.

gulwantgill

  • New to the forum
  • *
  • Posts: 8
Re: Canon 1200D
« Reply #155 on: July 11, 2016, 01:14:10 PM »
Ok so i have setup everything properly so can you tell me were are files so i don't have to start from scratch???? i am taking about ML for 1200d and i also have that camera.Please guide me...

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Canon 1200D
« Reply #156 on: July 19, 2016, 01:14:37 AM »
Looks like there are two firmware versions: 1.0.0 and 1.0.1. I wasn't able to find any code difference between them, other than version number and build date, so I think we can simply run the same ML build on both firmware versions.

The 1200D would be the first camera requiring this trick.


Please find:

1200HELO.FIR: Hello World
1200BOOT.FIR: Enables boot flag, so you can run your own autoexec.bin.

These two tools run on both firmware versions. You will also need the data files (in particular, fonts); just copy them from a nightly build.

I've also copied the latest source here: https://bitbucket.org/hudson/magic-lantern/branch/1200D

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 607

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Canon 1200D
« Reply #158 on: July 19, 2016, 01:58:35 AM »
Even better, let's stick to 1.0.1 then. Updated the source code.

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: Canon 1200D
« Reply #159 on: July 20, 2016, 04:14:51 PM »
Success!!! 1200D.101 confirmed loading on cam and Trashcan loaded ML menu fine!
500D/T1i  550D/T2i  600D/T3i  700D/T5i

Sergio de la Torre

  • New to the forum
  • *
  • Posts: 36
Re: Canon 1200D
« Reply #160 on: July 20, 2016, 05:43:52 PM »
Great news! Let me know if i can help with the progresses.
5Dc - 1200D - 20D - 350D InfraRed

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Canon 1200D
« Reply #161 on: July 20, 2016, 07:56:55 PM »
At this point, anyone with basic command-line skills can compile ML from source code and start tweaking it. Uncomment CONFIG_DUMPER_BOOTFLAG from features.h to get a bare-bones ML with menu enabled, then start adding actual features (see all-features.h).

See also the other platform-dependent files that might need fixes (internals.h, consts.h, gui.h and so on).

You can debug your code either by printing on the screen (printf, bmp_printf), and you can also test your autoexec.bin in QEMU (see the current limitations here).

Before committing your changes regarding new features, don't forget to check whether they are actually working ;)

Happy hacking.

bakersdozen

  • Freshman
  • **
  • Posts: 89
Re: Canon 1200D
« Reply #162 on: July 21, 2016, 01:13:54 AM »
Great news, I will be watching progress. Happy to help once available. Thanks for looking at this

Sent from my E6653 using Tapatalk

EOS M + 5D3

Sergio de la Torre

  • New to the forum
  • *
  • Posts: 36
Re: Canon 1200D
« Reply #163 on: July 21, 2016, 11:36:10 AM »
I had a look and it's more tricky than I thought. For the moment I can do nothing, because of the processor of my desktop PC that is an Intel Q6600 (No VT-X for VirtualBox)  :'( Now I'm waiting for a part for repairing my laptop (i5)
5Dc - 1200D - 20D - 350D InfraRed

gulwantgill

  • New to the forum
  • *
  • Posts: 8
Re: Canon 1200D
« Reply #164 on: July 21, 2016, 11:52:29 AM »
UPDATE 1200D ML :   8) 8) 8)

ML Overlays now can be seen in live view mode of both manual picture and video. :D :D :D



Problems :  :( :( :(

It is repeatedly crashing due to low malloc memory.Is there any way to increase malloc memory?



BUGS :    ??? ??? ???

When ever camera is turn of and turn on again , It fails to do so.(When i turn off the camera red light turns on and no matter i turn it off or on that red light dose not goes.)To make the camera functional again i have to restart the camera by pulling out the battery.

When ever camera is turn on and no button is pressed for 5 sec the error 70 comes up.If i press any button with in 5 sec of boot it dose not shows error 70.Everything opens and ml menu also works.

When camera is turn on and i press button to load ml menu , it lodes up with no problem.I can view all settings and close it successfully and i can do it every time i want to without failing.Same in live view.But when ever i change a function in ml menu and go back to live view without any problem.But ml menu dose not load after that.Pressing delete button nothing happens.So i have to take the battery out and pt it in to make it work again.

Keep in mind that we have lode very less modules and as the modules will increase there will be more bugs.

Please help us solving these problems. Thanks to mk11174 for helping me out

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Canon 1200D
« Reply #165 on: July 21, 2016, 01:23:56 PM »
Yep, looks like you need to use CONFIG_ALLOCATE_MEMORY_POOL, like on 1100D.

See also http://www.magiclantern.fm/forum/index.php?topic=5071.msg169044#msg169044 - there is a memory block that appears to be unused.

You need to test whether that memory is actually unused - see https://bitbucket.org/hudson/magic-lantern/commits/b3d5ba372dcbd9a30f6afaa8c1744b9ef1af8d84?at=unified for some test code you can use. With this test code enabled, try to use use and abuse the camera for a while (take burst pictures to fill the buffer, record movies, take pictures while recording movies, review pictures/movies, edit them in camera... whatever actions you could think for exercising most of Canon code). Make sure the test code works by checking some memory range that you know it is used.

Once you are sure that block of memory is unused, feel free to merge the RscMgr_memory branch into 1200D and enable that memory block as seen here: https://bitbucket.org/hudson/magic-lantern/pull-requests/731/rscmgr-memory-60d-todo-7d-maybe-also-50d/diff

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: Canon 1200D
« Reply #166 on: July 22, 2016, 04:14:59 AM »
Good News!  Got more memory enabling CONFIG_ALLOCATE_MEMORY_POOL.


But, did not stop crash when going into ML Menu, selecting something and then crash will happen when leaving ML menu and trying to come back.

Will not crash just going in and out of ML Menu or moving around it, you have to select an item, I only have Intervalometer in there for now and Free Memory checker, but thats it until I figure out the crash issue?

I also tried starting with limited tasks, by editing boot-hack.c
Code: [Select]
        // for debugging: uncomment this to start only some specific tasks
        // tip: use something like grep -nr TASK_CREATE ./ to find all task names
        #if 1
        if (
                //~ streq(task->name, "audio_meter_task") ||
                //~ streq(task->name, "audio_level_task") ||
                //~ streq(task->name, "bitrate_task") ||
                //~ streq(task->name, "cartridge_task") ||
                //~ streq(task->name, "cls_task") ||
                //~ streq(task->name, "console_task") ||
                streq(task->name, "debug_task") ||
                //~ streq(task->name, "dmspy_task") ||
                //~ streq(task->name, "focus_task") ||
                //~ streq(task->name, "focus_misc_task") ||
                //~ streq(task->name, "fps_task") ||
                //~ streq(task->name, "iso_adj_task") ||
                //~ streq(task->name, "joypress_task") ||
                //~ streq(task->name, "light_sensor_task") ||
                //~ streq(task->name, "livev_hiprio_task") ||
                //~ streq(task->name, "livev_loprio_task") ||
                streq(task->name, "menu_task") ||
                streq(task->name, "menu_redraw_task") ||
                //~ streq(task->name, "morse_task") ||
                //~ streq(task->name, "movtweak_task") ||
                //~ streq(task->name, "ms100_clock_task") ||
                //~ streq(task->name, "notifybox_task") ||
                //~ streq(task->name, "seconds_clock_task") ||
                //~ streq(task->name, "shoot_task") ||
                //~ streq(task->name, "tweak_task") ||
                //~ streq(task->name, "beep_task") ||
                //~ streq(task->name, "crash_log_task") ||
            0 )


Finally got some kind of debug report from QEMU
Code: [Select]
[DM] FROM Write Complete!!!
< Error Exception>
TYPE        : 4
ISR         : 0
TASK IDSR   : 50397259
TASK Name   : menu_task
R 0         : 0
R 1         : c47f8
R 2         : 10e200
R 3         : 0
R 4         : cc42e0
R 5         : 42100074
R 6         : cbaeb0
R 7         : c8209c
R 8         : 0
R 9         : cbaf50
R10         : 19980218
R11         : 19980218
R12         : 103b64
R13         : 1603c
R14         : ff2be274
PC          : ff2be274
CPSR        : 20000093

Code: [Select]
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[menu_redraw_task:ff126194 ] register_interrupt(null, 0x34, 0xff12602c, 0x1)
[menu_redraw_task:ff11ae48 ] (00:16) [RTC] !! RTC_REGISTER_XST_BIT ERROR !!

[menu_redraw_task:ff126194 ] register_interrupt(null, 0x34, 0xff12602c, 0x1)
[menu_redraw_task:ff11ae48 ] (00:16) [RTC] !! RTC_REGISTER_XST_BIT ERROR !!

[menu_redraw_task:ff126194 ] register_interrupt(null, 0x34, 0xff12602c, 0x1)
[menu_redraw_task:ff11ae48 ] (00:16) [RTC] !! RTC_REGISTER_XST_BIT ERROR !!

[menu_redraw_task:ff126194 ] register_interrupt(null, 0x34, 0xff12602c, 0x1)
[menu_redraw_task:ff11ae48 ] (00:16) [RTC] !! RTC_REGISTER_XST_BIT ERROR !!

[menu_redraw_task:ff126194 ] register_interrupt(null, 0x34, 0xff12602c, 0x1)
[menu_redraw_task:ff11ae48 ] (00:16) [RTC] !! RTC_REGISTER_XST_BIT ERROR !!

[menu_redraw_task:ff126194 ] register_interrupt(null, 0x34, 0xff12602c, 0x1)
[menu_redraw_task:ff11ae48 ] (00:16) [RTC] !! RTC_REGISTER_XST_BIT ERROR !!

[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[menu_redraw_task:ff126194 ] register_interrupt(null, 0x34, 0xff12602c, 0x1)
[menu_redraw_task:ff11ae48 ] (00:16) [RTC] !! RTC_REGISTER_XST_BIT ERROR !!

[menu_redraw_task:ff126194 ] register_interrupt(null, 0x34, 0xff12602c, 0x1)
[menu_redraw_task:ff11ae48 ] (00:16) [RTC] !! RTC_REGISTER_XST_BIT ERROR !!

[menu_redraw_task:ff126194 ] register_interrupt(null, 0x34, 0xff12602c, 0x1)
[menu_redraw_task:ff11ae48 ] (00:16) [RTC] !! RTC_REGISTER_XST_BIT ERROR !!

[menu_redraw_task:ff126194 ] register_interrupt(null, 0x34, 0xff12602c, 0x1)
[menu_redraw_task:ff11ae48 ] (00:16) [RTC] !! RTC_REGISTER_XST_BIT ERROR !!

[menu_redraw_task:ff126194 ] register_interrupt(null, 0x34, 0xff12602c, 0x1)
[menu_redraw_task:ff11ae48 ] (00:16) [RTC] !! RTC_REGISTER_XST_BIT ERROR !!

[menu_redraw_task:ff126194 ] register_interrupt(null, 0x34, 0xff12602c, 0x1)
[menu_redraw_task:ff11ae48 ] (00:16) [RTC] !! RTC_REGISTER_XST_BIT ERROR !!

[   INT-50h:ff125eb0 ] (00:01) [PM] DisablePowerSave (Counter = 3)
[   INT-50h:ff125f20 ] (00:01) [PM] EnablePowerSave (Counter = 2)
[   INT-36h:ff297934 ] mpu_recv( 06 05 06 04 01 00 )
[  MainCtrl:ff0ce43c ] (9c:01) ID:4(27)
[  MainCtrl:ff0cc05c ] (89:03) bindReceiveSwitch (4, 1)
[  MainCtrl:ff0d14b4 ] (85:03) GUI_Control:13 0x0
[   PropMgr:ff0d4740 ] (8d:02) emAutoPowerOffRequestChangeCBR (3)
[   PropMgr:ff10f9b0 ] mpu_send( 06 05 03 11 03 00 )
[   PropMgr:ff125eb0 ] (00:01) [PM] DisablePowerSave (Counter = 3)
[   PropMgr:ff125f20 ] (00:01) [PM] EnablePowerSave (Counter = 2)
[   INT-50h:ff125eb0 ] (00:01) [PM] DisablePowerSave (Counter = 3)
[   INT-50h:ff125f20 ] (00:01) [PM] EnablePowerSave (Counter = 2)
[ menu_task:ff0d14b4 ] (85:03) GUI_Control:-7 0x0
[GuiMainTask:ff403020 ] (04:02), refresh partly  x=120 y=30 w=720 h=480
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[    RscMgr:ff0d8ebc ] (80:02) srmEventDispatch: Current = 0, dwEventID = 0, dwParam = 15 S
[    RscMgr:ff183af0 ] (80:01) AllocateMEM3 15 80
[    RscMgr:ff17eb18 ] (80:01) ###### AllocateMemoryFromShootMemoryObject 10308
[    RscMgr:ff17ebf4 ] (80:01) ###### 0 0x84303C 0x84303C
[    RscMgr:ff17ebf4 ] (80:01) ###### 1 0x843044 0x842F44
[    RscMgr:ff17ec1c ] (80:01) ###### 1 pMemoryUnit 0x842F44 0x86A60
[    RscMgr:ff17ec78 ] (80:01) AllocatableSizeOfPackHeap 32505728, 16384, 16384
[    RscMgr:ff17eee0 ] (80:01) !!AllocateMemory 16384
[    RscMgr:ff17ee8c ] (80:01) AllocateMemoryFromShootMemoryObject 1 78675456 16384 0x000c47f8
[    RscMgr:ff17eea8 ] (80:01) ###### VirtualXXXFreeSize1 78675456 1866960
[    RscMgr:ff17f0f4 ] (80:01) ###### VirtualXXXFreeSize2 78659056 1866960
[    RscMgr:ff17f108 ] (80:01) ###### !! AllocateMemoryFromShootMemoryObject hMemSuite 0xC47F8
[    RscMgr:ff17f758 ] (80:01) ###### ShrinkMemoryToShootMemoryObject 0xC47F8 0x2844 0x4000
[    RscMgr:ff17f38c ] (80:01) VirtualAllocFreeMemory 0xC47F8 0x84303C 0x0
[    RscMgr:ff17f420 ] (80:01) ###### ChunkSize 16400
[    RscMgr:ff17f44c ] (80:01) ###### VIRTUAL_FREE pMemoryUnit->VirtualFreeSize[0] 32505728
[    RscMgr:ff17f478 ] (80:01) ######    +pMemoryObject->Virtual1stFreeSize 78675456
[    RscMgr:ff17f664 ] (80:01) ######    +pMemoryObject->Virtual2ndFreeSize 1866960
[    RscMgr:ff17f38c ] (80:01) VirtualAllocFreeMemory 0xC47F8 0x84303C 0x0
[    RscMgr:ff17f420 ] (80:01) ###### ChunkSize 16400
[    RscMgr:ff17f624 ] (80:01) ###### VIRTUAL_ALLOC pMemoryUnit->VirtualFreeSize[0] 32489328
[    RscMgr:ff17f650 ] (80:01) ######    -pMemoryObject->Virtual1stFreeSize 78659056
[    RscMgr:ff17f664 ] (80:01) ######    -pMemoryObject->Virtual2ndFreeSize 1866960
[    RscMgr:ff1841fc ] (80:01), OK AllocDev[2] C47F8 2844 50 1 4CCBAC0 4CCBAC0 4CCFAD0
[    RscMgr:ff0d90c4 ] (80:02) srmEventDispatch: Current = 0, dwEventID = 0, dwParam = 15 E
[ menu_task:ff126194 ] register_interrupt(null, 0x34, 0xff12602c, 0x1)
[ menu_task:ff11ae48 ] (00:16) [RTC] !! RTC_REGISTER_XST_BIT ERROR !!

[ menu_task:ff5b129c ] (23:01) sdWriteBlk: st=2784, num=1, buf=0x402c8000
[ menu_task:ff5b0f74 ] (23:01) sdDMAWriteBlk: st=2784, num=1
[ menu_task:ff5b129c ] (23:01) sdWriteBlk: st=100, num=1, buf=0x40298000
[ menu_task:ff5b0f74 ] (23:01) sdDMAWriteBlk: st=100, num=1
[ menu_task:ff5b129c ] (23:01) sdWriteBlk: st=162, num=1, buf=0x40298000
[ menu_task:ff5b0f74 ] (23:01) sdDMAWriteBlk: st=162, num=1
[ menu_task:ff5b129c ] (23:01) sdWriteBlk: st=512, num=1, buf=0x40211200
[ menu_task:ff5b0f74 ] (23:01) sdDMAWriteBlk: st=512, num=1
[ menu_task:ff5b129c ] (23:01) sdWriteBlk: st=100, num=1, buf=0x40298000
[ menu_task:ff5b0f74 ] (23:01) sdDMAWriteBlk: st=100, num=1
[ menu_task:ff5b129c ] (23:01) sdWriteBlk: st=162, num=1, buf=0x40298000
[ menu_task:ff5b0f74 ] (23:01) sdDMAWriteBlk: st=162, num=1
[ menu_task:ff5b129c ] (23:01) sdWriteBlk: st=2784, num=1, buf=0x402c8000
[ menu_task:ff5b0f74 ] (23:01) sdDMAWriteBlk: st=2784, num=1
[ menu_task:ff0c2364 ] (8b:06) ASSERT : 0\9F\E5, Task = menu_task
[ menu_task:ff0c2378 ] (8b:06) ASSERT : Line 0
[ menu_task:ff0c238c ] (8b:06) ASSERT : m_pfAllocMovPlayWorkCBR
[   PropMgr:ff0c2744 ] (8b:16) startupErrorRequestChangeCBR (0x1d)
[   PropMgr:ff0c2794 ] (8b:16) startupErrorRequestChangeCBR : ErrorSend (101, ABORT)
[   PropMgr:ff10f9b0 ] mpu_send( 08 06 03 03 65 01 00 )
[   PropMgr:ff125eb0 ] (00:01) [PM] DisablePowerSave (Counter = 3)
[   PropMgr:ff125f20 ] (00:01) [PM] EnablePowerSave (Counter = 2)
[   INT-50h:ff125eb0 ] (00:01) [PM] DisablePowerSave (Counter = 3)
[   INT-50h:ff125f20 ] (00:01) [PM] EnablePowerSave (Counter = 2)
[ menu_task:ff0c23f4 ] (8b:16), ASSERT : Time 2000/1/1 0:7:56
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[    DbgMgr:ff125eb0 ] (00:01) [PM] DisablePowerSave (Counter = 3)
(gdb)
500D/T1i  550D/T2i  600D/T3i  700D/T5i

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Canon 1200D
« Reply #167 on: July 22, 2016, 08:16:45 AM »
Looks like it might be crashing when saving the config file (which happens after you close the menu, but only if you select some item). It should help if you disable config saving (create a file named AUTOSAVE.NEG under ML/SETTINGS).

Then you could narrow down by trying some basic file I/O, e.g. from don't click me.

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: Canon 1200D
« Reply #168 on: July 22, 2016, 09:20:57 AM »
Ok, will try, at a stand still right now, all of a sudden its only loading to that first menu when I press delete, the Magic Lantern screen thats all black with text saying press any key to enter magic lantern.

Its alive and going back and forth between canon and that one, but its not going into the full menu for some reason, I re cloned repo from scratch, that didnt help, now, I am re compiling qemu, hopefully that fixes it, weird.
500D/T1i  550D/T2i  600D/T3i  700D/T5i

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: Canon 1200D
« Reply #169 on: July 22, 2016, 10:21:15 AM »
Well, I was able to get menu back, I guess one of the crashes screwed the mounted sd image cause the files would not unlock.

Anyways, I did as you said with the AUTOSAVE.NEG and it fixed the crash leaving the menu.

So, since you brought up saving the config file, I went right to Config menu and click Save Config now, and it crashed right away.
500D/T1i  550D/T2i  600D/T3i  700D/T5i

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: Canon 1200D
« Reply #170 on: July 23, 2016, 07:33:48 AM »
Tracked Save Config Now crash down to fio_free(msg) in config.c
here: and if I comment it out in these 2 places depending if I have a cfg file already on card, no crash when I use Save config now, but not sure where to look from there, gets a bit confusing????
Code: [Select]
int config_save_file(const char *filename)
{
    int count = 0;

    DebugMsg( DM_MAGIC, 3, "%s: saving to %s", __func__, filename );
   
    #define MAX_SIZE 10240
    char* msg = fio_malloc(MAX_SIZE);
    msg[0] = '\0';
 
    snprintf( msg, MAX_SIZE,
        "# Magic Lantern %s (%s)\n"
        "# Built on %s by %s\n",
        build_version,
        build_id,
        build_date,
        build_user
    );

    struct tm now;
    LoadCalendarFromRTC( &now );

    snprintf(msg + strlen(msg), MAX_SIZE - strlen(msg),
        "# Configuration saved on %04d/%02d/%02d %02d:%02d:%02d\n",
        now.tm_year + 1900,
        now.tm_mon + 1,
        now.tm_mday,
        now.tm_hour,
        now.tm_min,
        now.tm_sec
    );

    for(struct config_var *var = _config_vars_start; var < _config_vars_end ; var++ )
    {
        if (*(int*)var->value == var->default_value)
            continue;

        snprintf(msg + strlen(msg), MAX_SIZE - strlen(msg) - 1,
            "%s = %d\r\n",
            var->name,
            *(int*) var->value
        );

        count++;
    }
   
    FILE * file = FIO_CreateFile( filename );
    if(!file)
    {
        //fio_free(msg);
        return -1;
    }
   
    FIO_WriteFile(file, msg, strlen(msg));

    FIO_CloseFile( file );
   
   //fio_free(msg)
   
    return count;
}

I double checked all /** File I/O **/ stubs, and /** Memory allocation **/ stubs, all were fine.


UPDATE!!!!, that MAX_SIZE caught my eye, I figured since I am in QEMU, no big deal playing, I changed it to 1024, no more crash???????
500D/T1i  550D/T2i  600D/T3i  700D/T5i

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: Canon 1200D
« Reply #171 on: July 23, 2016, 11:54:37 AM »
Another Issue, most likely related to this crash, is when I go to view memory from config menu, it crashes, it will stay for a few seconds, but does crash and never finds any SRM, shoot contig, or shoot total. Maybe cause of the crash as I enter the Memory menu. In qemu I can use it for a bit, but I can see it crashing in the terminal. This is all replicated on the real camera as well.

Def some sort of memory issue, with or without Allocate_Memory_Pool, no features used except Free_Memory, everything to minimum.

Code: [Select]
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[ guess_mem:00c818f8 ] task_create(stack_try, prio=1e, stack=82800, entry=c813a4, arg=82800)
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[ guess_mem:00c818f8 ] task_create(stack_try, prio=1e, stack=82c00, entry=c813a4, arg=82c00)
[    RscMgr:ff0d8ebc ] (80:02) srmEventDispatch: Current = 0, dwEventID = 0, dwParam = 15 S
[    RscMgr:ff183af0 ] (80:01) AllocateMEM3 15 80
[    RscMgr:ff17eb18 ] (80:01) ###### AllocateMemoryFromShootMemoryObject 8388608
[    RscMgr:ff17ebf4 ] (80:01) ###### 0 0x84305C 0x84305C
[    RscMgr:ff17ebf4 ] (80:01) ###### 1 0x843064 0x842F64
[    RscMgr:ff17ec1c ] (80:01) ###### 1 pMemoryUnit 0x842F64 0x86A60
[    RscMgr:ff17ec78 ] (80:01) AllocatableSizeOfPackHeap 32505728, 16384, 8388608
[    RscMgr:ff17eee0 ] (80:01) !!AllocateMemory 8388608
[    RscMgr:ff17ee8c ] (80:01) AllocateMemoryFromShootMemoryObject 1 78675456 8388608 0x000c48e8
[    RscMgr:ff17eea8 ] (80:01) ###### VirtualXXXFreeSize1 78675456 1866960
[    RscMgr:ff17f0f4 ] (80:01) ###### VirtualXXXFreeSize2 70286832 1866960
[    RscMgr:ff17f108 ] (80:01) ###### !! AllocateMemoryFromShootMemoryObject hMemSuite 0xC48E8
[    RscMgr:ff17f758 ] (80:01) ###### ShrinkMemoryToShootMemoryObject 0xC48E8 0x800000 0x800000
[    RscMgr:ff1841fc ] (80:01), OK AllocDev[2] C48E8 800000 50 1 44CFAC0 44CFAC0 4CCFAD0
[    RscMgr:ff0d90c4 ] (80:02) srmEventDispatch: Current = 0, dwEventID = 0, dwParam = 15 E
[    RscMgr:ff0d8ebc ] (80:02) srmEventDispatch: Current = 0, dwEventID = 0, dwParam = 15 S
[    RscMgr:ff183af0 ] (80:01) AllocateMEM3 15 80
[    RscMgr:ff17eb18 ] (80:01) ###### AllocateMemoryFromShootMemoryObject 4194304
[    RscMgr:ff17ebf4 ] (80:01) ###### 0 0x84305C 0x842F64
[    RscMgr:ff17ec1c ] (80:01) ###### 0 pMemoryUnit 0x842F64 0x86A60
[    RscMgr:ff17ec78 ] (80:01) AllocatableSizeOfPackHeap 24117104, 16384, 4194304
[    RscMgr:ff17eee0 ] (80:01) !!AllocateMemory 4194304
[    RscMgr:ff17ee8c ] (80:01) AllocateMemoryFromShootMemoryObject 1 70286832 4194304 0x000c4948
[    RscMgr:ff17eea8 ] (80:01) ###### VirtualXXXFreeSize1 70286832 1866960
[    RscMgr:ff17f0f4 ] (80:01) ###### VirtualXXXFreeSize2 66092512 1866960
[    RscMgr:ff17f108 ] (80:01) ###### !! AllocateMemoryFromShootMemoryObject hMemSuite 0xC4948
[    RscMgr:ff17f758 ] (80:01) ###### ShrinkMemoryToShootMemoryObject 0xC4948 0x400000 0x400000
[    RscMgr:ff1841fc ] (80:01), OK AllocDev[2] C4948 400000 50 1 40CFAB0 40CFAB0 4CCFAD0
[    RscMgr:ff0d90c4 ] (80:02) srmEventDispatch: Current = 0, dwEventID = 0, dwParam = 15 E
[ guess_mem:ff0c1d60 ] (8b:16) ###exceptionhandlercbr 0x0 0
[ guess_mem:ff0c1e90 ] (8b:16) #####exceptionhandlercbr 0x0
[ guess_mem:ff0c1ea0 ] (8b:03) < Error Exception>

[ guess_mem:ff0c1eb4 ] (8b:03) TYPE        : 4

[ guess_mem:ff0c1ec8 ] (8b:03) ISR         : 0

[ guess_mem:ff0c1edc ] (8b:03) TASK IDSR   : 51445849

[ guess_mem:ff0c1ef0 ] (8b:03) TASK Name   : guess_mem

[ guess_mem:ff0c1f04 ] (8b:03) R 0         : c4948

[ guess_mem:ff0c1f18 ] (8b:03) R 1         : 400000

[ guess_mem:ff0c1f2c ] (8b:03) R 2         : c48e8

[ guess_mem:ff0c1f40 ] (8b:03) R 3         : 0

[ guess_mem:ff0c1f54 ] (8b:03) R 4         : 0

[ guess_mem:ff0c1f68 ] (8b:03) R 5         : cbe570

[ guess_mem:ff0c1f7c ] (8b:03) R 6         : 400000

[ guess_mem:ff0c1f90 ] (8b:03) R 7         : c8c944

[ guess_mem:ff0c1fa4 ] (8b:03) R 8         : 0

[ guess_mem:ff0c1fb8 ] (8b:03) R 9         : 19980218

[ guess_mem:ff0c1fcc ] (8b:03) R10         : 19980218

[ guess_mem:ff0c1fe0 ] (8b:03) R11         : 19980218

[ guess_mem:ff0c1ff4 ] (8b:03) R12         : 0

[ guess_mem:ff0c2008 ] (8b:03) R13         : 1603c

[ guess_mem:ff0c2244 ] (8b:03) R14         : 0

[ guess_mem:ff0c2258 ] (8b:03) PC          : 0

[ guess_mem:ff0c226c ] (8b:03) CPSR        : 20000093

[ guess_mem:ff0c22b0 ] (8b:16), Exception : Time 2000/1/1 0:0:31
[   CtrlSrv:ff44ff18 ] (83:02) DlgShootOlc.c LOCAL_DIALOG_REFRESH
[    DbgMgr:ff125eb0 ] (00:01) [PM] DisablePowerSave (Counter = 3)
500D/T1i  550D/T2i  600D/T3i  700D/T5i

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Canon 1200D
« Reply #172 on: July 23, 2016, 12:37:08 PM »
Indeed, looks like an issue with the RscMgr (exmem) memory routines, so it's probably worth double-checking those stubs.

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: Canon 1200D
« Reply #173 on: July 23, 2016, 12:46:13 PM »
Ok, worth a shot!
And thanks, as usual! lol
500D/T1i  550D/T2i  600D/T3i  700D/T5i

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: Canon 1200D
« Reply #174 on: July 23, 2016, 01:38:10 PM »


NSTUB(0xFF127ACC,  FreeMemoryResource)  WAS  NSTUB(0xFF127AAC,  FreeMemoryResource)
500D/T1i  550D/T2i  600D/T3i  700D/T5i