Servoy 8.2 stopEditing max loop counter exceeded on...

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Servoy 8.2 stopEditing max loop counter exceeded on...

Postby swingman » Mon Nov 06, 2017 12:37 pm

Hi all,

I'm trying to upgrade a Servoy 7.4.x system to 8.2.1 Smart Client.

When running the system we get a few errors like this one after save commands in the logic:

Code: Select all
stopEditing max loop counter exceeded on db:/<<DATABASENAME>>/<<TABLENAME>>/5.19044; at...


I read this error message as: You have an infinite loop in your table event logic...
Somehow version 7.4 coped with this or failed silently...
Is this correct?

Any tips on how to debug these?
What does the '5.19044' number mean?

Christian
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1228
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: Servoy 8.2 stopEditing max loop counter exceeded on...

Postby ROCLASI » Mon Nov 06, 2017 3:54 pm

Hi Christian,

What does your code do to trigger this exception?
How much records are you processing?
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5285
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Servoy 8.2 stopEditing max loop counter exceeded on...

Postby swingman » Mon Nov 06, 2017 4:30 pm

Hi Robert,

in my first case: I need an unsaved calendar appointment (it2be calendar bean), then I edit a person attached to the appointment, this causes an update of appointments today and in the future.... which causes the person to update again ;-)

I put some application.outputs() in my table events so I could see the circumstances where records are updating each other in a circular fashion. The
Code: Select all
5.19044

above: 19044 is the PK of the record causing the loop. Not sure what the 5 is.

The simplest way of avoiding the issue is to add a check that one of the table events in the loop checks that the other record does not already have unsaved changes.

Code: Select all
if(! note.hasChangedData()) {
    note.updated_at = new Date();
}
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1228
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: Servoy 8.2 stopEditing max loop counter exceeded on...

Postby patrick » Mon Nov 06, 2017 4:38 pm

The 5 is the length of the primary key (5 digits)...

This sounds like you have a problem in your setup. Updating record A causes updates of record B causes updates of record A causes ...

This is exactly what this error is about ;-).
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3655
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Servoy 8.2 stopEditing max loop counter exceeded on...

Postby swingman » Mon Nov 06, 2017 10:50 pm

Hi Patrick,

yes, it is code going into infinite loops. What exactly happened in version 7.4? Did it just fail silently?
Or does version 8.2 do something differently?
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1228
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: Servoy 8.2 stopEditing max loop counter exceeded on...

Postby patrick » Tue Nov 07, 2017 11:09 am

As far as I know it "gave up" silently and now it tells you that it does. I don't think anything fails, it's just not ideal what you have there.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3655
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Servoy 8.2 stopEditing max loop counter exceeded on...

Postby swingman » Tue Nov 07, 2017 11:40 am

Having the code loop for no good reason leads to poor performance. The users reported that their Servoy clients were running slower than normal...
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1228
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: Servoy 8.2 stopEditing max loop counter exceeded on...

Postby swingman » Fri Jan 05, 2018 12:12 pm

This issue is also present in 7.4.10. Anyone upgrading to the latest 7.4.x may have to make bug-fixes to table event logic.
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1228
Joined: Wed Oct 01, 2003 10:20 am
Location: London


Return to Programming with Servoy

Who is online

Users browsing this forum: Bing [Bot] and 5 guests

cron