DropDownList on Custom Start Page crashes Select

Discussions related to custom development with Select.
Post Reply
joe.mag
Posts: 122
Joined: Thu Aug 04, 2011 3:11 pm

DropDownList on Custom Start Page crashes Select

Post by joe.mag »

I have a custom start page which is plain-Jane HTML with the addition of an IFrame that hosts an ASP.NET 4.0 ASPX page that implements a report. This report contains a DropDownList control that filters the report based on username. When I click the DDL's expland button SoftPro Select crashes.

The interesting thing is SPS only crashes on two of the three systems I've tested this on. One is my dev machine (Windows XP) and the other is (of course) my production server (Windows Server 2008 R2). The DDL works fine on my staging server (Windows 2003 Server). It doesn't matter if the DDL is set to have AutoPostBack true or false. It also doesn't matter if I replace the ASPX DDL with a pure HTML select with static options (i.e. the DDL's options are loaded from a database query) hosted on the ASPX page.

It is almost as if SPS has hooked the events fired from the start page controls but it expecting attributes on those controls that are missing from mine. Of course crashing rather than handling this situation is not a very pretty thing.

At this point I'm limited in what I can do with my custom start page and that's a major inconvenience.


------------------------------------------------------------------------------
The only event directly associated with SPS in the App logs is as follows:

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack Trace:
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()
XML Log:
<ILExceptionData>
<Point module="System.Windows.Forms.dll" classFull="System.Windows.Forms.UnsafeNativeMethods" methodName="DispatchMessageW" methodSignature="IntPtr DispatchMessageW(MSG ByRef)" methodToken="0x6000595" ILOffset="-1" />
<Point module="System.Windows.Forms.dll" classFull="System.Windows.Forms.Application+ComponentManager" methodName="System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop" methodSignature="Boolean System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32, Int32, Int32)" methodToken="0x60012fa" ILOffset="380" />
<Point module="System.Windows.Forms.dll" classFull="System.Windows.Forms.Application+ThreadContext" methodName="RunMessageLoopInner" methodSignature="Void RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)" methodToken="0x6001329" ILOffset="478" />
<Point module="System.Windows.Forms.dll" classFull="System.Windows.Forms.Application+ThreadContext" methodName="RunMessageLoop" methodSignature="Void RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)" methodToken="0x6001328" ILOffset="19" />
<Point module="System.Windows.Forms.dll" classFull="System.Windows.Forms.Application" methodName="Run" methodSignature="Void Run(System.Windows.Forms.ApplicationContext)" methodToken="0x60012de" ILOffset="0" />
<Point module="Select.exe" classFull="SoftPro.Select.Runtime" methodName="OnRun" methodSignature="Void OnRun()" methodToken="0x60008f6" ILOffset="7" />
<Point module="Select.exe" classFull="SoftPro.Select.Runtime" methodName="Start" methodSignature="Void Start()" methodToken="0x60008f2" ILOffset="75" />
<Point module="Select.exe" classFull="SoftPro.Select.Automation.EnvICE" methodName="Start" methodSignature="Void Start()" methodToken="0x600047e" ILOffset="190" />
</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.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)

------------------------------------------------------------------------------


Windows Error Reporting includes this data:

Fault bucket , type 0
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: select.exe
P2: 2.6.40705.71
P3: 4d26342b
P4: System.Windows.Forms
P5: 2.0.0.0
P6: 4d8ce0fa
P7: 12fa
P8: 17c
P9: System.AccessViolationException
P10:

Attached files:
C:\Users\Administrator\AppData\Local\Temp\10\WERE9A3.tmp.WERInternalMetadata.xml

These files may be available here:
C:\Users\Administrator\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_select.exe_ef87bcdcf414c1631419138ec980abf5b247d52_2e6ff4f9

Analysis symbol:
Rechecking for solution: 0
Report Id: 0834af56-0ba3-11e1-baf0-463500000031
Report Status: 1

------------------------------------------------------------------------------
john.morton
Posts: 89
Joined: Wed Nov 16, 2011 11:51 am

Re: DropDownList on Custom Start Page crashes Select

Post by john.morton »

In order for us to quickly reproduce this behavior in our environment, could you please attempt to provide a sample application that demonstrates the issue. Either that, or narrow your current code down to where the problem is isolated, and provide us a copy of that to work with?
joe.mag
Posts: 122
Joined: Thu Aug 04, 2011 3:11 pm

Re: DropDownList on Custom Start Page crashes Select

Post by joe.mag »

Sorry it's taken so long--I have to really test this on my production server to make sure it crashes there and that represents scheduling issues.

I think I've got this pretty much simplified but with caching and such I can't be 100% sure.
Attachments
SoftProStartPageRepro.zip
ASP.NET web site files
(1.83 KiB) Downloaded 42 times
john.morton
Posts: 89
Joined: Wed Nov 16, 2011 11:51 am

Re: DropDownList on Custom Start Page crashes Select

Post by john.morton »

What platforms (x86 versus x64) are the machines you've tried this on running?
joe.mag
Posts: 122
Joined: Thu Aug 04, 2011 3:11 pm

Re: DropDownList on Custom Start Page crashes Select

Post by joe.mag »

Works on Windows Server 2003 on x86 but fails on Windows Server 2008 R2 x64
john.morton
Posts: 89
Joined: Wed Nov 16, 2011 11:51 am

Re: DropDownList on Custom Start Page crashes Select

Post by john.morton »

Could you try building and deploying your application as x86 please?
joe.mag
Posts: 122
Joined: Thu Aug 04, 2011 3:11 pm

Re: DropDownList on Custom Start Page crashes Select

Post by joe.mag »

As an ASPX application isn't my code compiled on the fly on the platform on which it runs?

I was asked to prepare a simple repro sample but haven't heard if the sample reproduces the problems on your test systems.
john.morton
Posts: 89
Joined: Wed Nov 16, 2011 11:51 am

Re: DropDownList on Custom Start Page crashes Select

Post by john.morton »

Yes, I was able to reproduce the problem in our environment. The problem seems to be isolated to just the DropDownList having an issue when loaded in our start screen.

In your web.config, you can set:

Code: Select all

  <system.codedom>
    <compilers>
      <compiler [b]compilerOptions="/platform:x86"[/b] language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
    </compilers>
  </system.codedom>
to your webapp build as x86. I don't have easy access to an x86 server to try this on, but it's had the same exception on every machine I've tried in on so far. It seems like a glaring coincidence for it to work on that one machine in your environment that happens to be x86.

While I have been able to reproduce this behavior, the exception occurs before actually getting into any Select code. This is another clue that it might be an x86 versus x64 issue, since our application is built explicitly to run as x86.

Unfortunately, since we are in the middle of reworking the entire API for Cameron, if this doesn't help, we most likely won't be able fix this until our next major release. While it's not optimum, a normal ListBox doesn't cause the same behavior, so that could be used until this problem is fixed.
Post Reply