Page 2 of 2

RE: Problem with TOAW Scenario Viewer

Posted: Fri May 13, 2011 1:46 am
by Anthony_MatrixForum
Hi all

Hey Parmenio, This sounds similar to a problem i was having with loading SCE files.

I had a problem when using programs built on Larry's DLL for reading scenarios....

If I hard-coded a reference (filename string) to a scenario and used Scenario.ReadScenario(filename) it would work [:D]

If I used a FileDialog to get the filename and then Scenario.ReadScenario(filename) it would die [:@], badly, with some form of corrupted heap that was impossible (for me) to debug. I sent an email or to to Larry about this, but had no luck, and Larry "cannot" send me the code or debugging (PDB) files to help sort the problem.

To me, the only obvious differnece is how the filename input string might be allocated and then used in the DLL, but without more debugging information from Larry, i am stuck.

It appeared, that some windows update might be the cause; i suspect this as the ScenarioViewer works fine on a Vanilla win 7 install. Once all the Win7 security patchss are applied, then the problem strikes. I have not checked this for 3 months, and win7 SP1 may have fixed the problem, will check when i get home.

BTW: The problem occurs with Win 7, 32 bit.

It works fine in all cases in Win XP



RE: Problem with TOAW Scenario Viewer

Posted: Sun May 22, 2011 5:31 pm
by parmenio
Anthony,

I'm assuming you mean Ralph rather than Larry :-)

Thing is, I definitely don't have a "vanilla" Windows 7 installed either here or at work. Both are Windows 64-bit OS's and both have all updates applied - security and otherwise. Neither of them exhibit this problem.

I'm leaning toward an issue with the Visual C++ run-times. Both of my Windows 7 boxes have Visual Studio 2008 installed with whatever versions of those DLLs and neither crash.



RE: Problem with TOAW Scenario Viewer

Posted: Mon May 23, 2011 3:41 am
by Anthony_MatrixForum
Arrghh

Of course, I mean Ralph [X(]

I think you are probably right about the runtimes being the problem

I am about to go to Win7 here at work, so I will get another sample ...

Anthony

RE: Problem with TOAW Scenario Viewer

Posted: Tue May 24, 2011 10:50 pm
by Anthony_MatrixForum
Well

I have finally managed to retest after installing SP1 for windows 7
It now (almost) works again ! - well it gets through the Ralph's Scenario.ReadScenario(filename) code
Now I had a new problem that did not appear before , but have also found the fix for that.

..... WARNING code stuff follows .....

My problem was with xmlserialisers and XSD generated code that _sometimes_ give rise to unhandled exceptions...

I use Ralph's code to read the XML, then use a System.Xml.Serialization.XmlSerializer to read the XML, deserialising it into XSD generated classes such as "GAME" etc.

The code sometimes bails out in the Deserialize method, complaining about a missing file.
If this sounds like it could be a posisble problem, then PM me for more details, as there i found a fix for my problem...

Cheers
Anthony