my solution has gone nuts

Dear community

I have a problem with my servoy solution which has been running fine in production for 2.2 years. Recently I migrated it to servoy 3.5.3. The first problem is that ancient ‘use once’ methods have started randomly being triggered. They are not in any menu, nor attached to any button, nor called by any other method, nor on any other on_xxxxx trigger. They just randomly execute, and in two cases have destroyed the 5000 character notes dataprovider on two separate forms. I can ONLY assume that they are triggered by an accidental keyboard shortcut, but as far as I know, there is no way to explicitly attach methods to keystrokes… Is there??? Anyway, that problem is now no longer my primary headache with this solution.

It is now deleting random records (there is no delete record method), and has also taken to changing the value of a field (called unique_id) to a value of another record in the system. (There is a record which has 4400 in unique_id (an integer) - which has arbitrarily (it seems) been changed to 5333). This unique id + a code (i.e. dhs 5333) is the local key for relations to about 10 other tables. Therefore when the reference number changes from dhs 4400 to dhs 5333, it adopts all of the child records that actually belong to 5333.

Now I know everyone is going to say that someone must be changing it - but editable is not ticked in its properties.

I know you’re also going to say that I’m using an assignment rather than an evaluation somewhere (= rather than ==), guess again… the dataprovider unique_id is not mentioned in ANY method anywhere. It is used in a calculation which is [return text_category + " " + unique_id] but nowhere else…

Somehow, between the 20th December, and 24th January, at least one record has had this auto incremented, uneditable, unmethod-ed, un assigned, untouchable field changed to the value of a different record. I can’t even change it back to its correct record without modifying the solution to allow this.

The client (and I) are losing faith in the integrity of the solution. The client has spent 2.2 years putting 55+ GB of data into this solution and I have no idea what is going on. The methods are not all that complex, but are now firing off randomly without any regard for a trigger, and unchangeable data is changing by its-self. What is going on??? I have not seen this happen ever before with servoy or Sybase (I know, it can’t happen, I know…)

The only thing significant about this solution is that it was recently upgraded from 2.2.7 to 3.5.3

I’d be grateful if anyone can tell me whether there is anything they can think of that has been deprecated and might be in my methods which would change an uneditable field, or would randomly delete records, or would randomly fire off methods…

Either that, or is there an automatic method keyboard assignment trigger? and where the hell do I turn it off???

I feel as though its being sabotaged…

Please someone help…

Bevil

Sorry, it is an intel Mac, running 10.4.11, Java 1.5, Servoy 3.5.3, Sybase 9.0.2.

Some comments:
-servoy will never just execute a functions without a reason
-servoy will never modify data without a reason, user or script telling it todo so.
-servoy is inert it will not do anything unless told

Some questions:
-with how many databases are you running? to hold 50GB
-what database vendor are you using?
-did you use servoy tracking to see who did the changes?
-are you using third party plugins?
-are you using third party beans? (to display data, modify data)
-are other applications working on same database?
-are you doing script find() inside if statements? like:
if (controller.find())
{
//apply search critiria
controller.search()
}
-are you using schedulers?
-are you using batchprocessors?

Hi Jan, thanks for the reply. I’ll try to respond to everything here:

-servoy will never just execute a functions without a reason

Yep, I know that, it is what is worrying me because it has twice that I know about…

-servoy will never modify data without a reason, user or script telling it todo so.

Again, I know this, but the field is non editable, is not in any other method local or global or in modules, worked fine for 2.2 years and has just now been changed. I know it can’t happen - and know the reasons, but it has…

-servoy is inert it will not do anything unless told

This means that my methods MUST be doing something, but none of the code to do any of this is in any of my methods…

-with how many databases are you running? to hold 50GB

including Servoy_repository, I have 5. although most of these are small, the biggest two are 27GB and 17GB. My own Servoy developer copy on my machine is only 322MB as I have empty images tables. And this error is obviously very rare, so I can’t reproduce it (and I wish I knew how to reproduce it…)

-what database vendor are you using?

Sybase version 9.0.2

-did you use servoy tracking to see who did the changes?

No but I’m thinking of doing it if this goes on.

-are you using third party plugins?

Yes, IT2Be Data Streaming Plugin - but it has never misbehaved in this way before and has been in the solution for about 9 months.

-are you using third party beans? (to display data, modify data)

Nope

-are other applications working on same database?

Nope

-are you doing script find() inside if statements? like:
if (controller.find())
{
//apply search critiria
controller.search()
}

Nope

-are you using schedulers?

No… I do have an automatic backup in Sybase (set up in Sybase Central) through a daily event, but no schedulers

-are you using batchprocessors?

No.

In short, if I search Servoy for this field name (unique_id) it simply does not appear. It is in no method, it is also in only one calculation but it is not the product of the calculation, but rather one of the variables and the only operator in the calc is a +. the field only appears on one form, and it is non editable, it is explicitly non editable, not turned on or off by a method. Its form element is named (“unique_id”) but this does not appear in any method either.
There is simply no way that it can be changed. However, sometime between 20Dec and 23 Jan, it did change in one (or more that I don’t know about) record from 4400 to 5300

It is almost like something made the field briefly editable and someone was doing a search for 5333, or Servoy crashed in a search and somehow set it to another value, or the search mode editability of the field was held over into browse mode…

I know that none of this sounds like it makes sense, and I know that it is NOT POSSIBLE!!! but I am also reporting what I am seeing. As I said before, I am going to have to make the field briefly editable to be able to reset the data to what it was. There is no other way to change it… But Servoy or a person did… There is nothing in any of my methods that has changed between 2.2 and 3.5, but since the switch, the solution has become entirely unreliable (remember, it is firing methods without a trigger, it has deleted a record (although that could have been an accidental deletion by a person) and it has changed data in an unchangeable field - ALL since I changed from 2.2.7 to 3.5.3)

