wxMediaCtrl crash on NVIDIA

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
bowei
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Oct 19, 2020 7:46 pm

wxMediaCtrl crash on NVIDIA

Post by bowei »

Dear team,

We are seeing an issue (on several laptops with dual Intel/NVIDIA graphics cards and Windows 10) where wxMediaCtrl is crashing when loading a movie file (e.g. mp4). This occurs in the mediaplayer sample, and in our own application. If the sample is run with the high performance (NVIDIA) card, trying to play the movie file causes a crash. If the sample is run using the Intel HD card, it behaves as expected and plays the movie file.

Using wxWidgets 3.1.4 developer release and Visual Studio 2017 (v141), Windows SDK: 10.0.17763.0

Intel core i7-7700 2 x 2.80GHz
RAM 16G
64 bit
Graphic card:
Intel (R) HD Graphics 630
NVIDIA Quadro M2200

Is anyone able to observe the same issue or give input on the cause?

Regards,
Bowei
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxMediaCtrl crash on NVIDIA

Post by doublemax »

Did you try another backend? Default is wxMEDIABACKEND_DIRECTSHOW, try wxMEDIABACKEND_WMP10.

Can you provide a call stack?

But if this only happens with these specific GPUs, it will be hard to debug. If this is essential functionality for you, try embedding libvlc.

Another option could be to use wxWebView with the modern ChromiumEdge backend to play the video.
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxMediaCtrl crash on NVIDIA

Post by ONEEYEMAN »

Hi,
Can you run the player directly and play the movie?

Thank you.
bowei
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Oct 19, 2020 7:46 pm

Re: wxMediaCtrl crash on NVIDIA

Post by bowei »

tried both VLC and windows media player themself. And saw that both running on intelgraphic (which is also ok with wxMediaCtrl). And noticed that VLC and windows media player can't be setted to use NVIDA (the NVIDA Control Panel gray out the selection).
So maybe back end player problem.

thank you.
bowei
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Oct 19, 2020 7:46 pm

Re: wxMediaCtrl crash on NVIDIA

Post by bowei »

tried both wxMEDIABACKEND_DIRECTSHOW and wxMEDIABACKEND_WMP10, got exactly same crash callStack.
wxMediaCtrl_Crash_on_NVIDA_WMP10.jpg
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxMediaCtrl crash on NVIDIA

Post by doublemax »

First of all: It's hard to imagine that the problem lies within wxWidgets.

But just for my better understanding: Are there two displays connected? Or are they both active even with only one display? Then how do you switch between the two GPUs?
And noticed that VLC and windows media player can't be setted to use NVIDA (the NVIDA Control Panel gray out the selection).
Then why/how does the wxWidgets app use NVIDIA?
Use the source, Luke!
bowei
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Oct 19, 2020 7:46 pm

Re: wxMediaCtrl crash on NVIDIA

Post by bowei »

we write an windows desktop application based on wxWidgets(3.1.4). and we make settings in NVIDIA control pane to let the application running on NVIDIA or integrated intel GPU.
when app runs on itegrated intel GPU, it can play video in wxMediaCtrl well, but when app runs on NVIDIA, it crashs.
2 attached screenshot explain how to set app running on GPU.
gpu settings
gpu settings
gpu settings
gpu settings
bowei
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Oct 19, 2020 7:46 pm

Re: wxMediaCtrl crash on NVIDIA

Post by bowei »

there is only one wxMediaCtrl in disply. so we need to shut down app and make gpu settings, and then start app again to apply new settings.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxMediaCtrl crash on NVIDIA

Post by ONEEYEMAN »

Hi,
I presume that the media sample also doesn't work?
And the actual player from Windows?

BTW, what format is the video you want to play?

Thank you.
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: wxMediaCtrl crash on NVIDIA

Post by stahta01 »

This may be a stupid remark or question; but, are you trying to display using the NVIDIA card? Or are you trying to run the code on the NVIDIA card?

The second should fail unless you used an special compiler; and, I doubt that wxWidgets code is supported being ran on a most video cards!

Tim S.
bowei
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Oct 19, 2020 7:46 pm

Re: wxMediaCtrl crash on NVIDIA

Post by bowei »

yes, the mediaplayer sample dowloaded together with wxWidgets 3.1.4 has same problem (works with integrated GPU but crashs on NVIDIA).

Any video format is same.

the videos play well in windows mediaplayer.
But one thing noticed here: I can't asign any a player (windows mediaplayer or VLC) to run on NVIDIA in the mentioned way. To pick NVIDIA in NVIDIA settings pane for running player(installed in windows), is disabled.

regards,
Bowei
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxMediaCtrl crash on NVIDIA

Post by ONEEYEMAN »

Hi,
Then you can't do that with Nvidia.
You might report it as a bug to Nvidia, but thats all.

Thank you.
Post Reply