← Zurück

Current thread is not a GUI.

в Ecng.Xaml.XamlHelper.get_CurrentThreadDispatcher() в Ecng.Xaml.ThreadSafeObservableCollection1..ctor() в StockSharp.Xaml.LogSourceNode..ctor(ILogSource source, ILogSourceNodeModel model) в StockSharp.Xaml.Monitor.WriteMessage(LogMessage message) в StockSharp.Xaml.MonitorWindow.WriteMessage(LogMessage message) в StockSharp.Algo.Logging.LogManager.#=qGeh36Vei8L6f1oWxJdvWcSD12ql8UJ3_MM_HPAyIGmo=.#=qbFU0_hQmPdEVgy$5hpLwQ7_40oMMPG3ZNrMW8RzgJSc=(ILogListener #=qbCCQmBlM1u2uuCK7rSV7rQ==) в Ecng.Collections.CollectionHelper.ForEach(IEnumerable1 source, Action1 action) в StockSharp.Algo.Logging.LogManager.#=qMwTwnUbjatZIirXYK6IiAw==(LogMessage #=qilkdQE6Awb54Cttk_wCsaQ==) в Ecng.Common.DelegateHelper.SafeInvoke(Action1 handler, T arg) в StockSharp.Algo.Strategies.Strategy.#=q16rLd5GufpqId_xQfm5KLlCAFboOGHxJkAci3_ZfSe4=.#=q_gVYbZ3_vz2OC3pqrDNXDw==() в StockSharp.Algo.Strategies.Strategy.#=qwzmGrKnG$0lhDHOD3BPyMGqMtCUpD4zmE4ZovW679s0=.#=qIY4NSkrOUQY91f7HhBy6p7Cx5XB$mdJRFi0Q7LbZpec=() в StockSharp.Algo.Strategies.Strategy.#=q_$cxmCU6UPeT_kP1tn$thBTjIo$nMsHOpDKotZ1Jer8=.#=qwEXezyN8$Qnv4LlY1r$ogg==(Action #=qfUmJaCDLMZTTl9LPChvV9A==) в StockSharp.Algo.Strategies.Strategy.#=qx7hHCN5UuFCs4lvsx84z5g==(Action #=q136HMyGLJ0sU$5W4wyRK7w==) в StockSharp.Algo.Strategies.Strategy.AddLog(LogMessage message) в Ecng.Common.DelegateHelper.SafeInvoke(Action1 handler, T arg) в StockSharp.Algo.Strategies.Strategy.#=q16rLd5GufpqId_xQfm5KLlCAFboOGHxJkAci3_ZfSe4=.#=q_gVYbZ3_vz2OC3pqrDNXDw==() в StockSharp.Algo.Strategies.Strategy.#=qwzmGrKnG$0lhDHOD3BPyMGqMtCUpD4zmE4ZovW679s0=.#=qIY4NSkrOUQY91f7HhBy6p7Cx5XB$mdJRFi0Q7LbZpec=() в StockSharp.Algo.Strategies.Strategy.#=q_$cxmCU6UPeT_kP1tn$thBTjIo$nMsHOpDKotZ1Jer8=.#=qwEXezyN8$Qnv4LlY1r$ogg==(Action #=qfUmJaCDLMZTTl9LPChvV9A==) в StockSharp.Algo.Strategies.Strategy.#=qx7hHCN5UuFCs4lvsx84z5g==(Action #=q136HMyGLJ0sU$5W4wyRK7w==) в StockSharp.Algo.Strategies.Strategy.AddLog(LogMessage message) в StockSharp.Algo.Logging.LoggingHelper.#=qhf476u$YOvWwcd4pMvh2tQ==(ILogReceiver #=qrS6wynn4h7MBWJKzk5ecQw==, ErrorTypes #=qOW628I24XFTWaXWhfzrZVw==, String #=q0lvOoCOJVBVT4_cZ6TqEFw==, Object[] #=qAnO_O$GWEEFKoSEwBxoQcg==) в StockSharp.Algo.Logging.LoggingHelper.AddInfoLog(ILogReceiver receiver, String message, Object[] args) в StockSharp.Algo.Strategies.Strategy.#=q8scNkZv6vSU_hKHBDHAtW8RtgIa5vup4v6umj4HdJJc=(ProcessStates #=q1xFaIJHL71DVI4$Quq_DdQ==) в StockSharp.Algo.Strategies.Strategy.#=qoK6mHI$CB4n2lfCz9bYryVWBrJHX2mZen1TTdehTQ2E=.OnAdding(Strategy #=qz2NDeYXXazvj5DqXbE1VEg==) в Ecng.Collections.BaseCollection1.Add(T item) в Ecng.Collections.SynchronizedCollection`1.Add(T item) в syntetictrader.SynteticStrategy.CreateChildeSOA(Security sec, Decimal strike, DateTime expdt, Decimal mp) в

При добавлении дочерней стратегии "третьего уровня" (this.ChildStrategies.Add(newchilde);) выскакивает исключение описанное выше.

upd: закоментировал вот это _logman.Listeners.Add(_monitor); и все заработало

Подскажите в чем может быть проблема?

War dieses Thema hilfreich?

Thema teilen

Kommentare (2)

Anmelden oder Konto erstellen, Melden Sie sich an oder registrieren Sie sich, um einen Kommentar zu hinterlassen

Alexander
Alexander

Посмотрите, что такое GuiLogListener.

Serg
Serg Autor

Да моя ошибка надо было делать так _logman.Listeners.Add(new GuiLogListener(_monitor)); Спасибо

FinDirector