My MM4 db has become upgraded to MM5 somehow? [#16718]

Report bugs & feature requests for MediaMonkey 5 and learn about the newest builds.

Moderator: Gurus

Barry4679
Posts: 1170
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

My MM4 db has become upgraded to MM5 somehow? [#16718]

Post by Barry4679 »

Somehow my MM4 database has been upgraded to 5.0.51 ... This means that I can no longer add tracks to MM4, because I get this dbox.

I looked through my backups, and the upgrade happened sometime between the 2nd and 7th of May 2020.

On the 4th of May I did this, as described here.

Barry4679 wrote: Sun May 03, 2020 10:15 am
Weatherman wrote: Sun May 03, 2020 5:35 am the databases are separate and unique to each version of MM
I just downloaded the current MM4 in portable mode. It opens my MM5 database OK ... I am not saying this is recommended, nor practical in a go-forward sense, but the databases are not unique.


There is the possibility that I screwed up, and accidentally overwrote my MM database, but I can't see any evidence of this because:
  • my MM5 database had some tracks which I downloaded from GPM
  • these tracks are in my MM5 database, and are also in the portable MM4 version, which I created for the above test
  • but they are not in my main version of MM4, ie. the one which has somehow been upgraded to 5.0.51
.
  • NB. my main version of MM4 is not a portable install, and I .have used the DBName option in the ini file option to store the db in a custom location
  • NB my main MM4 db was already at level 5.0.19 ... if this is not normal, it would have happened in 2017 when I found and reported a bug that allowed MM5 to corrupt the MM4 database ... you fixed the bug here .... I was able to add tracks with MM4 at level 5.0.19, but am locked out at 5.0.51
So I could be wasting your time here, but I think that there is a good chance that there is an exposure somewhere.


Questions:
  • has the structure of MM4 database really been upgraded to 5.0.51, or is it just that the DBInfo table been corrupted somehow? ... I sent a zipped copy of the db to Ludek
  • does MM do silent DB structure updates? ... what happens while you display the "checking for new version" message during startup of MM4 ... I saw this message when i started the MM4 portable version ... it would have opened a (renamed) MM5 database, could it that have confused it, and somehow my production version of MM4 database got upgraded?
Suggestions:
  • your dbox message is poor. ... it should be issued at program startup .... it should not leave the situation undetected, until the user decides to add some more tracks to MM4 ... this may be weeks|months later ... in which case the user now has a bigger problem
  • the wording "it is recommended that you use it exclusively with MM5" ... I think that the dbox message should be stronger and more explicit.
Ludek
Posts: 3424
Joined: Fri Mar 09, 2007 9:00 am
Contact:

Re: My MM4 db has become upgraded to MM5 somehow?

Post by Ludek »

Hi Barry,

1) your MM.DB that you sent me was really updated to 5.0.51
You indicated that you have forgotten the steps that you took back on the 2nd of May.
I tried to simulate/replicate and I also revised the related code and haven't found a way how this could happen.
If you could find steps to replicate then it would be great and very helpful!

2) As for the remedy: You indicated that you restored the MM.DB from a backup, but the recovery procedure that Peke suggested to you did not work, because you run it within MM4, you need to run it within MM5, I mean the Maintain Library > Rebuild Full-Text Search index with the ForceMM4Compatibility=1 in Mediamonkey.ini (of MM5)
Barry4679
Posts: 1170
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: My MM4 db has become upgraded to MM5 somehow?

Post by Barry4679 »

Ludek wrote: Tue May 19, 2020 3:16 pm the recovery procedure that Peke suggested to you did not work, because you run it within MM4, you need to run it within MM5, I mean the Maintain Library > Rebuild Full-Text Search index with the ForceMM4Compatibility=1 in Mediamonkey.ini (of MM5)
You have misunderstood what I meant.
Peke's procedure has two phases ; one in MM5 doing rebuilding using the ini setting, and then a 2nd phase (steps 9 & 10) in MM4, where the FTS index is rebuilt (again) for the MM4 environment.

I did this procedure, as described in his steps.
The rebuild (in MM5) ... appeared to complete OK, with all the new MM5 rebuild steps displayed .... btw MM4 doesn't have a "rebuild database" option

It was in the 2nd MM4 phase that the error message was displayed ... which I believe indicates that the MM5 phase failed to what was asked for ... I was using v 2249

Also you haven't responded to the issue where MM4 opened a MM5 level database for several weeks without issuing any warning. It only issued a warning when i tried to add new tracks to the db ... MM4 issued that db level warning 3 or 4 times, and then MM4 froze ... requiring kill via the Task manager

Ludek wrote: Tue May 19, 2020 3:16 pm You indicated that you have forgotten the steps that you took back on the 2nd of May.
I tried to simulate/replicate and I also revised the related code and haven't found a way how this could happen.
If you could find steps to replicate then it would be great and very helpful!
I don't know that the MM4 db damage happened on the 2nd of May ... I only know that it happened between backups on 2nd & 7th of May.
The only unusual thing that I remember was, on the 2nd May, I tested whether I could open a MM5 db, within a standalone portable MM4 version.

If you cannot see any exposure in the code, maybe I 1st tried to open the MM5 db in my production MM4 environment ... I just don't remember.

I will have another play with it when I have time to have to load 2250.
Ludek
Posts: 3424
Joined: Fri Mar 09, 2007 9:00 am
Contact:

Re: My MM4 db has become upgraded to MM5 somehow?

Post by Ludek »

Re the repair procedure:
step 10 (in MM4) seems needless, step 5 (in MM5) does the repair, i.e. 'rebuild full text search index' in MM5 with the ForceMM4Compatibility=1 INI flag set,
BTW 'Rebuild database' in MM5 is also needless.

Just tested directly on your MM.DB that you shared with me via the PM and it worked fine to make the DB "MM4 compatible" again.

As for the warning: it is shown when MM fails to update a song into database because of full-text-search index incompatibility.
I tested on your MM.DB just by changing rating of a song (any song data update results in this kind of warning/error) and does not result in the waring/error after using the Peke's procedure.

And yes, we should probably show this warning even on MM4 startup, I'll add it to 4.1.29

