Latest restricted WACUP beta release is build #18798 (April 7th 2024) (x86 & x64 changelogs) | Latest WACUP public preview is build #17040 (September 30th 2023) (x86 only)


NOTE: Beta testers are added in a limited & subjective manner as I can only support so many people as part of the beta test program to keep it useful for my needs.

Unless I think you're going to be helpful, not all requests will be accepted but might still be later on. Remember that beta testing is to help me & the limitations currently works for my needs for this project.

Author Topic: Opening a new instance.  (Read 2770 times)

akilleas

  • Newbie
  • *
  • Posts: 2
    • View Profile
Opening a new instance.
« on: December 31, 2020, 11:51:58 AM »
With the latest 2 versions I've tried, when you press Ctrl-Alt-N and you open a new instance of Wacup it doesn't keep the same playlist you've already made.
With older versions of Winamp the new instance opens with the same song in playlist.
Thanks in advance and a Happy New Year.

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4488
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Opening a new instance.
« Reply #1 on: December 31, 2020, 02:08:46 PM »
This is more down to a decision I made with WACUP & that mode where attempting to run another instance should have prompted to make a duplicate copy of the settings folder for the new instance to use after which that's what will be used going forward.

As generically running multiple instances on the same settings folder can & will corrupt the settings which I didn't want to get complaints about, hence the change in behaviour for a safer solution where each multiple instance ends up with its own settings folder.

I'll look into adding a compatibility mode so the winamp way can be used but it's really not something I recommend & will not be responsible for any data loss that occurs as part of opting in to that mode once it's added in a newer build. Though as I think about it, maybe I could have it maintain the settings copy but have it duplicate the current instances main playlist into the spawned one so there's less risk of data corruption.

-dro

akilleas

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Opening a new instance.
« Reply #2 on: January 02, 2021, 04:59:20 PM »
Happy New Year to all the people around the globe. May the WACUM continues updating!!!!!
Thank you so much for your answer.
I understand what you mean and I appreciate you effort to look into it, whatever your decision is.
In my opinion, I would prefer multiple instances to keep the same settings and the last instance I will close to write the final settings I've made at that instance's settings file. Isn't that possible?

Thanks in advance

WackaMold

  • Beta Tester
  • Full Member
  • ***
  • Posts: 23
    • View Profile
Re: Opening a new instance.
« Reply #3 on: February 10, 2021, 03:36:46 AM »
The "new" confirmation dialog is screencapped below.
Dialog Title: Open a new WACUP instance - are you sure?
Dialog Text: Are you sure you want to open a new WACUP instance?
This is not recommended as it can lead to data corruption (e.g. losing local library play counts & ratings) due to the multiple instances trying to update the same settings files.
You can choose 'Yes' to automatically create a copy of your current settings folder to then use. (Note: Any changes made will not be copied back to the original settings folder).
You can choose 'No' to use the un-safe behaviour & will need to remember to close the open instances last to first to help reduce some of the potential data corruption issues.
Dialog Buttons: Yes, No, Cancel


The Cancel button closes the dialog and ignores the keystroke.
The Yes button begins copying the settings folder. After the copy is complete, the new instance opens. (The copied folder is beside the original folder in %APPDATA%.)
I can't say what the No button does because I didn't try it.

Funny thing: If you do Ctl+Alt+N on the new instance, then the dialog pops up again. Choosing Yes makes a second copy of the first copy of the settings folder, and opens another new instance. The same naming convention is applied, so we get folder names like:
  C:\Users\UsrNam\AppData\Roaming\WacUp
  C:\Users\UsrNam\AppData\Roaming\WacUp_m
  C:\Users\UsrNam\AppData\Roaming\WacUp_m_m
(screencap below)

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 4488
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: Opening a new instance.
« Reply #4 on: February 10, 2021, 03:55:23 AM »
'No' on that dialog is equivalent of Winamp's behaviour of just start another instance & not bother about maintaining data integrity. It creating a copy of the copy is expected as I have no reasonable way to know if that's the first / only instance to exist on the machine or if it's a copy from somewhere else that's being used & is why it's just simpler to offer to duplicate & minimise the conflicts that can & will occur by running things against the same configuration folder.

Multiple instances are honestly something I wish I didn't need to support going forward but I get that there's cases where it makes sense albeit at the inconvenience of data loss or having to manage dual instances which some are ok with.

Quote
In my opinion, I would prefer multiple instances to keep the same settings and the last instance I will close to write the final settings I've made at that instance's settings file. Isn't that possible?
There's no way to guarantee what settings from an instance will be saved first or last nor is there any tracking of things between the instances to try to marshal what's going on which is why it's a lucky dip on what happens. Additionally my approach with WACUP is to save settings when they change instead of waiting until a successful close & the problems that can occur if that doesn't complete cleanly (i.e. crash on close) & more things get lost.

More for my reference, I've still to actively look into this request with having it copy over the existing main playlist (if set to do so) when spawning the new instance.

-dro

WackaMold

  • Beta Tester
  • Full Member
  • ***
  • Posts: 23
    • View Profile
Re: Opening a new instance.
« Reply #5 on: February 10, 2021, 03:15:44 PM »
Quote
wish I didn't need to support
Agree. Considering the complexity, if it were me, I would put in some architecture to disallow more than one instance from looking at the same Settings folder at the same time. A folder-level usage-lock, if you will. Various apps implement exclusion-locking in various ways, partly because OSes don't offer good support for this common use case, let alone there existing a cross-platform / portable solution for it.