Alzy / obs-midi

Use MIDI devices to trigger events in OBS and visa versa
GNU General Public License v2.0
94 stars 37 forks source link

Not loading "saves" when OBS opens #45

Closed Keytarpaul closed 3 years ago

Keytarpaul commented 3 years ago

Needs a "LOAD" option. In the meantime is there anyway I can Restore the Midi Controls I "Saved" Using latest OBS version

Keytarpaul commented 3 years ago

Just installed latest version of OBS-Midi - eec353f

No Difference - any suggestions?

Alzy commented 3 years ago

Midi settings are automatically saved to the OBS config file when the midi assign window is closed. The settings are loaded when OBS is opened. Load button is unnecessary.

Keytarpaul commented 3 years ago

Most times - not always. I saw mention of "memory leaks"? ( over my head - I'm not a programer) No worries - I just over-write the 2kb basic.ini with the 372kb basic.ini I've saved until the new improved version is finished. Works a treat....78^)

On Mon, Dec 14, 2020 at 11:32 PM Alzy notifications@github.com wrote:

Midi settings are automatically saved to the OBS config file when the midi assign window is closed. The settings are loaded when OBS is opened. Load button is unnecessary.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Alzy/obs-midi/issues/45#issuecomment-745045367, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASBAB5VHXDOOMEDWD7AWJUDSU3RGHANCNFSM4UQUBX7Q .

EdKolcz commented 3 years ago

I've run into the same issue however, I've saved and restored the basic.ini file like Keytarpaul but the Configuration still comes up empty. In fact, I've saved and restored the entire OBS-Studio folder and the Configuration still comes up empty. However if I look into the contents of basic.ini, all the definitions are there. I'm forced to recreate the Configuration which in my case is a very time-consuming process. The only difference I've been able to see between different basic.ini versions I've kept as backups and compared those that work and those that don't is the CookieId values.

Perhaps this might give you a clue as to what's causing the problem: Here are the steps in the order I took them.
1) In OBS, I created all the 'scenes' I need but without any 'sources'. The reason being, I haven't got all the 'sources' available at the time. But at least the 'scenes' are there so I have something to refer to when I build the OBS-MIDI configuration. 2) Build the Configuration and save the basic.ini file by copying it to another name. 3) Several hours later, I had my 'sources' available and start inserting them into the 'scenes' 4) I go to my program that will be issuing the MIDI commands and nothing happens in OBS. 5) In OBS, I go into the OBS-MIDI configuration and it comes up empty, yet, when I look in the basic.ini file, all my definitions are there. 6) At this point I'm quite puzzled as to why they're not showing up in the configuration so I shut down OBS, restore my saved basic.ini file and try again. Again, configuration comes up empty. 7) Now I'm forced to rebuild the configuration. When done, I took a look in the basic.ini file and all my definitions are there and all is well and working. The only difference between the one I just created and the one I previously saved is the CookieId. 8) Sometime later....hours or days....I start OBS again. I've gotten into the habit of checking to make sure the configuration is there. Sometimes it;s ok and sometimes it's empty again. I restore the last 'good' basic.ini I know was working and the configuration still comes up empty yet, the basic.ini file has all my definitions in it.

Can you please take a look at this? I've got a show on Saturday where I need to make sure I'm not forced to rebuild the configuration. I've got approx 40 scene changes I need to make and rebuilding the configuration is VERY time consuming because of the other 'quirks' that OBS-MIDI has where I have to manually change the control type from fader to button and assign each Setcurrentscene and other 'quirks' that exist.

I love the OBS-MIDI interface much better than other solutions like MIDIKEY2KEY as in reduces the overall complexity but I can't live with not knowing my configuration might be empty. The other quirks that exist I can live with for now but not loosing the configuration.

I hope the information I provided may help you narrow down what's causing the problem.

Forgot to mention....from time to time, OBS crashes. After a crash, the configuration might be empty again but not always. Because I'm on a bit of a tight timeline, I haven't had the opportunity to document in detail exactly OBS is crashing or why.

Thanks! Ed

Alzy commented 3 years ago

Thanks @EdKolcz that was very helpful. I think I'll take a stab at patching the bug. It might have something to do with the memory leaks issue we have or the fact that a new version of OBS has been released and might have something that breaks the functionality. Please do not wait on me for Saturday's show though as I have a busy schedule these and don't have a lot of time to maintain the project. But I'll push an update soon