As for the cause: I believe that you had to manually rename MM5.DB to MM.DB for using it with MM4 (as you indicated that yu don't remember), but let us know if you find that this was not the case and you have another steps.
Barry4679
Posts: 1170
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: My MM4 db has become upgraded to MM5 somehow?

Post by Barry4679 »

Ludek wrote: Wed May 20, 2020 6:03 am step 10 (in MM4) seems needless, step 5 (in MM5) does the repair, i.e. 'rebuild full text search index' in MM5 with the ForceMM4Compatibility=1 INI flag set,
BTW 'Rebuild database' in MM5 is also needless.

Just tested directly on your MM.DB that you shared with me via the PM and it worked fine to make the DB "MM4 compatible" again.
Before my initial report, I went through the procedure twice to make sure I didn't make a mistake.

Did you actually test my "fixed" database by trying to open with MM4?

1. When you did it, was the value in DBInfo table also downgraded? If no, then wouldn't this trigger your MM4 warning message ... which could explain what I saw?
2. Otherwise maybe the 'Rebuild database' option interferes with the MM4 downgrade?
3. And maybe the lack of downgrade that I experienced was related to whatever your issue was with v2249?
Ludek
Posts: 3424
Joined: Fri Mar 09, 2007 9:00 am
Contact:

Re: My MM4 db has become upgraded to MM5 somehow?

Post by Ludek »

Did you actually test my "fixed" database by trying to open with MM4?
Yes, works fine.
1. When you did it, was the value in DBInfo table also downgraded? If no, then wouldn't this trigger your MM4 warning message ... which could explain what I saw?
No, DBInfo was not downgraded, just the FTS was downgraded making it compatible with MM4.
2. Otherwise maybe the 'Rebuild database' option interferes with the MM4 downgrade?
3. And maybe the lack of downgrade that I experienced was related to whatever your issue was with v2249?
Maybe, I haven't tested. But more probably you put the ForceMM4Compatibility=1 to wrong section of the MM.INI (needs to be under [Options] section) or maybe you put it to INI from MM4 (instead of INI of the MM5 version)?
Barry4679
Posts: 1170
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: My MM4 db has become upgraded to MM5 somehow?

Post by Barry4679 »

Ludek wrote: Wed May 20, 2020 3:36 pm Maybe, I haven't tested. But more probably you put the ForceMM4Compatibility=1 to wrong section of the MM.INI (needs to be under [Options] section) or maybe you put it to INI from MM4 (instead of INI of the MM5 version)?
No, I have already sent you an image (in my PM) showing before and after starting MM5, which shows that I made the ini file setting as advised.

I suppose that you are indicating that this isn't a priority issue. I accept this, but just to recap:
  • a level 5.0.51 db caused MM4 to issue an error message, and to freeze
  • and then your MM5 ForceMM4Compatibility=1 function generated a db which caused MM4 to issue the same incompatibility error message when I tried to do a FTS rebuild on it in MM4
I just redid the procedure, with following change from Peke's original instructions:
  • just a FTS rebuild in MM5, ie. not also a full db rebuild this time
  • this time I used MM5 v2250, not 2249
When I renamed the db, and transferred it to MM5 portable:
  • the database opens OK .... but that is expected, it opened OK before the "fix"
  • it issues the db incompatibility message if I try to add tracks to MM4 ... it doesn't freeze MM4 this time
  • if I try to rebuild FTS on it in MM4, it issues the incompatibility dbox, and MM4 freezes
I have PM'd you a link to the DB after MM5 has "fixed" it with the ForceMM4Compatibility=1 option. These things don't happen for you?
Ludek
Posts: 3424
Joined: Fri Mar 09, 2007 9:00 am
Contact:

Re: My MM4 db has become upgraded to MM5 somehow?

Post by Ludek »

Hi Barry,
the DB that you sent me is not MM4 compatible.
It looks like you did not set the INI flag correctly before rebuilt of the FTS index in MM5, could PM your MediaMonkey.ini from MM5 portable?

Anyhow I sent you link to your MM4 compatible database via PM
Ludek
Posts: 3424
Joined: Fri Mar 09, 2007 9:00 am
Contact:

Re: My MM4 db has become upgraded to MM5 somehow?

Post by Ludek »

OK, I understand it now.

The DB that I sent you works fine until I rebuilt the FTS index in MM4 too.
Then it is showing the compatibility message when adding tracks, because the insert_songs trigger errors with "main.SongsText has no column named custom6>"

So it seems that Peke's procedure was right and the step to 'Rebuild database' is needed in MM5 to re-create also triggers (without using the custom6 ... custom10 columns).

EDIT: Anyhow the best is to avoid using MM5.DB in MM4

EDIT2: I re-sent you link to your DB (with 'Rebuild database' in MM5 and the flag set). Finally works fine even after using Rebuild FTS in MM4.
So the Peke's procedure worked fine on your database for me.
Barry4679
Posts: 1170
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: My MM4 db has become upgraded to MM5 somehow?

Post by Barry4679 »

Ludek wrote: Thu May 21, 2020 5:12 am EDIT2: I re-sent you link to your DB (with 'Rebuild database' in MM5 and the flag set). Finally works fine even after using Rebuild FTS in MM4.
So the Peke's procedure worked fine on your database for me.
I confirm that the database you sent works in MM4 ok.

I redid the procedure again myself:
  • install clean portable version of MM5 ... don't allow mm5 to start
  • update default MM5 ini file in portable, as shown in the image I have sent you twice
  • copy mm4 mm.db to MM5 portable, and rename db to MM5.db
  • start MM5 ... press cancel to 1st time wizard ... don't import data or settings from MM4
  • open MM5 Manage Database, run with rebuild database, and FTS rebuild checked
  • wait to finished ... runs for quite a long time
  • close mm5
  • copy MM5.db to MM4 portable, and rename db to MM.db
  • open MM4 portable
==> cannot add new tracks ... db incompatible
==> cannot rebuild fts in MM4 ... database incompatible ... MM$ freezes

MM5 is v 2250
MM4 is v 4.1.28.1905

Maybe your version of MM5 has something not distributed to customers?

I am tired of this issue ... I am Ok to drop it, if ok with you?
Peke
Posts: 13480
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: My MM4 db has become upgraded to MM5 somehow?

Post by Peke »

Hi,
I tried it again and had no issues.

Can you Copy/Paste INI file after change and prior to mm5 start?

Also try these:
a) do not rename to MM5.DB
b) Do rebuild first and then Restart MM5 and do Full reindex.

