SampleDataInstallerClass -> cross-thread error...
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



SampleDataInstallerClass -> cross-thread...Expand / Collapse
Author
Message
Posted 01/23/2008 10:56:32 AM


StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: Today @ 3:16:50 AM
Posts: 38, Visits: 1,079
Hi there,

maybe I'm doing something stupid, but I tried the SampleDataInstallerClass from the Example.zip for C#. I unpacked the examples to the projects directory and opened the solution with VS2005. Then I corrected the references to my new strataframe components on my machine and started debugging.

I tried the Pre-Build Dialogs, but as soon as I click on the combobox to choose the server, I get an exception in MDDeployMain.vb at

 '-- Clear the combo

cboSQLServer.Items.Clear()

telling me, there is a cross-thread call exeption.

Therefore I can't choose any server and have to stop debugging.

Any hint?

TIA and friendly greetings, Ralph

Post #13684
Posted 01/24/2008 8:58:34 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 04/30/2008 4:02:12 PM
Posts: 2,647, Visits: 1,861
Could you show the code where you are creating and showing the MDDeployMain form? 

Are you calling .Show() on the form or .ShowDialog() on the form?


www.bungie.net
Post #13701
Posted 01/24/2008 10:05:54 AM


StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: Today @ 3:16:50 AM
Posts: 38, Visits: 1,079
Hi Ben,

"I unpacked the examples to the projects directory and opened the solution with VS2005. Then I corrected the references to my new strataframe components on my machine and started debugging."

I used the CSharpDemos.exe examples from Microfour for StrataFrame - http://forum.strataframe.net/Topic5397-17-1.aspx without any changes other than to correct the references.

Can you reproduce the error with the example like it is?

TIA and friendly greetings, Ralph

Post #13710
Posted 01/27/2008 11:29:39 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 3:24:00 PM
Posts: 3,733, Visits: 3,926
Ralph,

I ran the C# sample that gets installed with the framework (instead of the one from the forum) and did not have any issues.  The one from the forum was ultimately added to the install.  Click Start -> StrataFrame -> Samples -> C# -> Database Installer Sample.  Run this sample to see if you have the same issue.  I am not having any issues with the sample.  If you are running the installer class (not the standard part of the sample) through an installation, then you have to take this into account if you are executing the install on another thread by creating a delegate or a synchronization object (ISynchronizeInvoke).  But if you are just running the WinForms sample, then I cannot reproduce.  Any additional details would be helpful

Post #13753
Posted 02/04/2008 1:49:45 AM


StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: Today @ 3:16:50 AM
Posts: 38, Visits: 1,079
Hello Trent,

> I ran the C# sample that gets installed with the framework (instead of the one from the forum) and did not have any issues.  The one from the forum was ultimately added to the install.  Click Start -> StrataFrame -> Samples -> C# -> Database Installer Sample.  Run this sample to see if you have the same issue. <

Yes, I do. Unfortunately. I did exactly what you described:

I clicked on 'Pre-Build Dialogs', then 'Next' without touching anything else, after that I clicked on the little down arrow at the combobox for selecting an SQL Server.

At this point I get the following error message:

 'System.InvalidOperationException was unhandled by user code
  Message="Ungültiger threadübergreifender Vorgang: Der Zugriff auf das Steuerelement cboSQLServer erfolgte von einem anderen Thread als dem Thread, für den es erstellt wurde."
  Source="System.Windows.Forms"
  StackTrace:
       bei System.Windows.Forms.Control.get_Handle()
       bei System.Windows.Forms.Control.SendMessage(Int32 msg, Int32 wparam, Int32 lparam)
       bei System.Windows.Forms.ComboBox.NativeClear()
       bei System.Windows.Forms.ComboBox.ObjectCollection.ClearInternal()
       bei System.Windows.Forms.ComboBox.ObjectCollection.Clear()
       bei MicroFour.StrataFrame.DBEngine.Deployment.MDDeployMain.LoadSQLServers()
       bei MicroFour.StrataFrame.DBEngine.Deployment.MDDeployMain.sqlWorker_DoWork(Object sender, DoWorkEventArgs e)
       bei System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
       bei System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

Maybe there is something wrong with my machine?

TIA and friendly greetings,

Ralph


 

  Post Attachments 
SampleDataInstallerClassError.jpg (5 views, 100.03 KB)

Post #13974
Posted 02/05/2008 10:29:16 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 3:24:00 PM
Posts: 3,733, Visits: 3,926
Maybe there is something wrong with my machine?

It is funny that you mentioned this....you are getting a cross-thread violation, which we have run into an issue recently where one machine would get the error and not another.  The difference had to do with AMD dual cores and another machine with an Intel HyperThreading procesor.  Strange, but true.  I wonder if there is something along these lines going on here.  I will look to see if there is some other precaution that we could take to aid in preventing this.  Thanks for the info.

Post #14014
Posted 02/05/2008 12:26:18 PM


StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: Today @ 3:16:50 AM
Posts: 38, Visits: 1,079
Hi Trent,

my machine is equipped with an AMD Athlon 64X2 Dual Core Processor 4200+ / 2,21GHz, 1,00 GB Ram.

Unfortunately I can't run a test against a machine equipped with Intel chipset and processor because I do not have one near around. Are you using Intel without that problem? Then my next machine will surely have Intel on board.

Thank you very much and friendly greetings,

Ralph

Post #14024
Posted 02/05/2008 12:38:14 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 3:24:00 PM
Posts: 3,733, Visits: 3,926
Actually I am using an AMD X2 Dual Core 6400+ ... I will still look into the issue to see if there is something that can be done.  Thanks.
Post #14025
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor