Small change in database not picked up by wuUpdate

So we recently discovered something strange with one of the updates we rolled out.

We needed to change four items in our database, changing a version number from 2.0 to 2.1. This database was then encrypted and released within our newest version of the product. For some reason the change was not picked up during the creation of the update files.

When we looked at the binary data that was changed, we saw that 2 bytes were increased with 1 and 2 bytes were decreased with 1. If you for example would calculate a checksum over a file to see if it is different then these changes would have negated each other causing it to not include the file into the update process.

We were now wondering, how it is possible that changes within a file are not picked up by the update process.

To make sure that the error is not on our side we checked what happend in a clean install of latest version and what happend if we updated an older version to the latest. They both had the correct changes in the database.

Regards,

Hubert

You need to make sure you include the correct files in wyBuild. If you do then it will apply the patch. If it fails to apply the patch it will rollback to the previous version and let the customer sort out what to do (typically that means the customer reverts and modifications they did to your binaries or re-installs your app).

Hi Sam,

The problem is not that the patch is not applying. It actually does. But the patch that has been made is faulty.

We tested the behavior ourselves.To make sure no rollbacks or whatever have been used, we installed the versions on a clean system.

When we for example updated from 3.0 to 3.3.1 a large change was in the database and a correct patch was created. When that patch was applied then the changes of the database were indeed correct.

We then also updated from 3.3.0 to 3.3.1. The changes in the database are in this case very small. The patch that then was created and applied did not include the correct changes.

Since 3.0, 3.3.0, 3.3.1 are in the same project file, they also use the same source files for generating the patches. Hence my previous message stating that the tool is at fault and not the user.

Make sure the file you're passing in to wyBuild is actually the file you want to release. This is a common mistake where a customer generates multiple builds with the exact same version number and supply one of those builds to wyBuild and another to their installer, etc.

If you're still having problems, and you're certain that wyBuild is generating a faulty patch, then you need to provide us with a reproducible example:

1. The "Old file"

2. The "New file"

3. The file you're getting after wyUpdate applies the patch.

After providing those 3 files then we can try to reproduce what you say you're finding.

hubertkooij wrote:> Hi Sam,> > The problem is not that the patch is not applying. It actually does. But> the patch that has been made is faulty.> > We tested the behavior ourselves.To make sure no rollbacks or whatever have> been used, we installed the versions on a clean system.> > When we for example updated from 3.0 to 3.3.1 a large change was in the> database and a correct patch was created. When that patch was applied then> the changes of the database were indeed correct.

What do you exactly mean for database changes? What are you updating?

We have an offline sqlite database that we supply with our application. This database is changed or extended with our releases.

Wyatt wrote:> Make sure the file you're passing in to wyBuild is actually the file you> want to release. This is a common mistake where a customer generates> multiple builds with the exact same version number and supply one of those> builds to wyBuild and another to their installer, etc.> > If you're still having problems, and you're certain that wyBuild is> generating a faulty patch, then you need to provide us with a reproducible> example:> > 1. The "Old file"> > 2. The "New file"> > 3. The file you're getting after wyUpdate applies the patch.> > > After providing those 3 files then we can try to reproduce what you say> you're finding.

Yes I'm sure that the correct file is being used in the update procedure. As I stated before. We have one project file that uses the same sources to generate the updates. so 3.0 to 3.3.1 and 3.3.0 to 3.3.1 use the same items. Also the items that are used to generated the updates are the files that come from the installer. When we install the 3.3.1 cleanly without using the update mechanism, we do see the correct changes in our database.

I'll try to get some items for you so that you can reproduce this problem, were do I need to send it to?

Hubert

I send an email, with the topic as subject

hubertkooij wrote:> We have an offline sqlite database that we supply with our application.> This database is changed or extended with our releases.

I think this is the problem: in my opinion you shouldn't try to update the database file(s), but you need to apply changes by running a sql command directly or a sequence of command.

I don't agree with you. The database and tool have no link to an online version. So they can't get the updates from anywhere then within the code of the tool itself.

Since we extend this database a lot with new data each time, we are not going to write Insert and update functions just so that the database won't have to be patched. It creates a lot of code that only once is used and after that can be discarded. That is a huge waist of time in my opinion

Even more, this database is just a lookup database it's read only from the tool. So there is no problem in having it within the update process.

Also the real problem is that a very small change sometimes is not picked up. This is not database specific, but could happen with every type of file.

I do appreciate the feedback though

We got the files. We'll try to reproduce what you've found.

Wyatt wrote:> We got the files. We'll try to reproduce what you've found.

Any news? Personally, I am very curious: in our company we use wyUpdate to update our software and would like to know if there are problems to detect file changes.

tziaoni wrote:> Wyatt wrote:> > We got the files. We'll try to reproduce what you've found.> > Any news? Personally, I am very curious: in our company we use wyUpdate to update our> software and would like to know if there are problems to detect file changes.

No I got no updates so far. Unless they send some stuff via mail that I did not receive. Our companies e-mail filter is really really strict and just throws away mails with specific attachments in them (exe dll) without notifying the sender...

We're looking into this. There appears to be an edge case that Hubert's database files seem to be hitting. We'll likely release a patch within the next couple of weeks to solve this issue.

Any updates on it so far? Still wondering when this will be fixed

It's being fixed in the upcoming version. We should have a beta out to you in about 1 month.