VLC ActiveX and Windows IMM/IME/CTFMON.exe

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
dcreeron
New Cone
New Cone
Posts: 9
Joined: 18 Mar 2009 14:33

VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby dcreeron » 23 Apr 2009 18:09

Hello VLC Gurus,

I am trying to integrate the VLC (currently using 0.9.9 build, also happened with previous version) into a Visual Studio 2008 .NET WinForm app (potentially Silverlight in the future) and am experiencing crashes when trying to stop/quit/unload the players. I've narrowed the issue down to something to do with the Windows IMM (Input Method Manager), IME (Input Method Editors) and CTFMON.exe.

The scenario:
1) Load application
2) App loads 1-x axVLC controls to play/stream video from different sources.
3) User can click buttons to enable/disable each player - blue screen of death occurs randomly when trying to STOP and send quit command to player
4) User can click X to exit the entire application - blue screen of death occurs when trying to STOP and send quit command to each active player

Initially I had taken some cues from other posts in the forums about it being something related to timing/threading, so I had some Thread.Sleep() calls in key locations. This reduced the occurrences of the BSOD, but did not completely resolve the issue.

Further research into the MINIDUMP pointed us to this link: http://connect.microsoft.com/VisualStud ... kID=405521

Further reseach led me to the Control Panel -> Regional and Language Settings where you can turn off "advanced text services". Turning this off and rebooting resolved the BSOD issue.

Even more research led me to the [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IMM] registry key. Disabling the IMMLoad (set it to 0) and rebooting resolves the issue. It does not matter if CTFMON.exe is left running or not.

My question to the VLC population is what interaction does VLC have with all of this? Does it hook into the alternative input functions somehow? (Asian, Kanji, etc.) Has anyone else experienced something like this?

As a final note, the issue only happens when VLC actually connects to and plays a source video. If I'm on a closed network that can't access the input streams then the BSOD will never happen. As soon as one player connects and I try to shut it down the BSOD happens.

Any input/suggestions appreciated.

Thanks.

Daniel

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby VLC_help » 24 Apr 2009 17:37

VLC cannot cause blue screen of death. Buggy drivers or broken hardware can.

dcreeron
New Cone
New Cone
Posts: 9
Joined: 18 Mar 2009 14:33

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby dcreeron » 24 Apr 2009 20:19

VLC cannot cause blue screen of death. Buggy drivers or broken hardware can.
Something VLC is calling related to IMM/IME/CTFMon is causing the BSOD. While VLC may not be responsible for the actual BSOD it is the cause leading to that event.

If my code is on a machine isolated from any network and I attempt to connect to a video source (RTSP streaming camera) nothing load (obviously). Other than no video/timeout issues the application/machine will not crash no matter how many times I try and load or unload the VLC ActiveX controls.

The minute I connect the machine back to the network and connect to one video stream, then try and stop/unload the VLC ActiveX control the machine will blue screen.

As mentioned in my previous post, if I turn off the IMMLoad in the registry and reboot then the BSOD never occurs.

My question is what might VLC be calling/using internally related to 'Regional and Language Settings' (Control Panel) and 'Advanced text services'. Both of these are related to supporting things such as Asian character sets.

Is there something I can disable in the VLC options or command line to turn off these type of settings?

Thanks.

Daniel

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby VLC_help » 25 Apr 2009 17:00

I didn't find any options related to Advanced text services or Regional and Language Settings from that should activate when you open a network stream.
http://wiki.videolan.org/VLC_command-line_help

gian77
New Cone
New Cone
Posts: 4
Joined: 30 Apr 2009 14:57

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby gian77 » 30 Apr 2009 15:01

I have the same behaviour: BSOD occurs using VLC 0.9.9 ActiveX in a C# 2008 project: I can play fine some video files but, when I unload the ActiveX (closing the form), BSOD randomly appears (Stop 0x0000008E error message in Win32k.sys)...

What is the best way to embed VLC in my C# 2008 project? Using ActiveX or importing libvlc in some manner?

Another question: why can I reference 2 distinct VLC ActiveX (Plugin v1 and Plugin v2, see image below) in VS2008? Which I have to choose?

Image

Best regards
Image

dcreeron
New Cone
New Cone
Posts: 9
Joined: 18 Mar 2009 14:33

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby dcreeron » 30 Apr 2009 21:43

I have the same behaviour: BSOD occurs using VLC 0.9.9 ActiveX in a C# 2008 project: I can play fine some video files but, when I unload the ActiveX (closing the form), BSOD randomly appears (Stop 0x0000008E error message in Win32k.sys)...
Did you try turning off the "Advanced Text Services" and reboot? See if that clears the BSOD issue for you (as I mentioned earlier, that worked for us).
What is the best way to embed VLC in my C# 2008 project? Using ActiveX or importing libvlc in some manner?

