projectM-visualizer / projectm

projectM - Cross-platform Music Visualization Library. Open-source and Milkdrop-compatible.
https://discord.gg/mMrxAqaa3W
GNU Lesser General Public License v2.1
3.36k stars 375 forks source link

Rendering freeze after preset change #243

Closed AlwinEsch closed 4 years ago

AlwinEsch commented 5 years ago

It stays on BackgroundWorkerSync::wait_for_bg_to_finish() and does not become the signal: https://github.com/projectM-visualizer/projectm/blob/master/src/libprojectM/BackgroundWorker.h#L43

Initially thought that it had to do with p8-platform removal and its conversion to std::unique_lock<std::mutex>, but even after this was removed from the Kodi addon came also the freeze, only then could the transfer of the audio stream continue to work. But the GL rendering got stuck.

Changed also temporary the Signal way to the C++11 way (http://www.cplusplus.com/reference/condition_variable/condition_variable/notify_all/) on BackgroundWorker.h but still brought the freeze.

I think somewhere becomes the void finished_work() call not done. Only ~1-2% of all test runs has worked without a freeze.

Unfortunately, my experience with the Lib is not good enough to directly recognize what the trigger is. Also error occurred with all existing * .milk files.

Error related to Kodi addon: https://github.com/xbmc/visualization.projectm

Fault on Linux 64bit (Ubuntu 19.04) with GL.

Command Line output direct before freeze:

[PresetFactory] url is /home/alwin/.kodi/addons/visualization.projectm//resources/projectM/presets/Bmelgren & Krash - Rainbow Orb Peacock (Unknowable Mix 5).milk
[PresetFactory] url is /home/alwin/.kodi/addons/visualization.projectm//resources/projectM/presets/Bmelgren & Unchained - Effort (Remix) - the city of glass that i live in, the coldness from my brother's skin nz+.milk
Successfull compilation of Warp
Successfull compilation of Comp

Backtrace:

#0  0x00007ffff7f8b3bb in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fffa86e61a0 <worker_sync+128>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  0x00007ffff7f8b3bb in __pthread_cond_wait_common (abstime=0x0, mutex=0x7fffa86e6120 <worker_sync>, cond=0x7fffa86e6178 <worker_sync+88>) at pthread_cond_wait.c:502
#2  0x00007ffff7f8b3bb in __pthread_cond_wait (cond=cond@entry=0x7fffa86e6178 <worker_sync+88>, mutex=mutex@entry=0x7fffa86e6120 <worker_sync>) at pthread_cond_wait.c:655
#3  0x00007fffa861997b in BackgroundWorkerSync::wait_for_bg_to_finish() (this=0x7fffa86e6120 <worker_sync>) at BackgroundWorker.h:43
#4  0x00007fffa861997b in projectM::renderFrameOnlyPass1(Pipeline*) (this=this@entry=0x5555590de9d0, pPipeline=pPipeline@entry=0x7fffffffd700) at projectM.cpp:396
#5  0x00007fffa861cba7 in projectM::renderFrame() (this=0x5555590de9d0) at projectM.cpp:310
#6  0x00007fffa8603d05 in CVisualizationProjectM::Render() (this=0x5555590e22b0) at /home/alwin/Development/Kodi/_Addons/bbb/visualization/visualization.projectm/src/Main.cpp:127
#7  0x00007fffa86069f0 in kodi::addon::CInstanceVisualization::ADDON_Render(AddonInstance_Visualization const*) (addon=0x5555594b7270)
    at /home/alwin/Development/Kodi/_Addons/bbb/visualization/visualization.projectm/build/build/depends/include/kodi/addon-instance/Visualization.h:694
#8  0x00005555562efca8 in CGUIVisualisationControl::Render() ()
#9  0x00005555562737de in CGUIControl::DoRender() ()
#10 0x00005555562845c6 in CGUIControlGroup::Render() ()
#11 0x00005555562737de in CGUIControl::DoRender() ()
#12 0x00005555562f65f4 in CGUIWindow::DoRender() ()
#13 0x00005555562fc535 in CGUIWindowManager::RenderPass() const ()
#14 0x00005555562fc920 in CGUIWindowManager::Render() ()
#15 0x00005555564a8b2d in CApplication::Render() ()
#16 0x0000555556555863 in CXBApplicationEx::Run(CAppParamParser const&) ()
#17 0x00005555561c524e in XBMC_Run ()
#18 0x0000555555c03075 in main ()
ghost commented 5 years ago

Interesting this is broken for you. What is the architecture? The projectm system compiled with opengles for windows store without issue. I will rebuild with latest codebase and retest/update built-in presets. Are you developing the projectm add-in? I’m happy to help.

If you are curious to contribute to this repo, that is awesome.

On Oct 1, 2019, at 4:42 PM, Alwin Esch notifications@github.com wrote:

It stays on BackgroundWorkerSync::wait_for_bg_to_finish() and does not become the signal: https://github.com/projectM-visualizer/projectm/blob/master/src/libprojectM/BackgroundWorker.h#L43

Initially thought that it had to do with p8-platform removal and its conversion to std::unique_lock, but even after this was removed from the Kodi addon came the freeze, only then could the transfer of the audio stream continue to work. But the GL rendering got stuck.

Chnaged also temporary the Signal way to the C++11 way (http://www.cplusplus.com/reference/condition_variable/condition_variable/notify_all/) on BackgroundWorker.h but still brought the freeze.

I think somewhere becomes the void finished_work() call not done. Only ~1-2% of all test runs has worked without a freeze.

Unfortunately, my experience with the Lib is not good enough to directly recognize what the trigger is. Also error occurred with all existing * .milk files.

Error related to Kodi addon: https://github.com/xbmc/visualization.projectm

Command Line output direct before freeze:

[PresetFactory] url is /home/alwin/.kodi/addons/visualization.projectm//resources/projectM/presets/Bmelgren & Krash - Rainbow Orb Peacock (Unknowable Mix 5).milk [PresetFactory] url is /home/alwin/.kodi/addons/visualization.projectm//resources/projectM/presets/Bmelgren & Unchained - Effort (Remix) - the city of glass that i live in, the coldness from my brother's skin nz+.milk Successfull compilation of Warp Successfull compilation of Comp Backtrace:

0 0x00007ffff7f8b3bb in futex_wait_cancelable (private=, expected=0, futex_word=0x7fffa86e61a0 <worker_sync+128>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88

1 0x00007ffff7f8b3bb in __pthread_cond_wait_common (abstime=0x0, mutex=0x7fffa86e6120 , cond=0x7fffa86e6178 <worker_sync+88>) at pthread_cond_wait.c:502

2 0x00007ffff7f8b3bb in __pthread_cond_wait (cond=cond@entry=0x7fffa86e6178 <worker_sync+88>, mutex=mutex@entry=0x7fffa86e6120 ) at pthread_cond_wait.c:655

3 0x00007fffa861997b in BackgroundWorkerSync::wait_for_bg_to_finish() (this=0x7fffa86e6120 ) at BackgroundWorker.h:43

4 0x00007fffa861997b in projectM::renderFrameOnlyPass1(Pipeline*) (this=this@entry=0x5555590de9d0, pPipeline=pPipeline@entry=0x7fffffffd700) at projectM.cpp:396

5 0x00007fffa861cba7 in projectM::renderFrame() (this=0x5555590de9d0) at projectM.cpp:310

6 0x00007fffa8603d05 in CVisualizationProjectM::Render() (this=0x5555590e22b0) at /home/alwin/Development/Kodi/_Addons/bbb/visualization/visualization.projectm/src/Main.cpp:127

7 0x00007fffa86069f0 in kodi::addon::CInstanceVisualization::ADDON_Render(AddonInstance_Visualization const*) (addon=0x5555594b7270)

at /home/alwin/Development/Kodi/_Addons/bbb/visualization/visualization.projectm/build/build/depends/include/kodi/addon-instance/Visualization.h:694

8 0x00005555562efca8 in CGUIVisualisationControl::Render() ()

9 0x00005555562737de in CGUIControl::DoRender() ()

10 0x00005555562845c6 in CGUIControlGroup::Render() ()

11 0x00005555562737de in CGUIControl::DoRender() ()

12 0x00005555562f65f4 in CGUIWindow::DoRender() ()

13 0x00005555562fc535 in CGUIWindowManager::RenderPass() const ()

14 0x00005555562fc920 in CGUIWindowManager::Render() ()

15 0x00005555564a8b2d in CApplication::Render() ()

16 0x0000555556555863 in CXBApplicationEx::Run(CAppParamParser const&) ()

17 0x00005555561c524e in XBMC_Run ()

18 0x0000555555c03075 in main ()

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

AlwinEsch commented 5 years ago

Is on Linux 64bit (Ubuntu 19.04) with GL4.

EDIT: I'm not sure if this pthread also used on windows (normally a POSIX part).

revmischa commented 5 years ago

More info on this code change here https://github.com/projectM-visualizer/projectm/pull/149 and here https://github.com/projectM-visualizer/projectm/issues/147

AlwinEsch commented 5 years ago

Checked now also on other OS's

There it has worked without frezzes.

On my Linux system is it "Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz" maybe related to the performance and thats why on some places/CPU's works normal?

EDIT: So that possibly one place is faster through before the other has registered?

AlwinEsch commented 5 years ago

Any news about them?

mbellew commented 5 years ago

I updated https://github.com/xbmc/visualization.projectm/issues/29 (because I got confused which thread I was on). My hunch, which I can't prove, because I don't have an environment to repro, is that the application is calling libprojectm on multiple threads. Of course, there could be a bug in my updates, but my experience was that projectMSDL became much more stable.

mbellew commented 5 years ago

The bug here is with creating and destroying multiple projectM objects. We init/clear the synchronization globals along with init/delete of class projectM even though they are not members. (it has always been like that). I don't know which bit exactly goes wrong, but I don't think we test this. All the test apps create one projectM class and keep it around for the life of the app. It's easy to see that this won't work:

A = new projectM(); B = new projectM() delete A do anything....

We should be consistent about treating these variables as globals OR make them actual members of the class.

Replacing m_projectM in the kodi addon code with a global so that it stops creating and deleting instances, fixes the hangs.

mbellew commented 5 years ago

A little more investigation seems to indicate that not overlapping new/delete seems to work OK. e.g.

A = new projectM(); .. render delete A B = new projectM() .. render delete B

Albinoman887 commented 4 years ago

@mbellew

The bug here is with creating and destroying multiple projectM objects. We init/clear the synchronization globals along with init/delete of class projectM even though they are not members. (it has always been like that). I don't know which bit exactly goes wrong, but I don't think we test this. All the test apps create one projectM class and keep it around for the life of the app. It's easy to see that this won't work:

A = new projectM(); B = new projectM() delete A do anything....

We should be consistent about treating these variables as globals OR make them actual members of the class.

Replacing m_projectM in the kodi addon code with a global so that it stops creating and deleting instances, fixes the hangs.

How would I add this global to the Kodi add-on. I so I can give it a test ? Is this a correct fix or more of a "hack" ?

labkey-matthewb commented 4 years ago

I think you'd just make the member m_projectM static. Then either only allocate once ever. Or maybe keep a count of the number of instances of CVisualizationProjectM and only allocate/free the projectM instance when going from 0->1 or 1->0.

Albinoman887 commented 4 years ago

I have a general idea of what I need to do but still confused . Could you explain further ? I think I need to move m_peojectm out of the first function listed and move it above it but I don't know the format or syntax .is it an int or a bool or string ? And I'm assuming I don't have to assign it a value just declare it ?

Albinoman887 commented 4 years ago

A little more investigation seems to indicate that not overlapping new/delete seems to work OK. e.g.

A = new projectM(); .. render delete A B = new projectM() .. render delete B

@mbellew

Ok i tried to not be that guy but i cant figure this out? can you just show me what you did? i want to ssee if this fixes my issue

Albinoman887 commented 4 years ago

Interesting this is broken for you. What is the architecture? The projectm system compiled with opengles for windows store without issue. I will rebuild with latest codebase and retest/update built-in presets. Are you developing the projectm add-in? I’m happy to help. If you are curious to contribute to this repo, that is awesome. On Oct 1, 2019, at 4:42 PM, Alwin Esch @.> wrote: It stays on BackgroundWorkerSync::wait_for_bg_to_finish() and does not become the signal: https://github.com/projectM-visualizer/projectm/blob/master/src/libprojectM/BackgroundWorker.h#L43 Initially thought that it had to do with p8-platform removal and its conversion to std::unique_lock, but even after this was removed from the Kodi addon came the freeze, only then could the transfer of the audio stream continue to work. But the GL rendering got stuck. Chnaged also temporary the Signal way to the C++11 way (http://www.cplusplus.com/reference/condition_variable/condition_variable/notify_all/) on BackgroundWorker.h but still brought the freeze. I think somewhere becomes the void finished_work() call not done. Only ~1-2% of all test runs has worked without a freeze. Unfortunately, my experience with the Lib is not good enough to directly recognize what the trigger is. Also error occurred with all existing .milk files. Error related to Kodi addon: https://github.com/xbmc/visualization.projectm Command Line output direct before freeze: [PresetFactory] url is /home/alwin/.kodi/addons/visualization.projectm//resources/projectM/presets/Bmelgren & Krash - Rainbow Orb Peacock (Unknowable Mix 5).milk [PresetFactory] url is /home/alwin/.kodi/addons/visualization.projectm//resources/projectM/presets/Bmelgren & Unchained - Effort (Remix) - the city of glass that i live in, the coldness from my brother's skin nz+.milk Successfull compilation of Warp Successfull compilation of Comp Backtrace: #0 0x00007ffff7f8b3bb in futex_wait_cancelable (private=, expected=0, futex_word=0x7fffa86e61a0 <worker_sync+128>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88 #1 0x00007ffff7f8b3bb in __pthread_cond_wait_common (abstime=0x0, mutex=0x7fffa86e6120 , cond=0x7fffa86e6178 <worker_sync+88>) at pthread_cond_wait.c:502 #2 0x00007ffff7f8b3bb in __pthread_cond_wait **@.=0x7fffa86e6178 <worker_sync+88>, @.=0x7fffa86e6120 ) at pthread_cond_wait.c:655 #3 0x00007fffa861997b in BackgroundWorkerSync::wait_for_bg_to_finish() (this=0x7fffa86e6120 ) at BackgroundWorker.h:43 #4 0x00007fffa861997b in projectM::renderFrameOnlyPass1(Pipeline*) @.=0x5555590de9d0, @.=0x7fffffffd700) at projectM.cpp:396 #5 0x00007fffa861cba7 in projectM::renderFrame() (this=0x5555590de9d0) at projectM.cpp:310 #6 0x00007fffa8603d05 in CVisualizationProjectM::Render() (this=0x5555590e22b0) at /home/alwin/Development/Kodi/_Addons/bbb/visualization/visualization.projectm/src/Main.cpp:127 #7 0x00007fffa86069f0 in kodi::addon::CInstanceVisualization::ADDON_Render(AddonInstance_Visualization const*) (addon=0x5555594b7270) at /home/alwin/Development/Kodi/_Addons/bbb/visualization/visualization.projectm/build/build/depends/include/kodi/addon-instance/Visualization.h:694 #8 0x00005555562efca8 in CGUIVisualisationControl::Render() () #9 0x00005555562737de in CGUIControl::DoRender() () #10 0x00005555562845c6 in CGUIControlGroup::Render() () #11 0x00005555562737de in CGUIControl::DoRender() () #12 0x00005555562f65f4 in CGUIWindow::DoRender() () #13 0x00005555562fc535 in CGUIWindowManager::RenderPass() const () #14 0x00005555562fc920 in CGUIWindowManager::Render() () #15 0x00005555564a8b2d in CApplication::Render() () #16 0x0000555556555863 in CXBApplicationEx::Run(CAppParamParser const&) () #17 0x00005555561c524e in XBMC_Run () #18 0x0000555555c03075 in main () — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

@coast77777777777

hey man, i'm not a official maintainer of the add-on but i know my way around the kodi source and have played around with other addons before... drop me a line at matt.filetto@gmail.com i'm down

mbellew commented 4 years ago

I have a little airplane time this weekend. I was hoping to try to put together a patch.

Albinoman887 commented 4 years ago

That would be great . I spent a long time last night messing with it. I got it building but i don't think I did it correctly.

On Sat, Nov 9, 2019, 7:41 AM mbellew notifications@github.com wrote:

I have a little airplane time this weekend. I was hoping to try to put together a patch.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/projectM-visualizer/projectm/issues/243?email_source=notifications&email_token=AAIDAOJPNSBSFGUIYWIJAKLQS3K3HA5CNFSM4I4OTE4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDUIZ5I#issuecomment-552111349, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIDAOOBY77FBBFZM5UTSZDQS3K3HANCNFSM4I4OTE4A .

Albinoman887 commented 4 years ago

holy shit the commenting on different issues is starting to confuse the hell out of me. lets all agree to stay on this one lol

@mbellew i know you said you were gonna work on it this weekend but in the mean time i'm just curious am i at all close at making m_projectm a global in this commit? its a total mess i just tried editing things that looked related but it compiles and runs.

https://github.com/Albinoman887/visualization.projectm/commit/fc2394bd2f6e76736b3d06e8ea0c5088e79da4b2

also

what does the "*" at the end of projectM? i noticed in some OLD OLD source of the kodi addon (back when it didnt crash) this was written a little differently

current: https://github.com/Albinoman887/visualization.projectm/commit/fc2394bd2f6e76736b3d06e8ea0c5088e79da4b2#diff-e4647024ed5e659a8f5d0b38b07f269eL88

OLD (working but incompatible with current version of kodi)

https://github.com/Albinoman887/visualization.projectm/commit/a7ecffa2b856a7ea0af632f13b26fc5831a9cd76#diff-6f704dfdb1181e64de7444a1ccd2a276L68

obviously you can see he use to have projectM declared as m_globalPM and changed it to m_projectm (prob for consistancy) but what i noticed is he moved the from globalpm to just projectm. is the what defines a global? i tried googling how tos but everyone just says "its bad practice dont do it"

revmischa commented 4 years ago

A * in a declaration makes something a pointer. It holds a memory address of a value instead of the value itself. It makes it much more efficient to pass around the value. What makes something a global is if it is not declared inside of any function, class, struct, etc declaration block. Globals all go in the same global bucket of names so it's rather disorganized to use them, and they can make it harder to deal with multithreading.

Albinoman887 commented 4 years ago

so how do i do that? any time i take it out of the class i get errors that its not declared in that scope

revmischa commented 4 years ago

You would have to update all the references to use the name of the global variable instead of the instance variable

Albinoman887 commented 4 years ago

What's the global variable?

On Sat, Nov 9, 2019, 4:23 PM Mischa Spiegelmock notifications@github.com wrote:

You would have to update all the references to use the name of the global variable instead of the instance variable

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/projectM-visualizer/projectm/issues/243?email_source=notifications&email_token=AAIDAOJUXOFJDGBGURGT3MDQS5IAXA5CNFSM4I4OTE4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDUSJBA#issuecomment-552150148, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIDAOLY5FOO322OO5VNVWTQS5IAXANCNFSM4I4OTE4A .

revmischa commented 4 years ago

It was globalPM

Albinoman887 commented 4 years ago

Where was it defined and what was it changed to ? are you saying I should change m_projectm to globalPM throughout the source ? I was under the impression I'm supposed to change the way m_projectm is declared in the header file (.h)

On Sat, Nov 9, 2019, 10:29 PM Mischa Spiegelmock notifications@github.com wrote:

It was globalPM

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/projectM-visualizer/projectm/issues/243?email_source=notifications&email_token=AAIDAOIYBVHEHNHG3DHWYTDQS6S6BA5CNFSM4I4OTE4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDUWRTI#issuecomment-552167629, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIDAOP6S5P2WUY3WF6ACPLQS6S6BANCNFSM4I4OTE4A .

revmischa commented 4 years ago

I don't know homie, I am not suggesting anything.

What @labkey-matthewb said above sounds pretty good - making it a static class member instead of a global variable.

Albinoman887 commented 4 years ago

Could you show me an example? I don't know what I'm looking for tbh.

On Sat, Nov 9, 2019, 11:02 PM Mischa Spiegelmock notifications@github.com wrote:

I don't know homie, I am not suggesting anything.

What @labkey-matthewb https://github.com/labkey-matthewb said above sounds pretty good - making it a static class member instead of a global variable.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/projectM-visualizer/projectm/issues/243?email_source=notifications&email_token=AAIDAOOTSNUAXH3PZPL5G3LQS6WZZA5CNFSM4I4OTE4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDUW44A#issuecomment-552169072, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIDAOI6XFDCFOL5V5RCN3LQS6WZZANCNFSM4I4OTE4A .

mbellew commented 4 years ago

Here is my airplane attempt. I don't have a PR yet because something else went sideways with my kodi build, so couldn't verify it yet (and I was on an airplane). I changed m_projectM to M_projectM to indicate it is now static. (please change if you prefer something else).

243.patch.txt

Albinoman887 commented 4 years ago

Here is my airplane attempt. I don't have a PR yet because something else went sideways with my kodi build, so couldn't verify it yet (and I was on an airplane). I changed m_projectM to M_projectM to indicate it is now static. (please change if you prefer something else).

243.patch.txt

wow i was over thinking stuff. all i had to do was move it down and add const in front ?! lol. i feel dumb

anyways i gave it a go but i'm still seeing the freezing when it switches presets itself. but to be fair i didnt make clean. i'm currently building a 100% sanitized source tree from scratch (kodi, libprojectm, and the projectm kodi addon)

i'll let you know

mbellew commented 4 years ago

I hope that works. It might be simplified more if Init() just avoids calling delete/new again when M_projectM != nullptr.

Albinoman887 commented 4 years ago

This is unrelated but I figured id mention it here , I tested the new rc6 release and although it ultimately works I had to remove the new "community" preset pack in order for the add-on to install using the install from zip function. My guess is the add-on .zip is just too large .

On Mon, Nov 11, 2019, 7:03 AM mbellew notifications@github.com wrote:

I hope that works. It might be simplified more if Init() just avoids calling delete/new again when M_projectM != nullptr.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/projectM-visualizer/projectm/issues/243?email_source=notifications&email_token=AAIDAOLG5USBFW2UT6DRN7LQTFX4NA5CNFSM4I4OTE4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDXC6KY#issuecomment-552480555, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIDAOP3Z3IQXU3B4ZDRMVLQTFX4NANCNFSM4I4OTE4A .

Albinoman887 commented 4 years ago

so i tested bypassing delete M_projectM but it still freezes .

mbellew commented 4 years ago

I'm sorry this is such a pain. I'm getting this error belo when I try to run in Kodi (this worked fine recently) and I don't really know how to proceed to verify there. I may try to work on making the thread/synchronization code more robust on the projectM side. I this error means anything to someone, let me know.

libva info: VA-API version 1.1.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so libva info: va_openDriver() returns -1

Albinoman887 commented 4 years ago

does kodi still run? i always get that. are you running kodi-x11 binary or wayland?

Albinoman887 commented 4 years ago

fryi dont build master branch. build from "Leia" master is really unstable with the change to python 3.0

mbellew commented 4 years ago

Yup, I got distracted by the error, but it wasn't blocking. When I changed the code back to an earlier version that allocated projectM exactly once (no delete's) it worked again with no hang. Tracked it down to not resetting a flag in BackgroundWorkerSync. So the workaround for now is to just allocate the projectM only on first use, but that kinda bothers me to never free it (see patch in this post). I think the first patch will work with this additional fix on our side https://github.com/projectM-visualizer/projectm/pull/275. I'd like to do even more cleanup, but you know... day job...

243.patch.txt

(edit) actually with the projectM patch it's possible the kodi code won't need any patch.

Albinoman887 commented 4 years ago

ill test with patch v1 and patch v2 and with no patch and let you know.

Albinoman887 commented 4 years ago

Hey. So far you are correct with your latest patch to the projoctm source the Kodi add-on doesn't need any changes . Give me a day to test stability

On Tue, Nov 12, 2019, 11:22 PM mbellew notifications@github.com wrote:

Yup, I got distracted by the error, but it wasn't blocking. When I changed to code back to an earlier version that allocated projectM exactly once (no delete's) it worked. Tracked it down to not resetting a flag. So a workaround is to just allocate the projectM only on first use, but that kinda bothers me (see patch). I think the first patch will work with this fix on our side #275 https://github.com/projectM-visualizer/projectm/pull/275. I'd like to do even more cleanup, but you know... day job...

243.patch.txt https://github.com/projectM-visualizer/projectm/files/3839838/243.patch.txt

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/projectM-visualizer/projectm/issues/243?email_source=notifications&email_token=AAIDAOOSS2CUDCC3HTYIBV3QTOTK5A5CNFSM4I4OTE4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED5ERQI#issuecomment-553273537, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIDAOJWGB4FJLHD663GD63QTOTK5ANCNFSM4I4OTE4A .

revmischa commented 4 years ago

@mbellew

libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1

To me sounds like your video acceleration API (VA API) is having an issue with your nvidia driver. Probably need to install a different video driver or look into your VAAPI config/libraries/setup/etc

revmischa commented 4 years ago

Patch is restored. Is this issue fixed?

Albinoman887 commented 4 years ago

Yes

On Fri, Nov 15, 2019, 9:48 PM Mischa Spiegelmock notifications@github.com wrote:

Patch is restored. Is this issue fixed?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/projectM-visualizer/projectm/issues/243?email_source=notifications&email_token=AAIDAOPLVWIMJSO64CTJI33QT6CUJA5CNFSM4I4OTE4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEHKGYI#issuecomment-554607457, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIDAOKJXNRCO7COK7KI5J3QT6CUJANCNFSM4I4OTE4A .

AlwinEsch commented 4 years ago

It does work now, Thanks a lot for the fix!

Albinoman887 commented 4 years ago

Yep I've been using it for awhile now

On Sat, Dec 14, 2019, 12:15 AM Alwin Esch notifications@github.com wrote:

Closed #243 https://github.com/projectM-visualizer/projectm/issues/243.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/projectM-visualizer/projectm/issues/243?email_source=notifications&email_token=AAIDAOJBSF6EASL73QTZWD3QYSIY3A5CNFSM4I4OTE4KYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOVPNNLXI#event-2883245533, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIDAOPOOKEY2V4SZ2WRPETQYSIY3ANCNFSM4I4OTE4A .