Menu

#650 Can't start 6.x app, but 5.x works. Crashes with PipeException / EndpointNotFoundException

6.X
open
None
I think all 6.x, but not 5.x
Bug Fix
Critical
N/A
2020-01-01
2019-08-18
mach
No

Behavior
Main window displays, but then a second later crashes with the standard dialog "NAPS2 (Not Another PDF Scanner 2) has stopped working".

Version Information
Tried a couple 6.x releases, including latest 6.1.2, which does not work.
5.8.2 works great.

Application event log shows:

Application: NAPS2.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.PipeException

Exception Info: System.ServiceModel.EndpointNotFoundException

Server stack trace:
at System.ServiceModel.Channels.PipeConnectionInitiator.GetPipeName(Uri uri, IPipeTransportFactorySettings transportFactorySettings)
at System.ServiceModel.Channels.NamedPipeConnectionPoolRegistry.NamedPipeConnectionPool.GetPoolKey(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.CommunicationPool`2.TakeConnection(EndpointAddress address, Uri via, TimeSpan timeout, TKey& key)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(System.Runtime.Remoting.Proxies.MessageData ByRef, Int32)
at NAPS2.Worker.IWorkerService.Init(System.String)
at NAPS2.DI.NinjectWorkerServiceFactory.Create()
at NAPS2.WinForms.FDesktop.RenderThumbnails()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()

Discussion

  • SelfMan

    SelfMan - 2019-09-03

    I've got the same/simmilar problem - unhandled exception - with several entries in the evnet log:

    NAPS CRASH

    EVENT LOG

    Application: NAPS2.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.ServiceModel.EndpointNotFoundException

    Server stack trace:
    at System.ServiceModel.Channels.ConnectionUpgradeHelper.DecodeFramingFault(ClientFramingDecoder decoder, IConnection connection, Uri via, String contentType, TimeoutHelper& timeoutHelper)
    at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
    at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
    at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
    at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
    at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
    at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage)
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(System.Runtime.Remoting.Proxies.MessageData ByRef, Int32)
    at NAPS2.Worker.IWorkerService.Init(System.String)
    at NAPS2.DI.NinjectWorkerServiceFactory.Create()
    at NAPS2.WinForms.FDesktop.RenderThumbnails()
    at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
    at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
    at System.Threading.ThreadHelper.ThreadStart()

    EVENT LOG

    Názov chybovej aplikácie: NAPS2.exe, verzia: 6.1.2.25834, časová značka: 0x5d3c9614
    Názov chybového modulu: KERNELBASE.dll, verzia: 6.1.7601.24511, časová značka: 0x5d3fa908
    Kód výnimky: 0xe0434352
    Odstup chyby: 0x0000845d
    Identifikácia chybného procesu: 0x17c4
    Čas spustenia chybnej aplikácie: 0x01d56273c454fd0a
    Cesta chybnej aplikácie: C:\Program Files\NAPS2\NAPS2.exe
    Cesta chybného modulu: C:\Windows\system32\KERNELBASE.dll
    Identifikácia hlásenia: 04a44262-ce67-11e9-b4c9-0019bb57358c

    WER

    Chybový sektor , typ 0
    Názov udalosti: CLR20r3
    Odozva: Nie je k dispozícii
    Identifikácia kabinetu: 0

    Podpis problému:
    P1: NAPS2.exe
    P2: 6.1.2.25834
    P3: 5d3c9614
    P4: System.ServiceModel
    P5: 4.8.3928.0
    P6: 5d390720
    P7: 4c96
    P8: 55
    P9: DI4EQZGVCWKDLTHKQTZWPXE3YRFKN1I2
    P10:

    Priložené súbory:
    C:\Users\Asistentka\AppData\Local\Temp\WERC1FC.tmp.WERInternalMetadata.xml

    Tieto súbory môžu byť dostupné tu:
    C:\Users\Asistentka\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_NAPS2.exe_acc3c5be7356a15b1bd927fb307043cf11ca8a6_0f65c8a3

    Symbol analýzy:
    Opätovná kontrola pre nájdenie riešenia: 0
    Identifikácia správy: 04a44262-ce67-11e9-b4c9-0019bb57358c
    Stav správy: 1


    Some texts are in Slovak language, but if necessary, I'll translate them.
    All are just generic event log texts, so its "readable" by context.

    The 5.8.2 works just fine on the particular system.

     
  • SelfMan

    SelfMan - 2019-09-03

    Its a Windows 7 Pro x86 system (all updates applied) with ESET NOD32 Antivirus.
    When I ran NAPS2 as a different user, the application started just fine. It just had no config files.
    So I've tried to remove the config files from %APPDATA% of the primary user, but it had no effect.
    This system has a Samsung SCX-3400 Series Multi functional Printe which is connected via USB,
    It looks like NAPS2 is doing some evals of the user settings after the startup and failes here.

     
  • mach

    mach - 2020-01-01

    And I had no antivirus installed other than Defender.
    I am unsure if @selfman 's issue is the same as mine or not.

    In my case, the following error was in AppData\Roaming\NAPS2\errorlog.txt which I had not checked months ago:

    2019-12-31 20:28:09.4762 An error occurred that caused the worker application to close. System.Configuration.ConfigurationErrorsException: The type 'Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior, Microsoft.VisualStudio.Diagnostics.ServiceModelSink, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' registered for extension 'Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior' could not be loaded. (C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config line 238)
    at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
    at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
    at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
    at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
    at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
    at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
    at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
    at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
    at System.Configuration.ConfigurationManager.GetSection(String sectionName)
    at System.ServiceModel.Activation.AspNetEnvironment.UnsafeGetSectionFromConfigurationManager(String sectionPath)
    at System.ServiceModel.Activation.AspNetEnvironment.UnsafeGetConfigurationSection(String sectionPath)
    at System.ServiceModel.Configuration.ConfigurationHelpers.UnsafeGetAssociatedSection(ContextInformation evalContext, String sectionPath)
    at System.ServiceModel.Description.ConfigLoader.LookupCommonBehaviors(ContextInformation context)
    at System.ServiceModel.Description.ConfigLoader.LoadServiceDescription(ServiceHostBase host, ServiceDescription description, ServiceElement serviceElement, Action 1 addBaseAddress, Boolean skipHost)
    at System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, ServiceElement serviceSection)
    at System.ServiceModel.ServiceHostBase.ApplyConfiguration()
    at System.ServiceModel.ServiceHost.ApplyConfiguration()
    at System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses)
    at System.ServiceModel.ServiceHost.InitializeDescription(Type serviceType, UriSchemeKeyedCollection baseAddresses)
    at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
    at NAPS2.DI.EntryPoints.WorkerEntryPoint.Run(String[] args)

    So I looked at C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config and found IIRC 2 references to Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior. The last modified date for this file was years old. Further, these 2 references were not present in machine.config.default, so I restored the default configuration, and NAPS launches fine now. I wonder if these references were still in there from a previous Visual Studio install that was uninstalled years ago?

     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.
Try Free →