Another question: why can I reference 2 distinct VLC ActiveX (Plugin v1 and Plugin v2, see image below) in VS2008? Which I have to choose?
I just added the VLC ActiveX control as a reference in my project. When I programmatically created the objects I used the v2 version. I would imagine we see two versions because they enhanced the ActiveX control and left the original interface in place (i.e., v1). I would use the v2 version.

Please post back and let me know if the text services option resolves the BSOD and if it causes any other issues.

Thanks.

Daniel

gian77
New Cone
New Cone
Posts: 4
Joined: 30 Apr 2009 14:57

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby gian77 » 30 Apr 2009 22:06

Thank you very much for your response!
I've just tested the project on another PC: Windows Vista Basic + VLC 0.9.9 + Visual C# 2008 Express with the same result: BSOD when I close the form....on Windows XP I have tried to disable "advanced text" with no benefits.....now I will try on Vista....
Here is my (very simple) code:

Code: Select all

public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void btOpen_Click(object sender, EventArgs e) { using (OpenFileDialog ofd = new OpenFileDialog()) { if (ofd.ShowDialog() == DialogResult.OK) { if (File.Exists(ofd.FileName)) { axVLCPlugin21.playlist.add(ofd.FileName, "", null); axVLCPlugin21.playlist.play(); } } } } private void clear() { axVLCPlugin21.playlist.stop(); axVLCPlugin21.playlist.clear(); axVLCPlugin21.Dispose(); } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { clear(); }
Best regards
Gian77
Image

dcreeron
New Cone
New Cone
Posts: 9
Joined: 18 Mar 2009 14:33

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby dcreeron » 01 May 2009 15:40

[quote][/quote]

The VLC playlist in the ActiveX control, from my experience and what I've read on the forums doesn't work quite right. In my code I maintain my own internal playlist and use that to manage the VLC playlist.

So whenever I want to add something to the playlist I call my own PlayListAdd() method, passing in the source, a name, and any VLC options I want to use.

Code: Select all

int vlcPlayListID = axVLCPlugin2.playlist.add(source, friendlyName, GetVLCOptions()); _playlist.Add(vlcPlayListID, inputName);
Removing items also goes through my own methods:

Code: Select all

public bool PlayListRemove(string inputName) { bool success = false; if (null != axVLCPlugin2) { int vlcPlayListID = GetVLCPlayListIDFromInternalPlayList(inputName); if (Int32.MinValue != vlcPlayListID) { axVLCPlugin2.playlist.removeItem(vlcPlayListID); _playlist.Remove(vlcPlayListID); success = true; } } return success; }
Notice that my internal list maintains the VLC item id, which I use to remove things.

Daniel

Dylanos
New Cone
New Cone
Posts: 2
Joined: 01 May 2009 21:01

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby Dylanos » 01 May 2009 21:12

Glad to see this post is still recent.

Im having the same problem but im very sure my drivers are up to date.

I load the VLC V2 or V1 as usercontrol/plugin to my application and each way of disposing the player comes with the screen of dead.
Im not getting into it very soon as im short on time but i hope that if you guys find the cause to post it here.

I have Vista Ultimate 64 (i build my app as 32bit else other problems occur).


Incase i get it to work ill pot it here.

Dylan

dcreeron
New Cone
New Cone
Posts: 9
Joined: 18 Mar 2009 14:33

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby dcreeron » 01 May 2009 21:44

Just to clarify, I've found a work-around for the blue screen of death when using the VLC ActiveX control (in my case, the v2 version).
Further research into the MINIDUMP pointed us to this link: http://connect.microsoft.com/VisualStud ... kID=405521

Further reseach led me to the Control Panel -> Regional and Language Settings where you can turn off "advanced text services". Turning this off and rebooting resolved the BSOD issue.

Even more research led me to the [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IMM] registry key. Disabling the IMMLoad (set it to 0) and rebooting resolves the issue. It does not matter if CTFMON.exe is left running or not.
I haven't had a lot of time to investigate what else this setting might affect when turned off, but so far I haven't noticed anything wrong with my development machine.

If anyone else has any suggestions or input on how to stop the VLC ActiveX from triggering BSODs I'm all ears. :D

Thanks.

Daniel

Dylanos
New Cone
New Cone
Posts: 2
Joined: 01 May 2009 21:01

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby Dylanos » 02 May 2009 13:57

Further research into the MINIDUMP pointed us to this link: http://connect.microsoft.com/VisualStud ... kID=405521

