Access Violation Error and then Flowcode crashes

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Access Violation Error and then Flowcode crashes

Post 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
Attachments
symple ADC.fcfx
(5.39 KiB) Downloaded 239 times
bug2.JPG
(82.75 KiB) Downloaded 1916 times
bug1.JPG
(194.29 KiB) Downloaded 1916 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Post by Benj »

Hello Giovanni,

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

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Post 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
sorry about that Chief!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Post by Benj »

I've created a bug report on this so hopefully we will be able to investigate this issue as soon as possible.

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Post by go233 »

Hi,
yes, it is repeatable.
It happens every time.
Giovanni

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Post 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.

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Post 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
sorry about that Chief!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Post 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.

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Post by go233 »

Hi,thanks!
I'll test it tomorrow and I'll let you know.
Giovanni

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Post by go233 »

Yes, it works.
If I add 200 ms delay flowcode does not crashes.
Giovanni

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Post 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
sorry about that Chief!

Brendan
Posts: 243
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 140 times
Been thanked: 118 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Post 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.

Post Reply