SnapSection Failure

Discussions related to SoftPro Select user interface development.

Moderator: Phil Barton

Post Reply
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

SnapSection Failure

Post by roteague »

I've got a SnapSection that throws a "Failed to open screen error". The event log records the following:

Code: Select all

Event Type:	Error
Event Source:	SoftPro Select
Event Category:	None
Event ID:	0
Date:		1/11/2010
Time:		9:32:44 AM
User:		
Computer:	 XXXXXX
Description:
Error: Could not create SnapSection called "OneClientLookupSnapSection"
Stack Trace: 
   at SoftPro.UI.Base.SnapSectionContainerBase.AddSnapSections(ScreenNode[] children, IBusinessObject context)
   at SoftPro.UI.Base.ScreenContainer.OpenScreenEx(String screenName, IBusinessObject context, ScreenDefinition screenDef)
   at SoftPro.UI.Base.ScreenContainer.OpenScreen(ExplorerBarItem screenEBItem, IBusinessObject context)
   at SoftPro.OrderTracking.Controls.OrderEditor.OpenScreenEx(ExplorerBarItem screenEBItem, IBusinessObject iContext, Boolean openInNewTab, OpenScreenType type)
XML Log: 
<ILExceptionData>
  <Point module="SoftPro.UI.Base.dll" classFull="SoftPro.UI.Base.SnapSectionContainerBase" methodName="AddSnapSections" methodSignature="SoftPro.UI.Base.ISnapSection[] AddSnapSections(SoftPro.UI.Base.ScreenNode[], SoftPro.BusinessObjects.Base.IBusinessObject)" methodToken="0x60000ec" ILOffset="99" />
  <Point module="SoftPro.UI.Base.dll" classFull="SoftPro.UI.Base.ScreenContainer" methodName="OpenScreenEx" methodSignature="SoftPro.UI.Base.ISnapSectionScreen OpenScreenEx(System.String, SoftPro.BusinessObjects.Base.IBusinessObject, SoftPro.UI.Base.ScreenDefinition)" methodToken="0x60001a8" ILOffset="56" />
  <Point module="SoftPro.UI.Base.dll" classFull="SoftPro.UI.Base.ScreenContainer" methodName="OpenScreen" methodSignature="SoftPro.UI.Base.ISnapSectionScreen OpenScreen(Janus.Windows.ExplorerBar.ExplorerBarItem, SoftPro.BusinessObjects.Base.IBusinessObject)" methodToken="0x60001a9" ILOffset="0" />
  <Point module="SoftPro.OrderTracking.Controls.dll" classFull="SoftPro.OrderTracking.Controls.OrderEditor" methodName="OpenScreenEx" methodSignature="SoftPro.UI.Base.ISnapSectionScreen OpenScreenEx(Janus.Windows.ExplorerBar.ExplorerBarItem, SoftPro.BusinessObjects.Base.IBusinessObject, Boolean, SoftPro.OrderTracking.Common.OpenScreenType)" methodToken="0x600013b" ILOffset="377" />
</ILExceptionData>


