NetcamStudio suddenly stopped working

Netcam studio suddenly stopped working - There was a windows security update and the PC rebooted. I have uninstalled Netcam Studio using the revo uninstaller, rolled back the security update, and tried to re-install Netcamstudio, but still doesn’t run - just launch it and nothing happens. It is not listed in Task Manager Apps or processes but I can see NetcamStudioSvc64 in services is stopped if I try to start it I get this error pop up

"Windows could not start Netcam Studio Server (64-bit) service on Local Computer.

Error 1064: An exception occurred in the service when handling the control request."

It´s the time of the month … :slight_smile: Something was messed up.
When NCS is installed use Revo Uninstaller and then use Advanced for scanning and delete whats found.
-go to C:\Users%username%\AppData\Local\Moonware and delete all.
-go to C:\Users%username%\AppData\Roaming\Moonware and delete all.
Since it might be a problem with the service do this. If you can see Netcam Studio Service in the Windows Services remove that service. Start the Command Prompt with Admin rights.
image
Write the following in the command line:
sc delete NetcamStudioSvc64
Make sure the service is deleted.
Restart the computer
Then install NCS again.
-Henrik

Done the above but get the same the service is listed after re-installing, but is stopped, if I try to start it, in just goes back to stopped.

If you uninstall latest Windows update and NCS still don’t run then it must be something else. If you look in Windows Event Viewer hopefully you can find errors why NCS stops.
It can also be that .Net Framework i damaged from the update. Renistall the latest version

I am also suffering the same issues, which had started a few days ago. The Event Viewer log shows the following:

The Netcam Studio Server (64-bit) service terminated with the following error:
An exception occurred in the service when handling the control request.

It’s very rare for .NET to be broken by a Windows update. The console shows an exception caused by accessing a NULL object. I can’t copy and paste the message but have taken a screenshot and attached to this message.

At this juncture, the entire server is inoperable with all the icons disabled. The service itself is fine since it is pointing to the correct executable and is running under the correct user. It is the executable that has failed, which has prevented the service from starting.

Removing Windows updates is not an option because I value security very highly and also for those using Windows Home, updates are mandatorily forced upon us.

Seems to be .net error?

event viewer shows

Faulting application name: NetcamStudio.Service.exe, version: 1.9.5.0, time stamp: 0x60cd9755
Faulting module name: KERNELBASE.dll, version: 10.0.19041.1826, time stamp: 0x299341e8
Exception code: 0xe0434352
Fault offset: 0x0000000000034fd9
Faulting process id: 0x1d98
Faulting application start time: 0x01d89f5fec7a3063
Faulting application path: C:\Program Files\Netcam Studio - 64-bit\NetcamStudio.Service.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 27e606b2-f0a9-4d15-b5a7-71fefd34fd90
Faulting package full name:
Faulting package-relative application ID:

and

Application: NetcamStudio.Service.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
at System.Diagnostics.PerformanceCounterLib.GetStringTable(Boolean)
at System.Diagnostics.PerformanceCounterLib.get_NameTable()
at System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
at System.Diagnostics.PerformanceCounterLib.CounterExists(System.String, System.String, Boolean ByRef)
at System.Diagnostics.PerformanceCounterLib.CounterExists(System.String, System.String, System.String)
at System.Diagnostics.PerformanceCounter.InitializeImpl()
at System.Diagnostics.PerformanceCounter…ctor(System.String, System.String, System.String, Boolean)
at System.Diagnostics.PerformanceCounter…ctor(System.String, System.String, System.String)
at Moonware.Common.ProcessorUsage…ctor()
at Moonware.Core.MoonwareCore…ctor(Moonware.Common.NetConfig)
at Moonware.Server.WCF.MoonwareServerWCF…ctor(Moonware.Common.NetConfig)
at ..(.)
at ..(System.String[])
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(System.Object)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.ServiceProcess.ServiceBase.Run(System.ServiceProcess.ServiceBase[])
at ..(System.String[])

The Netcam Studio Server (64-bit) service terminated with the following error:
An exception occurred in the service when handling the control request.

