multiple instances of 6.80 beta 7

This is the place to help test and discuss Version 6 Beta releases.

multiple instances of 6.80 beta 7

Postby RayMark » Mon Aug 28, 2017 2:52 am

With 6.80 beta 7, it became difficult to launch the second instance of NewsBin - with a different .nbi file which points to a different data folder location

The second instance simply does not start. Multiple attempts do not help. But later, perhaps after 5 minutes, yet another attempt is finally successful.
I tried to start the second instance a couple times and both times exactly the same thing occurred. Initially it would not start, and only after some time passes - then (only sometimes) it finally does, on a new attempt.
It almost looks like some process is preventing the second instance from starting.
To launch the 2nd instance, the attempt has to be made at certain exact time moments and it fails at all other times.

I just re-checked with instances of older versions: 6.80 beta 6 and beta 5.

beta 5 + beta 5 - OK
beta 6 + beta 6 - OK
beta 7 + beta 5 - OK
beta 7 + beta 6 - OK
beta 7 + beta 7 - The 2nd instance DOES NOT START !!!

I am still trying to start 2nd beta 7 for the 3rd time. Only twice successful so far, each time after multiple attempts, only almost after all the hope was gone. This time I am trying for more than 10 minutes already.

So the question is: has something been done in beta 7 that would lead to this behavior?

BTW (may be important!): I found a very strange thing: my .nbi files had today's dates (August 28) in the folders of beta 6 and beta 5 and August 19 date in the folder of beta 7, even though I was not using beta 5 and beta 6 for the last several days, only beta 7. I cannot explain this strange thing, unless NewsBin somehow remembers somewhere the location of the .nbi file from earlier runs of earlier versions but not from beta 7, and saves it again to the same location while ignoring its location in beta 7. Again, I am using two different .nbi files, and one of them had today's date in the beta 5 folder, the other one - in the beta 6 folder - as I was using them before beta 7 was released.
And beta 7 saves .nbi file to the folder of a previous beta.
Perhaps this thing is related to the failed attempts to launch the 2nd instance of beta 7.

UPDATE: After 20 minutes of trying I gave up - launched the 2nd instance of beta 5 instead of beta 7. So only twice succeeded with 2nd beta 7.

......... my setup ...................

NewsBin680B5:
››››NewsbinPro64.exe
››››NewsBin_1.nbi
››››NewsBin_2.nbi
››››....

NewsBin680B6:
››››NewsbinPro64.exe
››››NewsBin_1.nbi
››››NewsBin_2.nbi
››››....

NewsBin680B7:
››››NewsbinPro64.exe
››››NewsBin_1.nbi
››››NewsBin_2.nbi
››››....

NewsBin_1.nbi:
››››DataPath=G:\NBData\

NewsBin_2.nbi:
››››DataPath=H:\NBData\


When NewsBin680B7 was created, the newest/latest (at the time) versions of NewsBin_1.nbi and NewsBin_2.nbi were copied into it from NewsBin680B6 and NewsBin680B5 respectively.
If I need to use an older version, I just copy the latest .nbi file to its folder first.
It may look unnecessary to have multiple copies of .nbi files, but to have .nbi in the same folder as .exe is more convenient for me. Perhaps I could make batch files instead, pointing to the common location of .nbi files, but I do not switch to different older versions all that frequently.

So now, after using only beta 7, NewsBin_1.nbi and NewsBin_2.nbi have today's dates not in the beta 7 folder, but in the folders of beta 6 and beta 5 where they were previously used (until August 19)
Strange.
RayMark
Seasoned User
Seasoned User
 
Posts: 468
Joined: Sat Jul 21, 2007 10:40 pm

Registered Newsbin User since: 07/21/07

Re: multiple instances of 6.80 beta 7

Postby Quade » Mon Aug 28, 2017 9:48 am

So the question is: has something been done in beta 7 that would lead to this behavior?


Not as far as I know but then again, I never test with multiple NBI's.

BTW (may be important!): I found a very strange thing: my .nbi files had today's dates (August 28) in the folders of beta 6 and beta 5 and August 19 date in the folder of beta 7, even though I was not using beta 5 and beta 6 for the last several days, only beta 7. I cannot explain this strange thing, unless NewsBin somehow remembers somewhere the location of the .nbi file from earlier runs of earlier versions but not from beta 7, and saves it again to the same location while ignoring its location in beta 7.


Newsbin gets the NBI path from the registry. The only way to reliably use multiple NBI files is to pass the NBI in the command line. It should always use the last NBI that was used no matter what version you run. So, if you ever start an earlier beta, then exit, it'll use the NBI from that beta by default unless you force it to use some other NBI.

It's not clear how you're starting your instances of Newsbin. The NBI location doesn't typically matter BUT if the data folder doesn't exist in the NBI file, Newsbin will use the folder the NBI is in for the current data folder.

It sounds almost like the command line is being ignored. I can check that. I assume you're using the command line to start Newsbin