EdKolcz commented 3 years ago

Hi Alzy,

Wow! Thanks for the personal reply. I didn't expect that.

As it turns out, I just found out the our show this weekend has been postponed for at least a week. A cast member and one of the production staff just tested positive for Covid. Now that my time constraint has been relieved a bit, it will give me more time to see if I can narrow down when/where the problem is occurring..

Interesting that you mentioned the OBS update. I ran into this problem before the update but was always able to successfully restore the basic.ini file from a backup but now that you mentioned the OBS update it got me thinking that maybe that affected the ability to restore the basic.ini file.

A couple other things I tried which I didn't mention in my original posting, I was thinking maybe OBS or the plugin was storing some data in temporary file so I deleted all the temporary files but
the problem still occurred. So I went a step further by rebooting the PC to clear out memory. Problem still occurred. Then I tried one more step by performing a Windows 10 Update. Come to find out Windows 10 was way behind on updates.....probably around a year because that process took about an hour.
The PC is relatively new...less than a year old, has a I5 processor and an SSD drive. I suspect that when it was purchased, they never performed an initial update. Anyway, after all that I tried restoreing the basic.ini file again but without success.

The only thing I didn't try was powering off the PC. It's unlikely but maybe memory wasn't completely cleared with just a reboot.

I hope this extra information help to at least eliminate what is NOT causing the problem.

I'm not a PC person however I used to be in the IT business for 30 years but worked on IBM Mainframes all that time. Have encountered some really strange problems over the years. in one case, a reboot or even a power off didn't clear up a problem. Turned out to be a microcode problem. (The PC equivalent is the BIOS). Regardless, microcode bugs were so rare it was the absolute last place to try and discover a problem. PC;s etc on the other hand are completely different animals when it comes to how the hardware, operating system and programs are designed and terminology to describe similar functions are different but in the end, a bit is still a bit, and a byte is still a byte.

Hope this extra info helps.

Again, thank you for the personal reply. I certainly didn't expect it.

Ed .