Call Stack: 
   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at System.Diagnostics.TraceEventCache.get_Callstack()
   at SoftPro.Select.LogTraceListener.OnLog(TraceEventCache eventCache, String message, TraceEventType eventType)
   at SoftPro.Select.LogTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
   at System.Diagnostics.TraceInternal.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)
   at System.Diagnostics.Trace.TraceError(String message)
   at SoftPro.Select.Managers.ShellManager.SoftPro.Select.Shell.IShell.HandleError(String message, Boolean log, Exception ex)
   at SoftPro.OrderTracking.Controls.OrderEditor.OpenScreenEx(ExplorerBarItem screenEBItem, IBusinessObject iContext, Boolean openInNewTab, OpenScreenType type)
   at SoftPro.OrderTracking.Controls.OrderEditor.OpenCustomScreen(ExplorerBarItem ebItem, Boolean openInNewTab)
   at SoftPro.OrderTracking.Controls.OrderEditor.OpenScreen(ExplorerBarItem b, Boolean openInNewTab)
   at SoftPro.OrderTracking.Controls.OrderEditor.NavigateScreens_Impl(ExplorerBarItem explorerBarItem, Boolean closeCurrentScreen)
   at SoftPro.OrderTracking.Controls.OrderEditor._explorerBar_ItemClick(Object sender, ItemEventArgs e)
   at Janus.Windows.ExplorerBar.ExplorerBar.OnItemClick(ItemEventArgs e)
   at Janus.Windows.ExplorerBar.ExplorerBar.i(ExplorerBarItem )
   at Janus.Windows.ExplorerBar.ExplorerBarItem.InvokeOnClick()
   at Janus.Windows.ExplorerBar.ExplorerBar.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at SoftPro.Common.Controls.CommonExplorerBar.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(ApplicationContext context)
   at SoftPro.Select.Runtime.OnRun()
   at SoftPro.Select.Runtime.Start()
   at SoftPro.Select.Automation.EnvICE.Start()
   at System.Runtime.Remoting.Messaging.Message.Dispatch(Object target, Boolean fExecuteInContext)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
   at System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink.SyncProcessMessage(IMessage reqMsg)
   at SoftPro.Select.Shell.SynchronizationContextAspect.SyncProcessMessage(IMessage msg)
   at System.Runtime.Remoting.Lifetime.LeaseSink.SyncProcessMessage(IMessage msg)
   at System.Runtime.Remoting.Messaging.ServerContextTerminatorSink.SyncProcessMessage(IMessage reqMsg)
   at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessageCallback(Object[] args)
   at System.Threading.Thread.CompleteCrossContextCallback(InternalCrossContextDelegate ftnToCall, Object[] args)
   at System.Threading.Thread.InternalCrossContextCallback(Context ctx, IntPtr ctxID, Int32 appDomainID, InternalCrossContextDelegate ftnToCall, Object[] args)
   at System.Threading.Thread.InternalCrossContextCallback(Context ctx, InternalCrossContextDelegate ftnToCall, Object[] args)
   at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessage(IMessage reqMsg)
   at System.Runtime.Remoting.Proxies.RemotingProxy.CallProcessMessage(IMessageSink ms, IMessage reqMsg, ArrayWithSize proxySinks, Thread currentThread, Context currentContext, Boolean bSkippingContextChain)
   at System.Runtime.Remoting.Proxies.RemotingProxy.InternalInvoke(IMethodCallMessage reqMcmMsg, Boolean useDispatchMessage, Int32 callType)
   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(IMessage reqMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at SoftPro.Select.Automation.EnvICE.Start()
   at SoftPro.Select.Automation.EnvICE.Run(String rootSuffix, Boolean noSplash, Boolean setupMode, Boolean log, Boolean embedding, Dictionary`2 args, String freeArg)
   at SoftPro.Select.Program.Main(String[] args)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
My package already contains two SnapSections, both of which load with no problems. My SnapSections are all derived from the same base class. The screen definition is as follows:

Code: Select all

<ScreenDefinition>
	<ScreenName>OneClient Lookup</ScreenName>
	<Priority>0</Priority>
	<Context>Order</Context>
	<SnapSection>
	      <Name>OneClientLookupSnapSection</Name>
	</SnapSection>
	</ScreenDefinition>
I'm not doing any different than any of the other SnapSections, nor does the SnapSection do any out of the ordinary (it only contains a single button).

Any ideas?
Robert
Phil Barton
Posts: 54
Joined: Wed Sep 24, 2008 2:37 pm
Location: Raleigh, NC
Contact:

Re: SnapSection Failure

Post by Phil Barton »

Typically, this error results from a failure in the constructor of the snap section or a failure in the Initialize(...) method of the snap section. That would be the point where I would start to look.
Phil Barton
Software Architect
SoftPro
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: SnapSection Failure

Post by roteague »

Thanks Phil, we solved the problem. It turned out the class name didn't match. One of those gotcha's if you don't pay close attention. Thanks for your help.
Robert
Post Reply