# Miranda NG Official Community Forum

## Forum for English speaking Miranda NG users => Support/Help => Topic started by: Maverick on 08 01 2020, 08:28:50

Title: Current Update not updateable
Post by: Maverick on 08 01 2020, 08:28:50
Hi,

i always thought its a stupid Idea to update the Client every few Days or even every Day... Now you have killed the entire thing....

Below Screenshots. That happens, when i restart Miranda after the Update.

The Errormessage says, that the File is already in use. There is no other Instance or Miranda running.
Title: Re: Current Update not updateable
Post by: UksusoFF on 08 01 2020, 08:45:23
Same trouble  :(
Title: Re: Current Update not updateable
Post by: ghazan on 08 01 2020, 15:59:58
Maverick,
and if you download an utility like Process Explorer and click Ctrl+F to find a handle by a file name, will it display any other process that uses that file?
or, just as a curious idea, will it help if you remove the *.lck file from your profile?

Also, is that a network profile or a local disk?
Title: Re: Current Update not updateable
Post by: UksusoFF on 08 01 2020, 16:46:04
If you have AutoBackups in Profile folder try update again and restore profile from backup.
Title: Re: Current Update not updateable
Post by: dartraiden on 10 01 2020, 12:33:27
https://forum.miranda-ng.org/index.php?topic=5956
Title: Re: Current Update not updateable
Post by: Maverick on 10 01 2020, 16:45:16
Maverick,
and if you download an utility like Process Explorer and click Ctrl+F to find a handle by a file name, will it display any other process that uses that file?
or, just as a curious idea, will it help if you remove the *.lck file from your profile?

Also, is that a network profile or a local disk?

Local and Miranda opend the File, there was nothing that accessed the File.
Seems that you have fixed the issue with the new Patch.

But you Guys should finally test more, instead of releasing broken Updates.
Title: Re: Current Update not updateable
Post by: dartraiden on 10 01 2020, 18:28:15
Developers do not have databases created by earlier versions of the driver
If the user needs stability, he must stay on the stable version

All these years, the libmdbx project has been constantly evolving. Now the developer plans to froze all features (https://www.opennet.ru/opennews/art.shtml?num=52147), so the risk of further failures is minimal

The development of the “next” version of libmdbx will be continued within a separate project MithrilDB, while the development vector of the “current” version of MDBX is aimed at freezing the set of features and stabilization.
Title: Re: Current Update not updateable
Post by: dartraiden on 10 01 2020, 20:23:47
If someone saved db before compression. please post first 256 bytes
this will help develop a crutch that will automatically avoid this problem
Title: Re: Current Update not updateable
Post by: Morku on 11 01 2020, 09:32:33
If someone saved db before compression. please post first 256 bytes
this will help develop a crutch that will automatically avoid this problem

If you tell me how, I can help here.
I still have a profile (created many years ago), which is unable to start when updating to latest Miranda NG Nightly. "it's in an unknown format". Never used the compact function before here.
The last working build with that profile I have on my PC is "0.95.11 alpha build #22431 (7524acda0a)". Any further update brings up the error.

Using the compact function also fixes the issue for my profile. I made a Backup of the userfolder before using this function.
Title: Re: Current Update not updateable
Post by: Vulpix on 11 01 2020, 13:36:43
If you have access to linux (WSL - ubuntu on windows?), you can do it simply by running a command similar to this:

Code: [Select]
cd /path/to/your/profiledd if=profile.dat of=newpiece.dat bs=1 count=256256+0 records in256+0 records out256 bytes copied, 0.0263937 s, 9.7 kB/s
the resulting newpiece.dat will be the first 256 bytes of your profile.

On windows, you can also download "dd for windows" from here http://www.chrysocome.net/dd  (if you don't want to install WSL or anything on your system) and run that instead.

The syntax is gonna be the same. Simply unpack dd.exe into the folder where you have your profile (I recommend doing it in a separate folder just to be sure), and then launch windows commandline (cmd):

Code: [Select]
cd c:\path\to\your\folderdd.exe if=profile.dat of=newpiece.dat bs=1 count=256rawwrite dd for windows version 0.6beta3.Written by John Newbigin <jn@it.swin.edu.au>This program is covered by terms of the GPL Version 2.256+0 records in256+0 records out
and "newpiece.dat" will be the first 256 bytes of the profile.

Third alternative is - make a bootable linux usb pendrive and copy your dat file there, and then do it all after booting into this linux. But I honestly recommend WSL or dd for windows method, they're the easiest if you don't want no hassle :)
Title: Re: Current Update not updateable
Post by: Morku on 11 01 2020, 15:02:22
Hi,

thank you for the tutorial. I did with Ubuntu in VMware and dd.exe on Windows. Both results are from Hashvalues exact the same, so it should be fine. If not, just tell me.

I sent both of you the file to download in PM. I hope it helps.

Is it fine to stay on the "workaround fix compact User dat"? Or should I wait for a fix and continue use the "old dat, without compact" later then?
What is compact doing anyway and are there any downsides?
Title: Re: Current Update not updateable
Post by: Vulpix on 11 01 2020, 15:15:37
Hello!

Thanks, I got the file. I've given it to ghazan who's the main dev, he'll have a look at making a crutch :)

I suggest to do the following, if you're really, really interesting in preserving your data (I am, so... :D I do this myself whenever a db update comes out).

With old profile / old miranda, download and use the MsgExport plugin ( https://wiki.miranda-ng.org/index.php?title=Plugin:Msg_Export/en ) and export all of your history into json files.  (Miranda options->History->Message export->General-> "Use JSON format for export - check" + "Use UTF8 in new files - check", max column width - set to 0, and configure a good default path.)

Then in the "Contacts" tab, make sure all (or relevant) contacts are checked, and then press "export all history" button.

It will take some time depending on your profile size, but it will save all histories into human readable jsons.

Afterwards, move this folder somewhere, then do a compact + upgrade to new version of libmdbx, and then do this same export again.

Afterwards, run a comparison of the exported files.

(I suggest using Total Commander in windows, excellent file commander from http://www.ghisler.com/ ), navigate to the post-compaction export folder in the left pane, and to the old, pre-compaction export in the right pane, then in Total commander's menu -> Commands->Synchronize dirs,

select "Asymmetric - check, by content-check, ignore date-check" and make sure the "show" section has left arrow, non-equal sign and right arrow enabled.

Then run "compare". If you have lost no data or if no corruption occurred, the comparison will show an empty window, i.e. all the files are the same.

If there are differences, simply double-click the row with the differences which will bring a side by side comparison of the file contents where you can usually very easily see what the difference is, and whether or not it's okay. (sometimes it could be like a removed newline or so).

Based on the results of the above comparison, you can then decide to either stay on the upgraded version - or wait for a fix and keep using the old mdbx for now.

I'm a bit obsessed with making sure my data is safe so this is what I do. It is some manual work but in the end it's not too bad and it ensures integrity of irreplaceable data which, if lost, would make me very sad :p
Title: Re: Current Update not updateable
Post by: Morku on 11 01 2020, 16:06:21
Thank you. I did as your described and it's weird.
The "compat" export contains more messages, than the "uncompat" version. So the file size is also bigger in "compat". I double checked the creation day to avoid accidental mixed up tthe export, but no. The second export (after compat and upgrade Miranda) is bigger.

Anyway, the Message history is not that important for me. Much more is the Miranda settings which are so much detailed. I would hate to set up again from scratch ;D For sure it would take a whole day. Anything else comes from Cloud.

If I have to think about how old my profile is... must be after QIP was somehow dead... maybe around ~2013 :-\
Title: Re: Current Update not updateable
Post by: dartraiden on 11 01 2020, 16:48:08
I've given it to ghazan who's the main dev
It's better to attach here (https://github.com/miranda-ng/miranda-ng/issues/2181)
Title: Re: Current Update not updateable
Post by: Vulpix on 12 01 2020, 02:33:03
Thank you. I did as your described and it's weird.
The "compat" export contains more messages, than the "uncompat" version. So the file size is also bigger in "compat". I double checked the creation day to avoid accidental mixed up tthe export, but no. The second export (after compat and upgrade Miranda) is bigger.

Anyway, the Message history is not that important for me. Much more is the Miranda settings which are so much detailed. I would hate to set up again from scratch ;D For sure it would take a whole day. Anything else comes from Cloud.

If I have to think about how old my profile is... must be after QIP was somehow dead... maybe around ~2013 :-\

My profile contains data from Miranda IM days, 2006+ hehe.

You can use dbeditor++ plugin to export all of your settings into an ini file, pre/post upgrade, and using total commander compare those ini files.

But I'm guessing miranda settings being broken is something you would notice instantly since you've been using that miranda for a decade+ .

And it may not be so strange - there could be orphaned/unlinked data that get linked/fixed by the compaction. So yay! :D
Title: Re: Current Update not updateable
Post by: Morku on 12 01 2020, 14:04:42
Code: [Select]
Processing 'eventids'... - dbi-id 4, flags: none (0x00) - problems: wrong order of entries (1) - summary: 7239 records, 0 dups, 87876 key's bytes, 28956 data's bytes, 1 problemsProcessing 'eventsrt'... - dbi-id 6, flags: none (0x00) - problems: wrong order of entries (279) - summary: 29852 records, 0 dups, 477632 key's bytes, 29852 data's bytes, 279 problemsProcessing 'settings'... - dbi-id 9, flags: none (0x00) - problems: wrong order of entries (1021) - summary: 8181 records, 0 dups, 157797 key's bytes, 218537 data's bytes, 1021 problemsTotal 1301 errors are detected, elapsed 0.032 seconds.Should I worry? ^^'

Maybe it's really time to create a fresh and clean new profile and transfer my options manually. Checkbox... by checkbox...
Title: Re: Current Update not updateable
Post by: dartraiden on 12 01 2020, 16:53:01
Sad news: the problem is not in the first 256 bytes  :(
We need a whole profile... no idea what exactly the new driver doesn't like
Title: Re: Current Update not updateable
Post by: dartraiden on 12 01 2020, 16:55:55
- problems: wrong order of entries

https://wiki.miranda-ng.org/index.php?title=Plugin:Dbx_mdbx => ""problems: wrong order of entries" messages should not be considered as errors."
it's normal for our db structure
Title: Re: Current Update not updateable
Post by: Morku on 12 01 2020, 18:02:47
Good to know, it's only wrong order :)

When I delete all of my Accounts in my Profile dat, can I be sure, that no more Log In and Password data is stored in my profile?

If yes, I also can send to you. But maybe it shouldn't be posted on github? Don't know...

I tested and deleted all of my Accounts, updated Miranda again -> still the same issue. So without Accounts, the issue is still there.
Please tell me if you need.
Title: Re: Current Update not updateable
Post by: dartraiden on 13 01 2020, 20:19:20
Account deletion = automatic contacts deletion, so no contacts, no history...

we already got an example of a problem database, thanks