----- Original Message ----- From: Alzy notifications@github.com Reply-To: Alzy/obs-midi reply@reply.github.com To: Alzy/obs-midi obs-midi@noreply.github.com Cc: EdKolcz kolcz@earthlink.net, Mention mention@noreply.github.com Sent: 12/18/2020 4:53:29 PM Subject: Re: [Alzy/obs-midi] Not loading "saves" when OBS opens (#45)

Thanks @EdKolcz that was very helpful. I think I'll take a stab at patching the bug. It might have something to do with the memory leaks issue we have or the fact that a new version of OBS has been released and might have something that breaks the functionality. Please do not wait on me for Saturday's show though as I have a busy schedule these and don't have a lot of time to maintain the project. But I'll push an update soon — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Alzy commented 3 years ago

@Keytarpaul @EdKolcz What devices are you guys running OBS on? I'm curious because I tried to replicate the issue on my computer but I can't get it to happen.. I know that the bug is there because otherwise people wouldn't be posting about it but I think I need a better picture as to what triggers this in the first place. Do one of you think you can narrow it down to a repeatable set of steps that for sure trigger it to occur? I mean the bare minimum amount of steps that seem to trigger the issue

Keytarpaul commented 3 years ago

I am on a Windoz 10 pro latest update - I7 - 16 GB ram - NVidia Graphics Card. My Config is retained on OBS restart unless it crashes. But I CAN restore it TO: User/WHATEVER/AppData/Roaming/obs-studio/basic/profiles/WHATEVER/basic.ini - and it loads when I open OBS again.

I use Midi Note OFF to switch scenes. If I do it too quickly with a green screen cam - BG images and video it will crash and not be there when it reopens. I also have OBS-ASIO loaded for every scene.

EdKolcz commented 3 years ago

Hi Alzy,

The computer is an HP desktop Elitedesk 800 G2 TWR which is at the studio.
Unfortunately, I'm not planning on going there for a few days (because of Covid issue I mentioned) but the problem has happened to me at home on my laptop but I've always been able to restore from a backup of the basic.ini file.

I'm running a Dell Latitude E6410 laptop. It's a bit on the older side. I think its a 2nd generation I5 processor with 8gig memory.

As I mentioned, the disappearing MIDI configuration has happened to me at home also but I haven't tried it yet since updating OBS to the latest version.

I just purchased myself a brand new DELL XPS laptop 9th gen I7 but I just took it out of the box and in the initial stages of setting it up. I hope to have that done in a couple days. LOTS of files to move, software to install, etc. and get it going for day-to-day use.

Normally I would like to have the ability to build a show at home and then copy/move it to the HP at the studio but I'm not familiar enough with OBS to know what things to copy and what sort of things I might need to account for with different directory paths, hardware, etc. I also haven't experimented with OBS's Export/Import facility to see if it would account for those differences by making dynamic directory paths, etc

I will try to see if I can get it to fail here at home.

FYI- Both systems are up-to-date as far as Windows, OBS, etc goes. Of course because my laptop is a bit older and a Dell and the studio is an tower HP, drivers are going to be different, etc

Also, the software I'm using to send the MIDI commands from is called Multiplay. It's freeware and basically a PC version of QLAB (for a Mac). Been using it for years and I know it sends the MIDI commands properly as I can see what it's sending out via MIDI-OX. Besides, when the OBS-MIDI configuration does work, it works very well even with the few quirks that is has.

I did run into another issue with either OBS or OBS-MIDI (haven't determined which) where OBS doesn't recognize more than around 34 or so MIDI commands. The last show I configured, I needed 45 scene changes. They were all defined in OBS-MIDI but OBS didn't respond to any of those beyond 35 or so.
Don't remember the exact number but if I had to guess, it might be 32 as that happens to be (2) 16 bit bytes.

There's a user on the OBS forum named 'cpyarger' who has also been tweaking OBS- MIDI from time to time.
He's aware of the problem but is stumped. He did mention your name as being the original author of OBS-MIDI. From what I understand, he's in the process of re-writing OBS-MIDI.
Here's a link to that thread were the configuration problem is discussed https://obsproject.com/forum/threads/obs-midi.125232/page-5

I'll play around with OBS-MIDI on my current laptop over the next couple days and see if I can get it to fail the same way.

Thanks! Ed

----- Original Message ----- From: Alzy notifications@github.com Reply-To: Alzy/obs-midi reply@reply.github.com To: Alzy/obs-midi obs-midi@noreply.github.com Cc: EdKolcz kolcz@earthlink.net, Mention mention@noreply.github.com Sent: 12/18/2020 9:14:09 PM Subject: Re: [Alzy/obs-midi] Not loading "saves" when OBS opens (#45)

@Keytarpaul @EdKolcz What devices are you guys running OBS on? I'm curious because I tried to replicate the issue on my computer but I can't get it to happen.. I know that the bug is there because otherwise people wouldn't be posting about it but I think I need a better picture as to what triggers this in the first place. Do one of you think you can narrow it down to a repeatable set of steps that for sure trigger it to occur? I mean the bare minimum amount of steps that seem to trigger the issue — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Alzy commented 3 years ago

@EdKolcz just pushed an update that fixes an issue where switching user profiles causes OBS to crash. This also fixes some memory leaks that happen when OBS closes. This MIGHT fix the issue you're having as it's maybe responsible for the config file fucking up. And yes, I am the original author of the plugin. cpyarger joined me a couple days after I started and we built this plugin pretty quickly. It was a learning experience for sure as we were both pretty rusty in our C++ skills. Unfortunately I became super busy following the first release and haven't had a lot of time to dedicate to maintain the project. I wish I could but it's just not financially feasible for me at the moment.. Anyway I'm here now doing some maintenance work on the project. The project pipelines successfully compiled Linux and Windows builds of the plugin though I'm not sure how to push that release onto here. I'll leave it to cpyarger to push it when he's ready

EdKolcz commented 3 years ago

WOW! Thank you for looking into this so quickly.

I'd like to try the update but I must admit, I am clueless with how to install the update. I am totally unfamiliar with how open source projects are maintained and how updates are kept track of. There's so much unfamiliar terminology to me in GitHub.

If you could please provide a list of steps I need to install the update? I would appreciate it very much.

I'm assuming the term "commit" describes the 'version' of the base part of the program. If that's correct, the commit I have is 9b46f4f

Thank you! Ed

----- Original Message ----- From: Alzy notifications@github.com Reply-To: Alzy/obs-midi reply@reply.github.com To: Alzy/obs-midi obs-midi@noreply.github.com Cc: EdKolcz kolcz@earthlink.net, Mention mention@noreply.github.com Sent: 12/19/2020 4:09:38 AM Subject: Re: [Alzy/obs-midi] Not loading "saves" when OBS opens (#45)

@EdKolcz just pushed an update that fixes an issue where switching user profiles causes OBS to crash. This also fixes some memory leaks that happen when OBS closes. This MIGHT fix the issue you're having as it's maybe responsible for the config file fucking up. And yes, I am the original author of the plugin. cpyarger joined me a couple days after I started and we built this plugin pretty quickly. It was a learning experience for sure as we were both pretty rusty in our C++ skills. Unfortunately I became super busy following the first release and haven't had a lot of time to dedicate to maintain the project. I wish I could but it's just not financially feasible for me at the moment.. Anyway I'm here now doing some maintenance work on the project. The project pipelines successfully compiled Linux and Windows builds of the plugin though I'm not sure how to push that release onto here. I'll leave it to cpyarger to push it when he's ready — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

EdKolcz commented 3 years ago

Hi Alzy,

I may have discovered something.....these notes are before your recent fixes as I'm awaiting your guidance on how to install the fixes.

I created a new Configuration, saved it, and closed my way out of OBS-Studio. Restarted OBS-Studio and went back into the Configuration, my MIDI definitions are there. I close my way out again, restart OBS-Studio, go back in again and my MIDI definitions are still there. At this point I made copies of basic.ini (profile folder) and scene collection json (scene collection folder).

However...

If I close the Configuration window by "X"-ing my out instead of performing a SAVE, then come back into the Configuration window, it's messed up. i.e. I lost what I defined and some other definitions are there.
I shutdown OBS. deleted the basic.ini and scene collection json and restored both from the backup copies I made (above). I restarted OBS and this time the Confirguration window is completely empty!!

A couple other notes: (all these are very inconsistent)

Anyway, just thought I'd let you know. Hopefully these issues won't occur after your fixes.

Thanks...Ed

----- Original Message ----- From: Alzy notifications@github.com Reply-To: Alzy/obs-midi reply@reply.github.com To: Alzy/obs-midi obs-midi@noreply.github.com Cc: EdKolcz kolcz@earthlink.net, Mention mention@noreply.github.com Sent: 12/19/2020 4:09:38 AM Subject: Re: [Alzy/obs-midi] Not loading "saves" when OBS opens (#45)

@EdKolcz just pushed an update that fixes an issue where switching user profiles causes OBS to crash. This also fixes some memory leaks that happen when OBS closes. This MIGHT fix the issue you're having as it's maybe responsible for the config file fucking up. And yes, I am the original author of the plugin. cpyarger joined me a couple days after I started and we built this plugin pretty quickly. It was a learning experience for sure as we were both pretty rusty in our C++ skills. Unfortunately I became super busy following the first release and haven't had a lot of time to dedicate to maintain the project. I wish I could but it's just not financially feasible for me at the moment.. Anyway I'm here now doing some maintenance work on the project. The project pipelines successfully compiled Linux and Windows builds of the plugin though I'm not sure how to push that release onto here. I'll leave it to cpyarger to push it when he's ready — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

EdKolcz commented 3 years ago

HI Alzy, How can I apply this fix? I'm totally clueless on what to do. Could you please provide the steps I need to take? Thank you! Ed

Alzy commented 3 years ago

@EdKolcz The pipeline we have setup to automatically build for all platforms isn't working for MacOS so it is not generating a release until we fix that. I've been reaching out for help on the OBS discord server but it looks like I'm largely on my own to figure that out.. Once it's fixed a new release will be available.

EdKolcz commented 3 years ago

HI Alzy, Hope you had a great holiday season. I'm sure you probably haven't had much time to deal with this. Just curious,, were you able to make any progress on implementing your fixes? I'm not real familiar with what to look for in Github when an update occurs. Perhaps you already did and I just don't know what to look for. I'm eager to test your fixes to see if it clears up the problem. Thanks! Ed

Alzy commented 3 years ago

@EdKolcz Hey Ed! Thank you and I hope you had a great holiday season as well! I haven't gotten to figure out how to fix the darn Mac OS pipeline error that's preventing the release from going through.. I can build the windows version locally and send you the files that way if you'd like. You would have to install the plugin manually in that case

EdKolcz commented 3 years ago

Hi Alzy, That would be great if you could do that and it's not any trouble. I'm assuming it would just be matter of replacing a couple files? I don't see a way to reply to you privately here so my email address is: kolcz at earthlink dot net

FYI- my email address has a spamblocker and you will received an automated reply requesting permission to send email to me. You can ignore the automated reply. I will look in my spam folder manually. You won't need to send it a 2nd time.

Thanks! Looking forward to trying it out.

EdKolcz commented 3 years ago

HI Alzy, no pressure.....just curious if you tried sending me the windows version. I haven't seen anything in my spamblocker folder and just wondering if you had an error with email. Thanks! Ed

Keytarpaul commented 3 years ago

I would like to try it as well! avnorth@gmail.com

Thank You!

Alzy commented 3 years ago

@Keytarpaul @EdKolcz thanks for reminding me about this. I built the patch manually, you can download it here:

https://github.com/Alzy/obs-midi/releases/tag/2021.win.patch

Keytarpaul commented 3 years ago

Sorry to trouble - download link is not working.

HTTP ERROR 406

Alzy commented 3 years ago

@Keytarpaul @EdKolcz I fixed the pipeline issue. Newer release has been published which also includes Mac an Linux builds.

EdKolcz commented 3 years ago

HI Alzy, I'm a little confused where I can get the updates. I'm on the OBS-Midi Releases page https://github.com/Alzy/obs-midi/releases/tag/v0.1.0 but I'm not sure which one of these to download. FYI- I'm not familiar with how Github works and how things are documented within it. Thanks....Ed

Keytarpaul commented 3 years ago

I chose the ZIp file - extracted it and copied the folders to C: Program Files (x86)/obs-studio/ I would guess the .exe does the same thing but I'm not sure - I'm not a programmer.

EdKolcz commented 3 years ago

Thanks Keytarpaul.....but which zip file did you use?

Keytarpaul commented 3 years ago

Hmm...I found obs-midi-f6f9e21-Windows.zip which was dated later than the 1st version I installed. Maybe I need to update to latest version (by number) obs-midi-win64-0.1.3.zip

EdKolcz commented 3 years ago

I had obs-midi-win64-0.1.3.zip installed when I was experiencing the SAVE issue. I'm having difficulty finding the one that Alzy updated with his fixes. Perhaps we need to wait for Alzy to reply. I'm not a programmer either although I do have a background in I.T. but on IBM Mainframes. Patch (fix) management procedures are totally different and I'm having difficulty understanding how updates are managed in Github.

Alzy commented 3 years ago

@Keytarpaul @EdKolcz https://github.com/Alzy/obs-midi/releases/tag/20210109.1

EdKolcz commented 3 years ago

Thank you. Will give it a try. The non-loading of saved midi config didn't always occur. Sometimes worked, sometimes not.....so it may take some time to discover if the fix is helpful.

EdKolcz commented 3 years ago

HI Alzy,

I tried the updates you provided last night. It's working a little better but there still are issues. Just going off the top of my head as I was a little pressed for time last night so I didn't get a change to document every step I took. .

So whatever is happening, it's not consistent. Sometimes everything works properly and sometimes not. So, I've gotten into the habit of making a backup copy of OBS folder in AppData before making any changes. However, if I make no changes in the MIDI definitions (even if I go in there just to verify everything is ok), everything works. I tried that several times and each time it's OK. It seems the MIDI definitions disappear unexpectedly only after making any changes to them.....but again, it's not consistent.

One other peculiarity I discovered.......I didn't write down exactly when this occurs.....but there are times when there are 2-4 OBS icons shown (and OBS is not running) when I select the arrow to show the hidden icons (lower right corner of the task bar). If I simply move my mouse over then, they all disappear. I don't know if the 'leftover' icons are there only after OBS crashes. I didn't keep track. Anyway, something strange is going on with the OBS-MIDI plugin or the way it's communicating with OBS itself as sometimes it crashes and at other times it just 'hangs' when EXITing OBS. Yet, at other times, everything works fine.

I have the LOG and CRASHES files if you think that might help.

Ed

cpyarger commented 3 years ago

The new latest release is out, Old Mappings will no longer work, so you will need to delete them from your basic.ini file. The latest version can be found here, https://github.com/cpyarger/obs-midi/releases/latest can you please let me know if the issues persist in the new version?