PeterBLITZ / m2tklib

Automatically exported from code.google.com/p/m2tklib
0 stars 0 forks source link

Crash/hang on menu with just one selectable entry #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Configure this menu:

M2_LABEL(_main_title,   "f1", "Title");
M2_ROOT(_main_dummy,    "f0", "Dummy",     &_dummy);
M2_LIST(_main_list) = { &_main_title, &_main_dummy };
M2_VLIST(_main, NULL, _main_list);

M2tk    m2(&_main, m2_es_arduino, m2_eh_4bs, m2_gh_glcd_ffs);

Then call:

m2_SetKey(M2_KEY_PREV);
m2_SetKey(M2_KEY_PREV);
m2_SetKey(M2_KEY_PREV);

This will crash/hang an Arduino.

Original issue reported on code.google.com by DrZip...@gmail.com on 11 Jul 2011 at 6:42

GoogleCodeExporter commented 8 years ago
good news: this can be reproduced in the SDL framework :-)
bad news: seems to be a bug :-(

Original comment by olikr...@gmail.com on 11 Jul 2011 at 8:59

GoogleCodeExporter commented 8 years ago

Original comment by olikr...@gmail.com on 11 Jul 2011 at 8:59

GoogleCodeExporter commented 8 years ago
crash was caused by a infinite recursion, which filled up the stack.
copy&paste error in m2usrprev.c --> fixed

Original comment by olikr...@gmail.com on 11 Jul 2011 at 9:49