PDA

View Full Version : مشکل در دیباگ کردن پروژه



sajadf7
شنبه 29 اسفند 1394, 19:52 عصر
سلام
من تو برنامه ام به یک مشکلی برخورد کردم که هر چی هم گشتم تونستم مشکلم رو حل کنم
با این خطا مواجه میشم :

ContextSwitchDeadlock was detected
Message: The CLR has been unable to transition from COM context 0x3d8280 to COM context 0x3d83f0 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.


ترید مربوط به ای خطا رو هم به ای شکل استارت کردم :
button7.Visible = false;
button30.Visible = true;

t_upres = new Thread(upgraderes);
t_upres.SetApartmentState(ApartmentState.STA);
t_upres.IsBackground = true;
t_upres.Start();
ممنو میشم راهمایی کنید این خطا مربوط به چی هست