Access Violation Error and then Flowcode crashes

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

Moderator: Benj

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

Postby go233 » Mon Jul 27, 2015 8:53 am

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 96 times
bug2.JPG
(82.75 KiB) Downloaded 1916 times
bug1.JPG
(194.29 KiB) Downloaded 1916 times
These users thanked the author go233 for the post:
Benj (Mon Jul 27, 2015 1:56 pm)
Rating: 5.26%
 

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

Re: Access Violation Error and then Flowcode crashes

Postby Benj » Mon Jul 27, 2015 10:20 am

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: 190 times
Been thanked: 140 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Postby petesmart » Mon Jul 27, 2015 1:13 pm

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
These users thanked the author petesmart for the post:
Benj (Mon Jul 27, 2015 1:56 pm)
Rating: 5.26%
 
sorry about that Chief!

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

Re: Access Violation Error and then Flowcode crashes

Postby Benj » Mon Jul 27, 2015 1:57 pm

I've created a bug report on this so hopefully we will be able to investigate this issue as soon as possible.
These users thanked the author Benj for the post:
petesmart (Mon Jul 27, 2015 9:15 pm)
Rating: 5.26%
 

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

Postby go233 » Mon Jul 27, 2015 5:43 pm

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

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

Re: Access Violation Error and then Flowcode crashes

Postby Benj » Tue Jul 28, 2015 11:58 am

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.
These users thanked the author Benj for the post:
petesmart (Tue Jul 28, 2015 2:03 pm)
Rating: 5.26%
 

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

Re: Access Violation Error and then Flowcode crashes

Postby petesmart » Tue Jul 28, 2015 2:08 pm

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: 14361
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4443 times
Been thanked: 4143 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Postby Benj » Tue Jul 28, 2015 5:17 pm

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.
These users thanked the author Benj for the post (total 3):
petesmart (Tue Jul 28, 2015 9:43 pm) • medelec35 (Wed Jul 29, 2015 8:48 am) • Brendan (Thu Aug 27, 2015 2:02 pm)
Rating: 15.79%
 

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

Postby go233 » Tue Jul 28, 2015 5:52 pm

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

Postby go233 » Wed Jul 29, 2015 8:21 am

Yes, it works.
If I add 200 ms delay flowcode does not crashes.
Giovanni
These users thanked the author go233 for the post (total 3):
LeighM (Wed Jul 29, 2015 8:29 am) • medelec35 (Wed Jul 29, 2015 8:47 am) • Benj (Wed Jul 29, 2015 9:44 am)
Rating: 15.79%
 

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

Re: Access Violation Error and then Flowcode crashes

Postby petesmart » Fri Jul 31, 2015 10:32 am

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
These users thanked the author petesmart for the post (total 2):
LeighM (Fri Jul 31, 2015 11:49 am) • Benj (Tue Aug 04, 2015 10:40 am)
Rating: 10.53%
 
sorry about that Chief!

Brendan
Posts: 214
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 132 times
Been thanked: 112 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Postby Brendan » Thu Aug 27, 2015 2:08 pm

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: 14361
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4443 times
Been thanked: 4143 times
Contact:

Re: Access Violation Error and then Flowcode crashes

Postby Benj » Thu Aug 27, 2015 2:52 pm

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.