"NewsbinPro64 <NBI Filename>" and not double-clicking the NBI filenames.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 45009
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: multiple instances of 6.80 beta 7

Postby RayMark » Mon Aug 28, 2017 2:24 pm

Yes, I always start NewsBin with an .nbi file specified in the command line:

NewsbinPro64.exe NewsBin_1.nbi

I start it from FAR, from the folder of the Newsbin version I want to use.
CTRL+ENTER drops NewsbinPro64.exe on to the command line, and then another CTRL+ENTER drops the .nbi file I want to use.

But then NewsBin saves .nbi file not to that folder but to a different folder (from which .nbi file was copied some time ago).
I never noticed it before. Possibly, only beta 7 does that. And also perhaps it is somehow related to the reason I cannot start two beta 7s.
RayMark
Seasoned User
Seasoned User
 
Posts: 468
Joined: Sat Jul 21, 2007 10:40 pm

Registered Newsbin User since: 07/21/07

Re: multiple instances of 6.80 beta 7

Postby RayMark » Wed Aug 30, 2017 2:48 pm

I can now confirm:

beta 7 ignores the .nbi argument on the command line. It always uses LastNBI from the registry.

It makes it a bit complicated to launch two instances, but it can be done, if LastNBI in the registry is set to the required value before launching NewsBin.
Worse is with exiting NewsBin: it is easy to overwrite nbi 1 with nbi 2.
Before exiting the correct value again has to be set/checked in the registry. It is easy to make a mistake or to forget, so one .nbi might get overwritten by the other.

So here is what I do: immediately after launching the 2nd instance of NewsBin I modify LastNBI in the registry to a 3rd .nbi file.
So if I forget to set the registry to the correct value when exiting, my .nbi files 1.nbi and 2.nbi are not overwritten and the newest file is available as 3.nbi

Everything is working fine, two beta 7 instances are running each with its own .nbi, except one thing: 3.nbi is not created after several NewsBin exit tests.
Even explicit "save configuration" does not create that 3.nbi file.
So I don't know how to force .nbi file to be saved.

But when I try to start 2 instances from batch files, I get the same problem as before, even though LastNBI is set to the correct value.

both .reg file and batch file change the registry key correctly:

[HKEY_CURRENT_USER\SOFTWARE\DJI Interprises\Newsbin50\LastNBI]
"NBIFile"="E:\\NewsBin680B7\\NewsBin_1.nbi"

and

reg add "HKEY_CURRENT_USER\SOFTWARE\DJI Interprises\Newsbin50\LastNBI" /v NBIFile /t REG_SZ /d "E:\\NewsBin680B7\\NewsBin_1.nbi" /f


So the first instance starts OK from this batch file:

reg add "HKEY_CURRENT_USER\SOFTWARE\DJI Interprises\Newsbin50\LastNBI" /v NBIFile /t REG_SZ /d "E:\\NewsBin680B7\\NewsBin_1.nbi" /f
START "" NewsbinPro64.exe NewsBin_1.nbi
reg add "HKEY_CURRENT_USER\SOFTWARE\DJI Interprises\Newsbin50\LastNBI" /v NBIFile /t REG_SZ /d "E:\\NewsBin680B7\\NewsBin_NEW.nbi" /f

(here the command line argument is not really needed as it is ignored anyway)

But when the 2nd instance of Newsbin is invoked from a similar batch file, it does not start - even though the batch file sets LastNBI to 2.nbi correctly.

Anyway, I hope you will fix the .nbi on the command line issue soon, so this batch file issue is not really important to solve.
It is easy enough to change the registry and to launch NewsBin in two steps - it works fine.
RayMark
Seasoned User
Seasoned User
 
Posts: 468
Joined: Sat Jul 21, 2007 10:40 pm

Registered Newsbin User since: 07/21/07

Re: multiple instances of 6.80 beta 7

Postby RayMark » Tue Sep 05, 2017 1:55 am

So the issues here are two:

1. NewsBin needs to use the .nbi file from the command line if present. Currently beta 7 ignores it.

2. If an .nbi file was provided on the command line, it has to be saved back to that location, not to the location in the registry.
RayMark
Seasoned User
Seasoned User
 
Posts: 468
Joined: Sat Jul 21, 2007 10:40 pm

Registered Newsbin User since: 07/21/07

Re: multiple instances of 6.80 beta 7

Postby Quade » Tue Sep 05, 2017 11:06 am

beta 7 ignores the .nbi argument on the command line. It always uses LastNBI from the registry.


I'll check it out. Keep in mind if there are any spaces in the path the NBI filename has to be quoted.

Edit:

Dex says it's working for him in the current beta. Keep in mind the quoting and that the NBI extension has to be ".nbi" and not ".NBI" or some other variation.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 45009
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: multiple instances of 6.80 beta 7

Postby RayMark » Tue Sep 05, 2017 8:11 pm

It is not working with beta 7.
And I have tested and confirmed - it is not working. The command line argument is ignored.