Service cannot be started. System.InvalidOperationException: Cannot load Counter Name data because an invalid index ‘’ was read from the registry.
at System.Diagnostics.PerformanceCounterLib.GetStringTable(Boolean isHelp)
at System.Diagnostics.PerformanceCounterLib.get_NameTable()
at System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
at System.Diagnostics.PerformanceCounterLib.CounterExists(String category, String counter, Boolean& categoryExists)
at System.Diagnostics.PerformanceCounterLib.CounterExists(String machine, String category, String counter)
at System.Diagnostics.PerformanceCounter.InitializeImpl()
at System.Diagnostics.PerformanceCounter…ctor(String categoryName, String counterName, String instanceName, Boolean readOnly)
at System.Diagnostics.PerformanceCounter…ctor(String categoryName, String counterName, String instanceName)
at Moonware.Common.ProcessorUsage…ctor()
at Moonware.Core.MoonwareCore…ctor(NetConfig )
at Moonware.Server.WCF.MoonwareServerWCF…ctor(NetC…

The description for Event ID 0 from source Application cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

Netcam Studio Server initialization failed with error: System.InvalidOperationException: Cannot load Counter Name data because an invalid index ‘’ was read from the registry.
at System.Diagnostics.PerformanceCounterLib.GetStringTable(Boolean isHelp)
at System.Diagnostics.PerformanceCounterLib.get_NameTable()
at System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
at System.Diagnostics.PerformanceCounterLib.CounterExists(String category, String counter, Boolean& categoryExists)
at System.Diagnostics.PerformanceCounterLib.CounterExists(String machine, String category, String counter)
at System.Diagnostics.PerformanceCounter.InitializeImpl()
at System.Diagnostics.PerformanceCounter…ctor(String categoryName, String counterName, String instanceName, Boolean readOnly)
at System.Diagnostics.PerformanceCounter…ctor(String categoryName, String counterName, String instanceName)
at Moonware.Common.ProcessorUsage…ctor()
at Moonware.Core.MoonwareCore…ctor(NetConfig )
at Moonware.Server.WCF.MoonwareServerWCF…ctor(NetConfig )
at ..( )
at ..(String[] )

The message resource is present but the message was not found in the message table

That´s better info. The KERNELBASE.dll is a tricky one and is part of the Windows system and is used for many different things. Do a search in this forum for KERNELBASE.dll and you can see what other users have done to solve it. It can be that you need to repair Windows.

It´s not a question about removing updates forever. The basic problem is that something was messed up in the update and it is necessary to repair that. A good way is to uninstall the update and see if NCS is running again. If not do a clean installation of NCS and hopefully it should run again. Then do a Windows update and the latest update will be installed again. Exit NCS before the update is installing. When that is done start NCS and then it should be running again.

ok will take a look - I uninstalled the windows update and reinstalled Netcam Studio - but ket the same issue.

What version of Windows do you have installed? I have 11 and my Netcam has been broken for months. Steps so far:

  • Removed and reinstalled Netcam Studio
  • Used a Obit to clean up all of remaining NCS files.
  • Used the Net framework Repair Tool
  • Uninstalled and Reinstalled Net framework

Check the Windows Event Viewer for a more specific information of what cause the problem.
If you have an extra antivirus program installed check that.

I also uninstalled several updates but to no avail. If the Windows updates were causing the issues, then uninstalling the updates provides only a temporary solution, of course. When I have time I can try imaging my Windows set up on a VM and try a few things.

Three events logged when the service fails to start - all pointing to accessing objects that are NULL. This is most likely a bug where the developers have not checked an onject is not null prior to accessing its members. Perhaps a Windows update has caused the bug to manifest itself but nevertheless, accessing a NULL object is most certainly a bug and the event viewer logs proves it.

The three log entries show:

Application: NetcamStudio.Service.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
at DynamicClass.(System.Object)
at ..(Moonware.Core.MoonwareCore, Boolean)
at Moonware.Core.MoonwareCore…ctor(Moonware.Common.NetConfig)
at Moonware.Server.WCF.MoonwareServerWCF…ctor(Moonware.Common.NetConfig)
at ..(.)
at ..(System.String[])
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(System.Object)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.ServiceProcess.ServiceBase.Run(System.ServiceProcess.ServiceBase[])
at ..(System.String[])

Service cannot be started. System.NullReferenceException: Object reference not set to an instance of an object.
at (Object )
at ..(MoonwareCore , Boolean )
at Moonware.Core.MoonwareCore…ctor(NetConfig )
at Moonware.Server.WCF.MoonwareServerWCF…ctor(NetConfig )
at ..( )
at ..(String[] )
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)

The description for Event ID 0 from source Application cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

Netcam Studio Server initialization failed with error: System.NullReferenceException: Object reference not set to an instance of an object.
at (Object )
at ..(MoonwareCore , Boolean )
at Moonware.Core.MoonwareCore…ctor(NetConfig )
at Moonware.Server.WCF.MoonwareServerWCF…ctor(NetConfig )
at ..( )
at ..(String[] )

The message resource is present but the message was not found in the message table

Since it has been working before, questions is what happened on the computer? You say you removed and installed. Did you do a clean installation? I assume you run Windows 10/11.
You can use Revo Uninstaller and Advanced scanning with deletion of all found files/folders or a similar program. Follow this guide How to make a clean installation of Netcam Studio but you don´t have to do the first line “-start installation program and select Remove.” since Revo Uninstaller took care of that. Just check the rest.