Maybe my steps needs adjusting.
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum
Barry4679
Posts: 1170
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: My MM4 db has become upgraded to MM5 somehow?

Post by Barry4679 »

Peke wrote: Thu May 21, 2020 4:45 pm Can you Copy/Paste INI file after change and prior to mm5 start?
I have done that twice before. Here is again, the little box shows before I start MM5 for the 1st time, and the big window is after MM5 has run once.
Peke wrote: Thu May 21, 2020 4:45 pm Also try these:
a) do not rename to MM5.DB
b) Do rebuild first and then Restart MM5 and do Full reindex.
OK, I did that. There is a slight improvement. I can now rebuild FTS in the MM4 environment. But still get the incompatibility message from MM4 when adding new tracks to the database.

I am over screwing with this. It seems a peripheral issue, and I am spending too much time collecting data, and following sketchy instructions, and describing things, that nobody reads carefully.

eg. "b) Do rebuild first and then Restart MM5 and do Full reindex." ... MM5 has two separate menu options that say "rebuild" ... and nothing described as "Full reindex" ... I guess that I got it correct, but I don't know for sure.

I am just wasting my time. Thanks for trying to help me in the 1st place.
Peke
Posts: 13480
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

Re: My MM4 db has become upgraded to MM5 somehow?

Post by Peke »

Hi,
Sorry for your lost time, main problem for "sketchy instructions, and describing things" is that for Ludek and I things worked with no warnings. It is really strange why the heck it is happening for you each time :(

Sorry, for repeating things. I constantly thinking that I have missed something in steps and that is why it fails for you. As we created way to downgrade DB to MM4 at least we can try to make it smooth as much as possible.

It is your call if you want to get to bottom of this or you say treat it as "peripheral issue" and see if more users report it?
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum
Barry4679
Posts: 1170
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: My MM4 db has become upgraded to MM5 somehow?

Post by Barry4679 »

My MM4 db has been upgraded to 5.0.51 for the 2nd time. ... ie. been corrupted
The 1st time this happened, I didn't detect it for a couple of weeks, and presumed that I could have made some manual error during an experiment to determine compatibility between MM4 & MM5 dbs.

This time I did nothing other than install and use MM5 in portable mode ... I ran no experiments ... I believe that it is clear that MM5 has corrupted my MM4 database, and that it is likely that it has done this twice now.
  • yesterday I installed MM5 in portable mode ... I can see the MM5.db database that it converted into F:\MediaMonkey 5\Portable
  • today I opened MM5 db, and tested some MM5 LFM options for this thread
  • as described in that thread, I also went into the MM4 Tools|Options dbox looking for any LFM config options
  • later I added some more music track directories in MM5, via File|AddRescan
  • while this was running I went back to MM4, and got this message
  • I checked where MM5 thought that its db was ... It has escaped its sandbox (!?), and it is using my MM.db file ... what made it switch to that file name, and what made it look outside its F:\MediaMonkey 5\Portable sandbox?
  • and it has upgraded my MM4 db to 5.0.51
Obviously a serious error. ... People need to be able to rely on the fact that they can do slash and burn operations during volunteer beta testing, without trashing their production database ... and not everybody will be as well backed up as I am.

The only extra thing that I did in MM5, other than the activities described in that other thread, was to make some Tools\Option settings, and when I went into Files|AddScan, you had transferred a lot of file locations across from MM4, and I used the hover-trashcan at the right end of the row to delete them from your location list.

The other thing was, when I installed MM5 yesterday, I unchecked the "start MM5 now" checkbox in the installer, because I was going out. And then started MM5 a bit later using this shortcut that I have on my desktop. I don't usually uncheck that checkbox.

I will PM my MM5 ini file to Ludek. It contains this:
[System]
DBName=D:\Music Databases\MM.db
Ludek
Posts: 3424
Joined: Fri Mar 09, 2007 9:00 am
Contact:

Re: My MM4 db has become upgraded to MM5 somehow?

Post by Ludek »

I will PM my MM5 ini file to Ludek. It contains this:
[System]
DBName=D:\Music Databases\MM.db
MM5 shouldn't contain the DBName until you added it manually ?
Tracked as https://www.ventismedia.com/mantis/view.php?id=16718
Post Reply