Tragic Lantern for EOS M

Started by coutts, April 17, 2013, 01:43:28 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

gary2013

My stack overflows are not that often. Maybe 3% of the time, just guessing. It is a sentence in red text at the top of the display that stays on until I reboot. I am still able to use the camera with it displayed. I don't think I can reproduce it, but I will try and get a log to submit if possible next time it happens.

jerrykil

Unfortunately, DM Logging doesnt seem to be working for me when i do this. I'll try a couple more times

EDIT:
So here is what is causing my stack overflow in step by step


  • Clean install of the latest and greatest build ( 62cb47a )
    cleared all settings, ExpSim is on movie mode, camera is set to JPG-L, and continuous shooting in Photo mode and AF.
    I enable mlv_rec and nothing else
    i turn on dm log.
    i hit menu to start recording>"Continuous OK"
    i do a half-press to focus>BOOM it stops everything, clears the buffer indicators, and, sometimes, i get red letters saying "[44]: <<blank spaces>> stack overflow: free=0 used=544497930", unfortunately half of the error msg is hidden under some jank
    no DM log :(
    pull battery, restart, ML knows it made a no-no so it doesn't load modules

a1ex

When you get the stack overflow, ML should save a log file (no need to use other tools). If it doesn't, just print the complete message from the screen (including task name).

edit: took a closer look at the code and this part doesn't save a log file. Just get the task name from the error message:


            "[%d] %s: stack %s: free=%d used=%d ",
            id, task_name,


so the %s part is the one I'm looking for.

jerrykil

Quote from: a1ex on December 10, 2013, 09:42:28 PM
When you get the stack overflow, ML should save a log file (no need to use other tools). If it doesn't, just print the complete message from the screen (including task name).

edit: took a closer look at the code and this part doesn't save a log file. Just get the task name from the error message:


            "[%d] %s: stack %s: free=%d used=%d ",
            id, task_name,


so the %s part is the one I'm looking for.
its actually blanked out. maybe its a LV drawing function covering it? i can't get DM to put anything out either (posted above)

a1ex

Another trick: grab a screenshot from the task list from Debug menu, then lookup the task ID there.

jerrykil

cool trick! its still task 44 and that is TestGero (checked in the same boot cycle, even though it oesn't seem to change after reboot)

a1ex

That's a Canon task. This doesn't say much about where the bug is:
- it can be a Canon bug (remember that raw is a debug flag in their code, so it probably didn't get as much test coverage as the stuff that got enabled in the final version)
- or it can be a ML bug (since both run in the same memory space, it's easy for one task to write over the other's data structures)

So, a user-level program can access the entire RAM (you probably already know this). It's a double-edged sword: it makes it very easy for ML to boot and patch things around, but combine this with a poor design decision from Canon regarding persistent settings and you'll understand why this kind of error is very dangerous and should be fixed asap.

Of course, the probability of something going wrong is very low. Some of my neighbours used a WW2 projectile for 10 years as anvil and they are still alive :D

Back to our topic: if you enable some raw histograms in photo mode (say raw zebras), and autofocus, can you trigger the problem?

Another test: in boot-hack.c, my_big_init_task, do just this:

static void my_big_init_task()
{
    call("lv_save_raw", 1);
}


and in gui.c, comment out the TASK_OVERRIDE line (at the end).

With this change, you will have no user tasks running, just plain Canon firmware in RAW LV mode. If you are still getting the error, it's a Canon bug (but we still have to find some workaround).

jerrykil

Quote from: a1ex on December 10, 2013, 10:49:30 PM
Back to our topic: if you enable some raw histograms in photo mode (say raw zebras), and autofocus, can you trigger the problem?


i'm back! so i tried some stuff u suggested. The zebras are on, and they work w/o a problem. could it be because zebras disappear on half-press? i'm not sure how that functionality is managed...
Histogram was already on and I also tried Magic Zoom and Focus Peaking. Everything seems to work fine on Half-press.

Quote from: a1ex on December 10, 2013, 10:49:30 PM
Another test: in boot-hack.c, my_big_init_task, do just this:

static void my_big_init_task()
{
    call("lv_save_raw", 1);
}


and in gui.c, comment out the TASK_OVERRIDE line (at the end).

With this change, you will have no user tasks running, just plain Canon firmware in RAW LV mode. If you are still getting the error, it's a Canon bug (but we still have to find some workaround).
everything compiles fine but ML doesnt seem to boot. I get a consistent orange light and no ML menu :(

thx for your time!
am i the only one experiencing this? i didn't test this before but this happens in video mode w/ crop mode off, also. same task crashed
EDIT: yeah raw looks best in crop but i can't get a decent frame most of the time

a1ex

Hm... uncomment CONFIG_HELLO_WORLD in config-defines.h and start tweaking from there.

I'm talking about *raw* overlays. Zebras are YUV by default, MZ is only YUV. Also, can you reproduce the same bug with raw_rec?

jerrykil

Quote from: a1ex on December 11, 2013, 06:46:43 AM
Hm... uncomment CONFIG_HELLO_WORLD in config-defines.h and start tweaking from there.

I'm talking about *raw* overlays. Zebras are YUV by default, MZ is only YUV. Also, can you reproduce the same bug with raw_rec?
raw_rec.mo also crashes.
zebras don't like JPG-L mode (they require Raw shooting mode to be on), but when raw_rec is enabled in JPG-L mode they work fine on half-press so long as recording has not yet started. once recording starts, they work until half-press.

enabling config_hello_world and the gui.c & boot-hack.c modifications yielded a bin that never did greet the world :(

thx again!

a1ex

Yes, zebras are raw only when you shoot raw (photo or video).

If it happens in recording, but not in standby, I think we narrowed it down to raw_rec/mlv_rec. You can try a simple test: disable the vsync hook in raw_rec (comment out MODULE_CBR(CBR_VSYNC, raw_rec_vsync_cbr, 0)) and - of course - it will not record anything, but will do some preparations.

gary2013

thanx Jerry for this new link location. Will you be posting the daily M builds again? bot fly looks to be down again.

jerrykil

gary, definitely will be. I'm hanging on to this host because they've been really good, but if it doesn't get fixed, i'll have to move to a new host. in the mean time i'll post my builds on google drive for you guys. there haven't been many commits lately because of holidays, so you're not missing any updates.

meditant

Hello,

I whant to download the nightly build and i obtain this ?

http://tl.bot-fly.com is out !

"tl.bot-fly.com will be down while hosting figures stuff out. ETA is before 2014."

Thanks for your great work !

Best regards

gary2013

Quote from: meditant on December 12, 2013, 09:47:52 AM
Hello,

I whant to download the nightly build and i obtain this ?

http://tl.bot-fly.com is out !

"tl.bot-fly.com will be down while hosting figures stuff out. ETA is before 2014."

Thanks for your great work !

Best regards
here is the last download from Dec 8 for the EOS-M camera that I got from bot fly when it was active. I am not respionsible for any problems you might have. I am only sending what I got from there. I have no problems using it, though.
https://www.transferbigfiles.com/6d245837-f25d-409a-9d74-381dcebe83e8/ieb-PVTNSDaXb4aPpfj_wg2

meditant


gary2013

1% (and all devs),
It would be really nice to get TL or ML working on the Olympus OM-D E-M5. This camera has the fastest AF and a built in 5 axis image stabilization meaning we can use and lens without IS for MFT (or adapter) and get fantastic steady cam looking movies. It has three levels of IS to choose from. plus off Plus, we could use the Speedbooster on this camera to get one or two more F stops plus a wider angle. That could possibly mean the 2x crop factor would be back to full frame or close to it from what I have been reading. There are many other great features, but the biggest problems are the codec being around only 26mb/s.  Not sure exactly on that number. So, it could use a better way to improve that and also shoot raw if possible. The other big problem is only an on camera stereo mic with no mic input for L/R and no headphone jack output.

I am starting to see more people get this camera and many are also looking closer at it like I have also been doing now since last July. I feel I/we have probably peaked on the M camera. I know Max went for the BMPC just aweek or so ago. Is there any reason why ML has only been on Canon all this time? Has any dev ever considered hacking other cameras such as this Olympus? The BMPCC would also be a good project to hack since they did not even add audio meters anywhere. Plus time remaining, disk format and file delete. Plus more, I'm sure. Like waveform, vector, parade, histogram.

Gary

AnotherDave

Quote from: gary2013 on December 12, 2013, 12:28:28 PM
here is the last download from Dec 8 for the EOS-M camera that I got from bot fly when it was active. I am not respionsible for any problems you might have. I am only sending what I got from there. I have no problems using it, though.
https://www.transferbigfiles.com/6d245837-f25d-409a-9d74-381dcebe83e8/ieb-PVTNSDaXb4aPpfj_wg2

This download link is no longer available...  says it has been deleted from the servers.  Anyone else got it?

dmilligan

Quote from: gary2013 on December 13, 2013, 04:58:48 AM
1% (and all devs),
It would be really nice to get TL or ML working on the Olympus OM-D E-M5.

LOL, It would be really nice to get 'SomeWindowsProgram.exe' to run natively on the iPad.

You are basically asking the devs to abandon ML and start an entirely new hack. You would have to redo everything from the ground up. IDK if anybody even knows what kind of CPU that camera has, or how to  hack it (i.e. how to get your own arbitrary code onto it and executing). It's hard enough to port ML to a new version of the firmware for the same exact camera. Everything ML does depends on very specific routines in the Canon firmware, and very specific values for various hardware registers. None of that would be the same. You'd have to throw out 100% of the code.

feureau

Quote from: AnotherDave on December 13, 2013, 03:43:11 PM
This download link is no longer available...  says it has been deleted from the servers.  Anyone else got it?

I got one from Dec 5. https://www.dropbox.com/s/aghzahauuihhdss/tragiclantern-Tragic.2013Dec05.EOSM202.zip

I don't know how much difference with the dec 9 version, but it should work fine for the time being.

gary2013

Quote from: dmilligan on December 13, 2013, 06:28:58 PM
LOL, It would be really nice to get 'SomeWindowsProgram.exe' to run natively on the iPad.

You are basically asking the devs to abandon ML and start an entirely new hack. You would have to redo everything from the ground up. IDK if anybody even knows what kind of CPU that camera has, or how to  hack it (i.e. how to get your own arbitrary code onto it and executing). It's hard enough to port ML to a new version of the firmware for the same exact camera. Everything ML does depends on very specific routines in the Canon firmware, and very specific values for various hardware registers. None of that would be the same. You'd have to throw out 100% of the code.
I understand. Then maybe some ML dev can then maybe make a Canon have five axis image stabilization in the body (then all lenses will have IS) and the have super fast auto focus like the Olympus. LOL I know, won't happen.

I am not asking for anyone to abandon anything. You never know unless you ask, or if you try. Maybe someone out there  would want to try. You never know. There are devs out there that maybe are not working on ML and would like to be the new heroes in the world of cameras. Many people and businesses get to a point and decide they want to branch out. Nothing wrong with that at all. Some people a long time ago decided they wanted to branch out and they were told the world is flat and they would fall off. They decided to branch out anyways and they found the world was round and there was other land to be found. It might take someone maybe 5 minutes or less to find out about these other cameras and then know what is possible and what not. There is no reason for anyone that only owns Canon cameras and ML to get worried that they might lose their current devs. It is up to them (people that have dev skills) to decide since no one is being paid and there is no ML business being all volunteer. I have heard a few times there are maybe only five devs that are currently here.  :)
Edit- another great candidate for hacking is BMPCC and BMCC. Boy, they sure need some help.

gary2013

Quote from: feureau on December 13, 2013, 09:16:46 PM
I got one from Dec 5. https://www.dropbox.com/s/aghzahauuihhdss/tragiclantern-Tragic.2013Dec05.EOSM202.zip

I don't know how much difference with the dec 9 version, but it should work fine for the time being.
I don't think they have changed much recently. I have not seen any diff just being a user. My uplink only lasted a few days before. I could put it up again if someone wants it.

gary2013

I was wondering why the word Tragic came up. Why it was thought of and considered that eventually became the name. It's just a thought and I mean no harm to anyone over it.

a1ex

The word was chosen by 1% more than one year ago.

After struggling to merge TL code a few times, I've noticed it diverged a lot from the Magic Lantern tree, it doesn't follow some coding practices that I consider essential (especially this one: when something doesn't work, the error message simply gets disabled instead of fixing the problem), a lot of my advice was ignored, so I've decided to fix it the hard way: this line of development can no longer be called Magic Lantern.

My opinion is also shared by some other ML developers, but they just didn't want to tell it in public. I'd rather have it solved than hiding behind a finger.

The good news is that @jordancolburn already updated ML to 2.0.2 ( https://bitbucket.org/hudson/magic-lantern/pull-request/303/updated-eosm-to-run-on-firmware-v-202/diff ), and if all goes well, we may have official nightly builds for the EOS M soon.

gary2013

Thank you Alex. I understand completely and everyone enjoys good news.  :) Can the nightly builds also be compiled and zipped like Jerry was doing at bot fly before since I have no dev skills for compiling.

Gary