Idera nSoftware Compellent

bug: STA mode preference ignored

rated by 0 users
This post has 5 Replies | 3 Followers

Top 10 Contributor
Posts 69
Microsoft MVP
Top Contributor
Hal Rottenberg Posted: 03-10-2009 8:34 AM

I just noticed that my PowerBoots module didn't load as it complained I was in MTA mode.  I restart PSPlus and held down shift to check the setting and it is correct.  

§ ATLLAPHROTTENBE {~} [System.Threading.Thread]::CurrentThread.ApartmentState

MTA

Top 10 Contributor
Posts 437
Idera Employee

Sorry for the confusion here. It was a last minute decision to turn off support for STA mode due to issues we are have supporting multiple versions of PowerShell v2 (CTP2, CTP3) and PowerShell v1.

Here is the note that was added to the Release Notes:

"STA mode setting has no effect when you are running PowerShell v1. Using STA mode with PowerShell v2 can in certain cases cause instability issues because of changes made between CTP2 and CTP3. For this reason, the –STA mode has been disabled and will not be supported in Beta 2. We are working with Microsoft to resolve this issue before we release this version of PowerShell for General Availability."

Top 10 Contributor
Posts 69
Microsoft MVP
Top Contributor

Wow, umm ok.  I wish you made it a hiden option or something because I actually am getting into a lot of things that require STA now. If Tobias had been able to make it to the MVP Summit, he would understand--the topic of domain-specific languages for GUI toolkits over WPF (i.e. PowerBoots and WPK) was discussed very heavily there.  

Any chance of getting it put back in and you simply toggle the default back to MTA?

TIA

Top 10 Contributor
Posts 437
Idera Employee

Yes, Tobias is working with Microsoft to sort it out. Problem is with changes they have made to the PowerShell core engine method signatures between 1.0, CTP2, and CTP3. What you say - Microsoft has broken backward compatibility in it's interface calls :-) Looks like we may need to support multiple assemblies, which is quite ugly. Leaving the support in started creating issues with COM objects and code completion, among other things. We will make every effort to provide support for MTA and STA before we RTM.

Top 500 Contributor
Posts 1

The previous beta had an incompability with Quest AD cmdlets, this is now resolved for which I'm very glad.

But now no boots!

RTM 1 is excellent of course, but that one won't let me ctrl-break without losing or inconveniencing my work (I make too many mistakes not to occassionally run something I need to cancel asap, lol)

 

I'm sure with Tobias and MS working on the incompatibility, light is surely at the end of the tunnel for these     ;-)

 

 

Incidentally I'd be happy to have STA mode an option, whereby I accept the Com Object and Code Completion issue you mention above is a sideaffect of using STA mode with the current beta

-Might make troubleshooting and testing for Idera staff more complex though-

Top 10 Contributor
Posts 209

From a developer point of view, we are currently experiencing a rough ride. Many of you are using PowerShellPlus Beta on Windows 7 Beta with PowerShell V2 Alpha(!), and all of these still have their issues. Combined, it is sometimes a nightmare.

So you better understand what is going on, I'd like to tell you what we are experiencing:

  • PowerShell CTP3 introduced an accidental breaking change in code compatibility with V1 so any PS app compiled against V2 will not run well on V1. Some of the things you notice is that certain functionality raise exceptions, COM objects die or .NET code fails. This is why after we discovered this we made a last minute decision to compile against V1 and lose STA support for this beta2. You can safely assume though that we find a good way to bring it back in the final release.
  • Windows 7 and R2 have a bug that can lead to .NET software terminating without any notice or random "Access Violation" exceptions. We are working closely with MS to resolve this. On Win7 and R2, currently with PowerShellPlus you will experience that it may not launch or die. As far as we know, the bug has been fixed meanwhile. However, it will take some time until we all get our hands on the recent Win7 builds that have the fix.

We are working hard on fixing all issues and provide maximum compatibility with Beta2. I hope you can appreciate our efforts and what it means to work against so many beta products at the same time.

Cheerio

Tobias

 

 

Page 1 of 1 (6 items) | RSS
Copyright 2010 PowerShell.com. All rights reserved.