Invalid or malformed application error message when running statlight with -c

Jun 27, 2011 at 4:11 PM

Hi,

I'm getting the following error message when running statlight with -c option. Statlight runs all tests in the first try, however, when the xap file is changed it shows a message box with title "Message from webpage".

The following message appears on the console. This project was working fine till last week and it suddently stopped working.  I assume I might have changed something in the project, but unfortunately, the error message is not really helpful (super secret (007) statlight code :D).

Regards, Meisam.

Starting Test Run: 27/06/2011 17:06:07


A Silverlight MessageBox dialog was automatically closed.
Caption: Unhandled Error in Silverlight Application
Super Secret StatLight Code: 836D4425-DB59-48BB-BA7B-03AB20A57499
Code: 2103
Category: InitializeError
Message: Invalid or malformed application: Check manifest

Dialog Message:
Message from webpage

------------------ Test Failed ------------------
Test Namespace:
Test Class:
Test Method:
Other Info: A Silverlight MessageBox dialog was automatically closed.
Caption: Unhandled Error in Silverlight Application
Super Secret StatLight Code: 836D4425-DB59-48BB-BA7B-03AB20A57499
Code: 2103
Category: InitializeError
Message: Invalid or malformed application: Check manifest

Dialog Message:
Message from webpage
-------------------------------------------------

 

Coordinator
Jun 28, 2011 at 3:07 PM

I had another user mention an error like this, unfortunately I don't recal if A. it never got fixed, or B. it was an error on the users's side that he/she resolved. Either way I could not reproduce it on my side.

First I'd like you to try downloading the latest build (http://teamcity.codebetter.com/viewType.html?tab=buildTypeStatusDiv&buildTypeId=bt370) and let me know if this helps. 

If it does not, do you think you could create a simple/reproducible sample project? If you can do this, it would greatly help.

Thanks,

Jun 28, 2011 at 4:29 PM

Hi,

Thanks for the reply.

I downloaded the latest version and still getting the same error message. Since Statlight was working fine before, I guess it is a problem with my code.

To diagnose the problem I added --debug parameter and got the following message.

Loading XapHost file [MSTestApril2010]
Loading XapHost [StatLight.Client.For.April2010.xap]
Ionic.Zip.ZipException: Settings.Test.Silverlight.xap could not be read ---> Ionic.Zip.ZipException:
 Error opening the file ---> System.IO.IOException: The process cannot access th
e file 'Settings.Test.Silverlight.xap' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, I
nt32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions o
ptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolea
n useLongPath)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share)
   at Ionic.Zip.ZipFile.get_ReadStream()
   --- End of inner exception stack trace ---
   at Ionic.Zip.ZipFile.get_ReadStream()
   at Ionic.Zip.ZipFile.ReadIntoInstance(ZipFile zf)
   at Ionic.Zip.ZipFile.Read(String fileName, TextWriter statusMessageWriter, En
coding encoding, EventHandler`1 readProgress)
   --- End of inner exception stack trace ---
   at Ionic.Zip.ZipFile.Read(String fileName, TextWriter statusMessageWriter, En
coding encoding, EventHandler`1 readProgress)
   at StatLight.Core.WebServer.XapInspection.XapReader.LoadXapUnderTest(String a
rchiveFileName)
   at StatLight.Core.Configuration.StatLightConfigurationFactory.<>c__DisplayCla
ss5.<GetStatLightConfigurationForXap>b__1()
   at StatLight.Core.Configuration.StatLightConfigurationFactory.RewriteXapWithS
pecialFiles(Byte[] xapHost, Func`1 filesToCopyIntoHostXapFunc, String runtimeVer
sion)
   at StatLight.Core.Configuration.StatLightConfigurationFactory.<>c__DisplayCla
ssf.<CreateServerConfiguration>b__e()
   at StatLight.Core.WebServer.ResponseFactory.Get(String localPath)
   at StatLight.Core.WebServer.InMemoryWebServer.ProcessGetRequest(HttpListenerR
equest request, HttpListenerResponse response)

 

I don't know what I have chagned that causes this problem.

Any idea?

Thanks, Meisam.

Coordinator
Jun 28, 2011 at 9:13 PM

Ooo, good find... I'll take a deeper look at how StatLight is handling locked build files. This may help. Could you create an "Issue" and reference this thread so I can easily track it? Thanks.

Jun 28, 2011 at 9:27 PM

Done,

Thanks for consideration.