WCF seems to be the problem which is part of .NET Framework. Turn off
image
and click OK.
Then turn it on again and OK and see if it installs WCF correct.

I have not tried a clean installation and don’t doubt that it would be functional on a clean install, unless NCS makes checks on other things such as location, time, etc. I havn’t got the time to do this right now since I will have to restore from an image after performing these tests. I can try it on a new Windows 10 build in a VM but as I mentioned, it would more than likely to work.

The one thing I would like to find out is what update (if any) broke it and why suddenly so many NULL excpetions. It’s as though a different part of the NCS code is being executed upon start up which hadn’t been the case before these problems manifested themselves.

I have tried disabling .NET 4.8 Advanced Services and re-anabling but to no avail. When I have time, I’ll play around with using a VM and installing updates bit by bit, to see if any of them caused the issues. If I don’t find anything or just don’t have the time, I’m going to leave it. I am concerned about the amount of exceptions caused by accessing of NULL objects, without previously checking the object is not NULL beforehand.

@Henrik NCS installed and ran fine in a Windows 10 VM but after applying a mass of updates, it also failed. You have mentioned in various threads that Windows updates break NCS but never explained why. What is the reason for that? Is NCS using deprecated calls?

Since you mentioned Windows updates causes issues at various times over the past 2 or 3 years, it can’t be just one particular Windows update that cause the issue. This means working around the problem now may result in future updates causing issues. I am very reluctant to blame the updates as I am a .NET developer and only once in the past 7 years have I encountered a .NET update that had a bug which caused our software (and many other .NET applications) to spectacularly crash. In this instance, I can only see NCS crashing and all other .NET applications I am using are operating without any visible problems. It’s as though deprecated code is being used and also I am concerned about the multitudes of NULL objects being accessed - not just on this occasion, but I see it several times in the past on the Netcam Server console.

It may be possible with the help of .NET Decompiler, for me to trace the cause of the problem but it might be easier to put up with the software that was supplied with my IP CAM for the time being and hope these issues can be fixed in the future, without having to remove files in %appdata%, registry cleanup via Revo, etc.

I did a corresponding test with a VM. I started with Win 10 Pro version 2004.
-Win 10 Pro 2004 (June 2020) incl. all cumulative updates: NCS runs.
-upgraded to version 21H1 incl. all cumulative updates: NCS runs.
-upgraded to 21H2 incl. all cumulative updates (19044.1865): NCS runs
So I cannot reproduce the problem. In all the different systems I run I have actually never experienced these crashes. However, if it’s possible to find why this happens on some occations it is of cause valuable info to get and if it’s possible to change something in NCS.

Thanks for trying it out. When I tried it in VM, I restored an image of my computer rather than installing Windows from scratch. It worked fine until after finishing a lot of updates and it failed. I tried this again but this time I took a slightly different approach. After restoring the image to the VM, I shutdown NCS service. I ran the windows update and after the updates had completed, started NCS and it was successfully running! However, I left NCS running for a couple of days and then hit upon the same issues.

Therefore, I was almost certain that any updates to .NET was not the cause of the problem and I had always been pretty sure about it, since I have only encoutered broken .NET only once and that was about 7 years ago. As mentioned earlier, it did appear something had caused NCS to run some code which it doesn’t normally access, and this code is not well written due to failure to catch NULL exceptions. This occurred after 2 days of running the VM with the restored image but at the same time, I was also running a VM with a clean Windows install, latest updates, and NCS, but after a couple of days, NCS was still happily going about its business, while NCS failed on the other VM.

I couldn’t help thinking there was still NCS data that was still being accessed and perhaps the amount of logs, recordings, images etc that has built up over several years, may have led to this NCS bug. You mentioned earlier to delete moonware folders in %APPDATA% and to use Revo to clean up registry entries, but I was becoming more convinced that there was still some NCS data that is causing the crash. A full search of my hard drive for the folder “moonware” revealed that this was stored in the ProgramData folder (it should have been the first place to look and I don’t know why I didn’t look here originally). On my VM with the resotred image, the Moonware folder inside ProgramData had a lot of data (about 20 GB worth). I deleted that folder, restarted NCS and it was working fine again.

So, first of all, you might want to modify the second post in this thread to specify that the Moonware folder in the ProgramData location should also be deleted (but backup the folder as it may contain important recordings) and secondly, I now strongly believe that the amount of files in the Moonware folder of Program Data is what caused NCS to crash with unhandled NULL exceptions.

That’s was it says in second point in the list of the guide for a clean installstion.
Most likely the problem was a damaged configuration file.