It looked as if it was perhaps working, but when I deleted .nbi files from my beta 5 and beta 6 folders, then it went to the .nbi in the default location, somewhere in Users\etc.
When the correct .nbi is provided on the command line, the default one is still being used when there are no longer .nbi files in beta 5 or beta 6, whichever was in the registry as last.
And my default .nbi does not have any groups or servers, so it is easy to tell.

There are no spaces in the name and .nbi is in lowercase.

NewsBin.nbi

The path has no spaces either. But I do not provide the full path, both .exe and .nbi are in the same folder. Used to work OK prior to beta 7.
RayMark
Seasoned User
Seasoned User
 
Posts: 468
Joined: Sat Jul 21, 2007 10:40 pm

Registered Newsbin User since: 07/21/07

Re: multiple instances of 6.80 beta 7

Postby Quade » Tue Sep 05, 2017 10:10 pm

I tested

"W:\NewsbinTest.nbi"

and

"W:\Really Long\And even Longer File Path\NewsbinTest.nbi" (path was about 3 times longer than this).

and watched it load both in the debugger and when I did a "Save As" inside Newsbin, the folder started at the NBI folder each time. When the NBI is passed in the command line, the registry isn't consulted at all. It's updated periodically and in Exit though. Are you using unique filenames for these NBI files?

I always quote the path in the command line. You should make it a habit to quote them too.

You absolutely need to use the full path to the NBI including the path and filename.

If you're just passing the filename, I don't know what'll happen.

So at this point, I'm not clear why it's not working for you. Maybe use command prompt, go into the "Program Files" for Newsbin then run it using the quoted full path to the NBI.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 45009
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: multiple instances of 6.80 beta 7

Postby RayMark » Tue Sep 05, 2017 11:35 pm

Passing just the file name should be fine, because it is in the same folder as exe, therefore you can always retrieve or reconstruct the full path of the .nbi file if you need it.
Passing arguments this way works fine with all (most?) software. And it works fine with all NewsBin versions prior to beta 7.

However, I now re-checked:

I am using two .nbi files. NewsBin.nbi and NewsBin_2.nbi.

So, when I start NewsBin (beta 7) with NewsBin.nbi on the command line, for some reason it takes NewsBin_2.nbi instead.
If I use the full path - it works fine and the correct .nbi file is taken. So something happened to beta 7. I don't even know where it takes the other .nbi file location from, not from the registry, because I set it to some bogus value - no difference.

But using the full path is difficult: FAR drops only the file name with CTRL+ENTER, or is there a way with FAR to drop the full path?

Anyway, I now moved the .nbi files to a single permanent location instead of having their copies with various NewsBin versions.
Instead, I made .bat files to start NewsBin with the full path to .nbi files at that single location.
Seems to work fine. At least both NewsBin instances now start with correct .nbi files.
So, the full path solved the problem. Not sure about saving of the .nbi files yet.
Again, prior to beta 7 the full path was not needed. It still is not needed with beta 5 or with beta 6 - I tested with them after the problems with beta 7.
I have many other betas and finals I could test with too - they all are still ready to be launched. But they all used to work fine without the full path.
RayMark
Seasoned User
Seasoned User
 
Posts: 468
Joined: Sat Jul 21, 2007 10:40 pm

Registered Newsbin User since: 07/21/07

Re: multiple instances of 6.80 beta 7

Postby Quade » Wed Sep 06, 2017 7:23 am

If I use the full path - it works fine and the correct .nbi file is taken. So something happened to beta 7. I don't even know where it takes the other .nbi file location from, not from the registry, because I set it to some bogus value - no difference.


You were depending on a "feature" that was just an accident. It just happened to work. Keeping the EXE's in any folders except "Program Files" is a mistake. You only need one set of EXE's to run multiple instances or N sets of you want to run multiple versions.

I don't even know what "FAR" is so, I'm probably not the person to ask. The normal way you do this is two different shortcuts with 2 different command lines. Then you just invoke the shortcut instead of the EXE.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 45009
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: multiple instances of 6.80 beta 7

Postby RayMark » Wed Sep 06, 2017 9:24 am

OK. Thanks. I have multiple .exe files in their own folders because of different builds of NewsBin. Each build has its own .exe and also a couple of .dll files specific to the build, other files - the same.
So now they have also identical .bat files in each build's folder.

FAR to me = GUI of OS, no less (even though it mimics the look and feel of DOS text mode Norton Commander). I do absolutely everything from FAR and in no other way. I run simultaneously maybe 5 or more instances of FAR at all times.
I know, some people use Total Commander instead, but it is just too windows-y for me, and probably not flexible enough because I know people who switched to FAR because they needed some FAR plugins
I never use Explorer or shortcuts and I never see the desktop so if shortcuts are on the desktop it's like they do not even exist.
RayMark
Seasoned User
Seasoned User
 
Posts: 468
Joined: Sat Jul 21, 2007 10:40 pm

Registered Newsbin User since: 07/21/07


Return to Newsbin Version 6 Beta Support

Who is online

Users browsing this forum: Google [Bot] and 18 guests