Further reseach led me to the Control Panel -> Regional and Language Settings where you can turn off "advanced text services". Turning this off and rebooting resolved the BSOD issue.

Even more research led me to the [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IMM] registry key. Disabling the IMMLoad (set it to 0) and rebooting resolves the issue. It does not matter if CTFMON.exe is left running or not.

I dont have the IMMLoad registry key/value (intensive search to IMM) so i guess its no option in vista probably just enabled by default...
the 'advanced text services' option is also missing in my vista ultimate.

Could you give that URL again but with quotes or dots in them as its unreadable, thanks:)

dcreeron
New Cone
New Cone
Posts: 9
Joined: 18 Mar 2009 14:33

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby dcreeron » 02 May 2009 17:43

Could you give that URL again but with quotes or dots in them as its unreadable, thanks:)
Just scroll back up to my original post in this thread. You can click the link or right-click and copy it from there.

During my research I seem to recall reading that the "Advanced Text Services" couldn't be turned off in Vista, or at least not the same way as in XP.

Two links saying it can't be turned off in Vista:

http://blogs.msdn.com/michkap/archive/2 ... 51269.aspx
http://www.techsupportforum.com/microso ... vista.html

Daniel

gian77
New Cone
New Cone
Posts: 4
Joined: 30 Apr 2009 14:57

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby gian77 » 02 May 2009 17:49

Could you give that URL again but with quotes or dots in them as its unreadable, thanks:)
take a look at the first post, the url comes from that...
Image

Idsa
Blank Cone
Blank Cone
Posts: 78
Joined: 22 Oct 2009 10:59

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby Idsa » 19 Dec 2009 21:13

Have the same problem on VLC 1.0.3. The workaround helped, but my program has chinese localization and I am not sure how "advanced text services" disabling wil influence on it.

Idsa
Blank Cone
Blank Cone
Posts: 78
Joined: 22 Oct 2009 10:59

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby Idsa » 24 Sep 2010 10:26

First of all, dcreeron, thank you very much for your investigation! It really helped me but I would like to add some more information for those who will face this bug in future.

I have noticed it is enough to disable Advanced Text Services then enabled it again and reboot. So you don't need to keep Advanced Text Services disabled (really you shouldn't because it, for example, makes impossible language changing as ctfmon.exe process is shutdown). After that I took registry diff tool and compared three registry states: 1. fresh PC 2. Advanced Text Services is disabled 3. Advanced Text Services is enabled. By comparing first two states I found out which registry settings are changed by disabling Advanced Text Services. By comparing second and third states I found out which of these settings are rolled back. But the most interesting was to compare the first (where BSOD reproduced) and the third (where BSOD didn't reproduce) states. The only significant difference between them was IMMLoad setting (described above by dcreeron) which changed from 1 to 0. So by disabling Advanced Text Services IMMLoad (which was equal to 1) is set to zero (and it heals BSOD) but when you enabled Advanced Text Services again IMMLoad is still zero.

So we came to workaround described by dcreeron above: just set IMMLoad to zero. I have done it and was happy for a while... but then testers reported me they reproduced BSOD again. It's difficult to describe how astonished I became when saw LoadIMM (very similar to IMMLoad, isn't it?) setting set to 1 at test PC. According to our investigations some Windows versions use IMMLoad (for example, Windows XP SP2) and other - LoadIMM (for example, Windowx XP SP3) registry setting. So to workaround BSOD you have to set both of them to zero.

P. S. Let's hope Windows doesn't use settings like LoIMMad, LoadSomethingLikeIMM, IMMPleaseBabyLoad, etc.

Ed243
New Cone
New Cone
Posts: 1
Joined: 02 Sep 2011 01:25

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby Ed243 » 02 Sep 2011 01:48

Disabling the advanced text services works to solve this problem using VLC v1.1.11 on XP. Thanks dcreeron.

I was getting BSOD running a C# application on winXP SP3. No problems running the app on Win7. I'm using a C# wrapper called nVLC written by Roman Ginzburg (CodePoject.com) to display multiple vlc player displays. The BSOD would occur when calling stop on one of the players and play on another. Changing from using stop command to using the pause command was a partial fix. After that change the BSOD would occur during application shutdown, after dispose of players, after dispose of the main frame, and before the system issued the ApplicationExit system event.

rvs75
Blank Cone
Blank Cone
Posts: 38
Joined: 01 Jul 2010 11:48

Re: VLC ActiveX and Windows IMM/IME/CTFMON.exe

Postby rvs75 » 05 Sep 2011 12:17

nVLC is a wrapper for the libVlc, not the ActiveX.
Try to stop in another thread. See viewtopic.php?f=32&t=87932&start=20#p293028


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 24 guests