Page 1 of 1

Access Violation Error and then Flowcode crashes

Posted: Mon Jul 27, 2015 8:53 am
by go233
Hi, I get "Access Violation Error" and flowcode stops working.
It is a simple set up with the red potentiometer and the MIAC.
I turn the pot from zero to 5V then I go over (I don't tun down to 0) and the flowcode crashes.
Could you helm me, please?
Thanks
Giovanni

Re: Access Violation Error and then Flowcode crashes

Posted: Mon Jul 27, 2015 10:20 am
by Benj
Hello Giovanni,

Is this problem repeatable e.g. does it crash every time you do this?

Re: Access Violation Error and then Flowcode crashes

Posted: Mon Jul 27, 2015 1:13 pm
by petesmart
Hi Ben,

I have exactly the same issue with MIAC...

It is repeatable and it occurs about 5 -10 seconds after you go into simulation mode...

Initially it was working ok at the start of the development, then it seemed to get to a point where it falls over all the time...it could be a number of macros that tips it over the edge...

I am not doing anything special, just sensing inputs and timing/delays then switching outputs. I am running the display and getting values from the keypad..

You can programme and run the MIAC ok.. Flow kit also works ok..

I am traveling at the moment so I can't send you anything to demo the problem until Thursday...

Hope this assists

Best

Pete

Re: Access Violation Error and then Flowcode crashes

Posted: Mon Jul 27, 2015 1:57 pm
by Benj
I've created a bug report on this so hopefully we will be able to investigate this issue as soon as possible.

Re: Access Violation Error and then Flowcode crashes

Posted: Mon Jul 27, 2015 5:43 pm
by go233
Hi,
yes, it is repeatable.
It happens every time.
Giovanni

Re: Access Violation Error and then Flowcode crashes

Posted: Tue Jul 28, 2015 11:58 am
by Benj
Thanks.

We have narrowed the issue down to a single call and even found a quick workaround. However while we have a nice replicable problem we are looking to try and fix the source of the issue rather then hide it with a workaround.

If you want to add the workaround so you can continue then try adding a 2ms or larger delay after your cursor component macro call and hopefully that should allow the simulator to run more reliably.

Re: Access Violation Error and then Flowcode crashes

Posted: Tue Jul 28, 2015 2:08 pm
by petesmart
Thanks Ben,

I can confirm that I'm using quite a few cursor location macros... Will add the delay and see if it fixes the issue...

best

Pete

Re: Access Violation Error and then Flowcode crashes

Posted: Tue Jul 28, 2015 5:17 pm
by Benj
Hello,

We have now got much closer to the root cause of the problem, specifically the redraw API function which is triggered by property changes. The LCD cursor function is done via property changes.

Probably not going to be a quick fix but certainly a nice find.

For now the ms delay in the loop should help to solve the issue.

Re: Access Violation Error and then Flowcode crashes

Posted: Tue Jul 28, 2015 5:52 pm
by go233
Hi,thanks!
I'll test it tomorrow and I'll let you know.
Giovanni

Re: Access Violation Error and then Flowcode crashes

Posted: Wed Jul 29, 2015 8:21 am
by go233
Yes, it works.
If I add 200 ms delay flowcode does not crashes.
Giovanni

Re: Access Violation Error and then Flowcode crashes

Posted: Fri Jul 31, 2015 10:32 am
by petesmart
Hi Ben,

added 10ms post the cursor macro... seems to be very stable.... 2ms was not quite enough...

I have added the delay as a variable to the project so I can set it it to zero when i do the final compile to the MIAC

thanks for sorting this... much appreciated

best

Pete

Re: Access Violation Error and then Flowcode crashes

Posted: Thu Aug 27, 2015 2:08 pm
by Brendan
Thanks for addressing this issue Ben.

We do a great deal of simulations with deep processes, status indicators, display, debugger panel, etc, for development and debugging purposes.

With our latest projects, simulation delays of even 1s invariably cause Flowcode to crash after a period of free-running in the environment, so a very welcome fix indeed.

All the best,

Brendan

Re: Access Violation Error and then Flowcode crashes

Posted: Thu Aug 27, 2015 2:52 pm
by Benj
Hello Brendan,

I believe we have now bottomed the issue and it should be resolved completely in the next release.

Are you saying the workaround solves the problem for you or are you still experiencing crashes when you run the sim?

If you are still getting crashes every time you run the sim even with the delay then please can you attach or PM me your project file and I will do some more investigations here.