As a side note, is there a method to find duplicates in this field? I am going to have to find out how many other records have had this data changed, there are about 9000 records in the db.

Thanks Jan

Bevil

Well you have todo “script find() inside if statements”!, if you don’t you modify existing records.
Find may return false indicating it can not go into find (escpessially when turning autosave off)

Hi Bevil,

Thunder:
As a side note, is there a method to find duplicates in this field? I am going to have to find out how many other records have had this data changed, there are about 9000 records in the db.

You can use SQL for this.

SELECT unique_id FROM tableName GROUP BY unique_id HAVING count(unique_id)>1;

This will give all the unique_id values that are double. Now if this is not the PK of the record (I guess not since it allows double values) then you need to put this query in a subselect like so:

SELECT pkField FROM tableName WHERE unique_id IN (SELECT unique_id FROM tableName GROUP BY unique_id HAVING count(unique_id)>1);

Hope this helps.

I have not got any method on that form which does a search, whether in an if or not… That dataprovider only exists on that one form.

Thank you Robert, I will give that a try…

you are right, it is not the primary key.

Hi Bevil,

Thunder:
I have not got any method on that form which does a search, whether in an if or not… That dataprovider only exists on that one form.

Keep in mind that all dataproviders (i.e. the columns of the table) are accessible in a method. So even if you don’t have a field on the form that uses that dataprovider it still can be accessed by a method.
Do you have any (other) methods that do searches on that unique_id field?

Hi Robert

I know you could get to columns on forms that are not where the method was called. However if I search the entire solution for “unique_id” it returns nothing… It is simply not in any method ANYWHERE in the whole solution, whether locally or on any other form.

I don’t believe that the data was changed by a method (either it was or it wasn’t, and if it was, it must be in a method, right? - it is not - so therefore it is not a method that is changing it.).

There is also NO way for the field to be modified by a person, and there is NO way the field can be modified by a method (as it is not in one). The field is also not the result of a calculation. It has however been changed. I have a copy of the database from 20/12/2007 which shows the record with 4400 in it, and I can log into the live solution now which shows the same record with 5333 in that field…

I’m sure you can imagine how my customer feels about it…

I can’t blame Servoy - because it can’t happen like that, I can’t blame people using it - because I have prevented them from modifying it, and I can’t blame my methods (I don’t think) because that field does not appear in them…

Aliens?

Wicked hackers wanting to watch me suffer??

If anyone can access your database directly via any SQL tool, that data could be changed.

That said, this data change could be caused by some Servoy bug. It is possible. When running Servoy Developer, I’ve lost plenty of data (methods in the repository that just disappeared, etc.) Of course, that is with the Developer not the Client, but who knows?

Hi Mike,

mxvanzant:
That said, this data change could be caused by some Servoy bug. It is possible. When running Servoy Developer, I’ve lost plenty of data (methods in the repository that just disappeared, etc.) Of course, that is with the Developer not the Client, but who knows?

I have never heard of this. With what version of Servoy did this happen ?
Are/did you actually use a transactional database for your repository because without that you can loose data.
Also did you file this issue in the support system ?

Hi Mike

I am with Robert on that, I have never lost data before (not so much as one character) in any solution, client or developer, I’ve ever been involved with, in 5 years - apart from with this solution and only now… If anything has ever misbehaved before, there has been a rational explanation for it. Servoy doesn’t do this stuff…

Also, nobody has access to the data outside of Servoy client in this case, none whatsoever…

Bevil

It near impossible to say something more on this issue…no body else ever complained…we only can provider you with some tips to track the source of the change:
1)use a sybase constraint to validate the change, you says the pk is changed somehow, you can put a constraint on the pk like: my_chk_constraint check (pub_id > (select max(pub_id))
it may seem silly, but this will throw a constraint violation into servoy, so then you know the place where this happens in side your scripting.
see http://manuals.sybase.com/onlinebooks/g … pt=17866/*
2) do turn on tracking to see if it is an particular user using your system in a way you did not anticipate for.

Hi Jan,

Thanks for the reply. I will try that.

As a note though, it is not the pk that is being changed. It is a field called unique_id which is only made unique by having a sequence (servoy_seq) and the inability to be changed… I don’t have duplicate pks (and the pk field doesn’t appear anywhere either)…

Thanks

Bevil

Hi Bevil,

I think I have seen a similar issue. In my case it was not a Servoy bug.

Scenario: You point a copy of Developer to a live database which uses servoy-sequences. Your developer has a separate repository, with it’s own copy of the servoy-sequences, so if you create any records, you are at serious risk of creating duplicates ids…

If you do need to work this way, always use the database to generate the sequence.

Hi Christian

It isn’t that. I don’t connect to the live database with my developer. Developer repositories are ALWAYS local here…

Bevil

Roclasi,

We are using the Servoy (Servoy version 3.5.3) with a remote Sybase database. It may have happened on an earlier version. We have multiple developers all working on the same solution, but we have multi-developer turned off – maybe having the multi-developer off had something to do with the problem : )

Mike

mxvanzant:
We are using the Servoy (Servoy version 3.5.3) with a remote Sybase database. It may have happened on an earlier version. We have multiple developers all working on the same solution, but we have multi-developer turned off – maybe having the multi-developer off had something to do with the problem : )

Mike

(emphasis is mine)

You hit the nail on the head.
Multi-dev is there for a reason, as you have discovered. ;)

Developer repositories are ALWAYS local here…

But do you connect to the live database using these (more) repositories?
If so you are in trouble…