ABP Electronics Posted July 5, 2015 Report Share Posted July 5, 2015 Hello midiBoxers :smile:, I posted this problem on "MidiBox NG Release + Feedback" topic...but no reply. So, here it is again... I've been testing this firmware for many weeks. I does work but is not very stable and there are some problems as well...which maybe only happen to me :smile: First issue: Here is a part of my code: EVENT_BUTTON id= 1004 button_mode=OnOnly fwd_id=LED:1004 range=1:1 radio_group=3 lcd_pos=1:21:1 type=meta meta=setSnapshot meta=LoadSnapshot meta=DumpSnapshot label="REGISTRATION: %S " EVENT_BUTTON id= 1005 button_mode=OnOnly fwd_id=LED:1005 range=2:2 radio_group=3 lcd_pos=1:21:1 type=meta meta=setSnapshot meta=LoadSnapshot meta=DumpSnapshot label="REGISTRATION: %S " EVENT_BUTTON id= 1006 button_mode=OnOnly fwd_id=LED:1006 range=3:3 radio_group=3 lcd_pos=1:21:1 type=meta meta=setSnapshot meta=LoadSnapshot meta=DumpSnapshot label="REGISTRATION: %S " EVENT_BUTTON id= 1007 button_mode=OnOnly fwd_id=LED:1007 range=4:4 radio_group=3 lcd_pos=1:21:1 type=meta meta=setSnapshot meta=LoadSnapshot meta=DumpSnapshot label="REGISTRATION: %S " EVENT_BUTTON id= 1008 button_mode=OnOnly type=meta meta=DumpSnapshot meta=SaveSnapshot If I press these buttons very quickly for example changing between 1004 and 1005 then very often I can see on the MIOS Studio: [42560.531] [MBNG_FILE_S] loading snapshot #2 from /DEFAULT.NGS [42561.063] [MBNG_FILE_S] loading snapshot #2 from /DEFAULT.NGS [42561.309] [MBNG_FILE_S] loading snapshot #2 from /DEFAULT.NGS [42561.573] [MBNG_FILE_S] loading snapshot #2 from /DEFAULT.NGS [42561.630] [FILE] FAILURE: tried to open file '/DEFAULT.NGS' for reading, but previous file hasn't been closed! [42561.644] [FILE] FAILURE: tried to open file '/DEFAULT.NGS' for reading, but previous file hasn't been closed! [42561.873] [MBNG_FILE_S] loading snapshot #2 from /DEFAULT.NGS And also - This is really frustrating: [42707.287] [MBNG_FILE_S] loading snapshot #3 from /DEFAULT.NGS [42707.314] [MBNG_FILE_S] loading snapshot #3 from /DEFAULT.NGS [42707.346] [MBNG_FILE_S] loading snapshot #1 from /DEFAULT.NGS [42707.380] [MBNG_FILE_S] loading snapshot #3 from /DEFAULT.NGS [42707.417] [MBNG_FILE_L] ERROR: failed while reading label ON_OFF in .BIN file [42707.418] [MBNG_FILE_L] ERROR: failed while reading label ON_OFF in .BIN file [42707.420] [MBNG_FILE_L] ERROR: failed while reading label ON_OFF in .BIN file [42707.422] [MBNG_FILE_L] ERROR: failed while reading label ON_OFF in .BIN file [42707.425] [MBNG_FILE_L] ERROR: failed while reading label P_SL_FA in .BIN file [42707.427] [MBNG_FILE_L] ERROR: failed while reading label P_SO_NO in .BIN file [42707.429] [MBNG_FILE_L] ERROR: failed while reading label P_2_3 in .BIN file [42707.444] [MBNG_FILE_L] ERROR: failed while reading label ON_OFF in .BIN file With above situation - all Conditional labels go "bananas" - I need to reset the whole NG box. My NGL file is not very small - I have more than 260 conditional labels - file size is 8259 bytes. Second issue - also related to Meta Events. I can see that when Meta even is executed it "refreshes" all events and their labels as well. Problem is that I never know what label will be displayed on the screen - in case different labels use this same position of the screen. Example: EVENT_BUTTON id= 1058 fwd_id=LED:1058 button_mode=toggle type=CC cc=87 chn= 14 range= 0:127 offset= 0 ports=00001000000000000000 lcd_pos=1:21:2 label="PERCUSSION:^ON_OFF EVENT_BUTTON id= 1059 fwd_id=LED:1059 button_mode=toggle type=CC cc=88 chn= 14 range= 0:1 offset= 0 ports=00001000000000000000 lcd_pos=1:21:2 label="PERCUSSION DEC.:^P_SL_FA" EVENT_BUTTON id= 1060 fwd_id=LED:1060 button_mode=toggle type=CC cc=89 chn= 14 range= 0:1 offset= 0 ports=00001000000000000000 lcd_pos=1:21:2 label="PERCUSSION LEV:^P_SO_NO" EVENT_BUTTON id= 1061 fwd_id=LED:1061 button_mode=toggle type=CC cc=95 chn= 14 range= 0:1 offset= 0 ports=00001000000000000000 lcd_pos=1:21:2 label="PERCUSSION TYPE: ^P_2_3" If I execute: EVENT_BUTTON id= 1004 button_mode=OnOnly fwd_id=LED:1004 range=1:1 radio_group=3 lcd_pos=1:21:1 type=meta meta=setSnapshot meta=LoadSnapshot meta=DumpSnapshot label="REGISTRATION: %S " then any of the above Labels can appear on the screen - completely random. This same rule applies to AINSER and ENC events. Am I missing something again? Regards, Bartosz Quote Link to comment Share on other sites More sharing options...
TK. Posted July 5, 2015 Report Share Posted July 5, 2015 I need your configuration files to reproduce this. However, as you may have noticed, I'm currently too busy with other things and therefore can only help on issues which are easy to clarify. This looks like a complicated issue where even firmware changes might be required; I fear that I can't look into this the next two weeks... :-/ The configuration files will be helpful anyhow... Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
ABP Electronics Posted July 5, 2015 Author Report Share Posted July 5, 2015 (edited) OK, I understand, Hers are the configuration files: There is workaround applied in NGR file which adds 300 ms delay between "LoadSnapshot" and "DumpSnapshot". With some experiments I have found that it takes around 270 ms to load the snapshot after button is pressed. It helps..but every time my ngc is growing - I need to make this delay bigger... :( Regards, Bartosz Midibox.rar Edited July 5, 2015 by ABP Electronics Quote Link to comment Share on other sites More sharing options...
TK. Posted July 19, 2015 Report Share Posted July 19, 2015 Today I spent some time to analyse this issue. Unfortunately I wasn't able to reproduce it at my side (are you using a MBHP_CORE_STM32F4, or MBHP_CORE_LPC17 module?) However, I found a potential with the Snapshot Meta event: it didn't use a Mutex while accessing the SD Card, with the danger that any other task could try to access it concurrently. This would result into the error message that you mentioned. Please try this version: http://www.ucapps.de/mios32/midibox_ng_v1_033_pre8.zip For the second issue I changed the Snapshot Dump, so that LCD output will be inhibited during dump, which should result into a more deterministic behaviour Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
ABP Electronics Posted July 20, 2015 Author Report Share Posted July 20, 2015 Hi Thorsten, Thanks for that. I am using STM32F4. Above problem is hard to reproduce, and impossible to reproduce with files which I sent you. There is a 300 ms delay added in the NGR file before meta=DumpSnapshot. With sequence Set, Load, Dump in 1 line of NGC script - it was very easy to reproduce. Anyway - I will test new version this week.. Regards, Bartosz Quote Link to comment Share on other sites More sharing options...
TK. Posted July 25, 2015 Report Share Posted July 25, 2015 Hi Bartosz, do you still notice the issue? If not, I will push the release button. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
ABP Electronics Posted July 28, 2015 Author Report Share Posted July 28, 2015 Hi Thorsten, I have done some test with this newest firmware. Problems which I mentioned seems to be fixed.... however my test were not as intensive as before due to limited time. There are 2 other problems which I have now. 1st - very difficult to replicate...it happens once for every few hours of using NG firmware. With scan_optimised=1 I had stuck notes twice.....scan doesn't recognize key release - and it doesn't send midi note OFF message. To eliminate possibility of faulty keybed I tried two different Fatar keybeds. I managed to cause this problem with both of them. But as I said - This problem is very difficult to repeat....sometimes I need to hit the keys for 20 minutes to make it happen. It doesn't happen with scan_optimised=0. 2nd problem: Label="Snapshot:%S%3d" For snapshot number 1 I would expect message: Snapshot: 1 It prints : Snapshot:111 I also have a wishlist....but you don't like too many request on 1 shot... so I will post it later. Regards, Bartosz Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.