I have a client who has a solution which we’ve recently upgraded from Servoy 2.2 to Servoy 3.5.3.
When I originally built the solution, I put in a number of loops which would replace data in the solution with data in an imported table, so that I could import into records after the original import from Filemaker had already happened.
We have now had with Servoy 3.5.3 two instances where the loop has magically run again, now deleting data in these fields (since the related import data is 3 years old and largely empty). I know I should have removed those loops long ago, but I didn’t expect that they might rise from the dead and start deleting data now. I am especially concerned because I don’t see what is firing these methods. They don’t have buttons on any forms, nor do the appear in any menu. It is almost like they are attached to a keyboard shortcut - which I don’t know - and will execute whenever someone accidentally hits it… There are all sorts of other methods that may cause mayhem in this solution if they are executed now - or executed by an uncontrolled process. I have had to do data recovery twice on two notes fields already, and have tried to disable all the old loops and other methods which should not be needed, its just that there are other methods which may cause problems if accidentally triggered, which I still DO need in the solution.
I would love to know though how to control whether or not a keyboard modifyer has access to methods (its almost like a random keyboard modifyer will fire a random method and I don’t know when it might happen, its awful.)
The server / client is Mac, the Java version is 1.5, the Sybase version is 9.0.2.
Are these methods by any chance visible (and therefore accessible) via the methods menu (menu bar) in the client ?
They are always visible in Developer so make sure you check in Client.
The methods are absolutely not visible at all… No menu methods, no button methods… They are simply nowhere apart from in the method editor… They are also not called by other methods elsewhere.
The data disappearance was triggered on two different forms by two different users (I have a ‘modified by’ field which shows that 935 records were modified by the same user at the same time, and all 935 have their notes fields blanked. This can only be happening because of my loop which sets that field, however nothing calls this method and the user claims that she just did a search “and then it froze” (presumably while it was executing the loop) causing her to force quit it)
Do users access the solution via smartclient, webclient or both?
Are the loops global methods or form methods?
You could try commenting out the loop methods to see if the problem goes away.
Thunder:
…935 records were modified by the same user at the same time, and all 935 have their notes fields blanked. This can only be happening because of my loop…
Maybe not.
Is there a sort that takes place on that table? Is the notes field the only column that is being blanked out? There could be a timing issue between the sort and the save. We have what may be a similar situation that happens occasionally in webclient that we are trying to nail down. It blanks out two columns out of six columns across multiple records (a date column and a description column) and does not appear to involve a loop method. In our case, we think that it may have to do with users performing multiple clicks when they should be single-clicking, but we are not certain. We were able to reproduce the problem by making multiple clicks when only a single click is required. It seems that removing the sort has helped, but we are still waiting to see if the problem happens again. Our theory is that the multiple clicks collide with the sort/save.
Harry, I wasn’t clear. It seems that the error happened AFTER the search was complete. In other words, she seems to have searched (in this case for all records) and then hit a mystery key combination which ran my loop method (which in turn behaved exactly as it should - with nasty results). I don’t think the error happens during the search. There is no method to run the search, she just hit CMD F, typed some stuff and then hit return which showed all records, then hit some combo which I don’t know, which fired the method which looped through and deleted all notes fields… Boom…
Dean, they only connect via smart client. When this first happened, I absolutely commented out the loop method, but missed one on another form that did a similar thing. The second time around (that data went missing), it was on the form that I hadn’t commented out the loop on. The Notes field is the only one being blanked out. There are no sorts on that form.
Thanks for the replies…
Just waiting for the next call to say a bunch of data is gone again… Ouch…
Does anyone know whether methods can be invoked by keyboard shortcuts (without being specified) - especially if I have just upgraded a 2.2 solution to 3.5? Is there something about 2.2 which didn’t have that functionality that 3.5 does?
By the way, this solution has been running fine and without this problem for 2.2 years. It has only appeared twice since upgrading to 3.5 three weeks ago.
Bevil,
Can it be that these methods are called from another method without you knowing or remembering?
Can it be so that you accidentally attached the method to an event?
I don’t know how our fellow developers see this but I can not imagine that this just happens. In other words there must be something triggering these methods…
These methods, one per main form (3 of them) were made really only to be used once by a button I made to control them (and subsequently deleted from all three forms)… The methods were really just for the single purpose of importing data into the notes field when the solution was first deployed, not part of something more sophisticated, nor attached to anything else. They really were that simple…
The ONLY thing that I can think of that could have triggered them when they did, was an accidental keyboard shortcut (CMD + Something…)
I have now disabled these three methods, but obviously my solution is brimming over with other methods, and to have them run uncontrolled is a potential nightmare, especially as I won’t know which one will run, what triggers it, or when it might happen…
I am certain that there is nothing else triggering these methods…