SyntaxEditor hangs when hosted in a ElementHost

SyntaxEditor for WPF Forum

Posted 12 years ago by 7Alpha7
Version: 11.2.0550
Platform: .NET 3.5
Environment: Windows Vista (32-bit)
Avatar
Hello,

I have just upgraded from 11.1.0545. I experienced a major bug with the new 11.2.0550 : the SyntaxEditor does not work anymore in my solution !

I host the SyntaxEditor in an ElementHost. It worked like a charm until the upgrade. I had color highlightning with my previous 11.1 version depending on language; I upgraded to get intellisense : now I have to change the SyntaxEditor to a basic TextBox to be able to work since the upgrade !

Steps to reproduce the behaviour :

- Create a new blank Windows Forms project
- Add a ElementHost to the default Form1
- Adds this code :

        public Form1() {
            InitializeComponent();
            elementHost1.Child = new SyntaxEditor();
        }
Run the application. The form will immediately hang.

Urgent fix or workaround needed. Thanks.

Comments (14)

Posted 12 years ago by Boyd - Sr. Software Developer, Patterson Consulting, LLC
Avatar
Not sure if this is the same problem you're having, but wanted to point out this post to you:

http://www.actiprosoftware.com/support/forums/viewforumtopic.aspx?ForumTopicID=6158

It appears that a few WPF controls are having a similar issue when used with WinForms. I had a problem with PopupButton, and the solution from that post got me moving again. Hopefully this will get you moving again. If not, I'm sure Actipro's excellent support will present a fix soon.
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Thanks Boyd, that is the correct information for this problem. It's a one-line code workaround until the next maintenance release, which likely will be out next week.


Actipro Software Support

Posted 12 years ago by 7Alpha7
Avatar
Thank you for the information. However, if the fix did the trick for the simple sample I provided, it didn't work in my solution. I got another error I don't understand either very well :

EDIT : if you add the intellisense framework and langage stuff the SyntaxEditor crashes when it tries to load resources as far as I had understood; please see my sample in the reply to the [2FE-166D03DF-C792] support ticket

A first chance exception of type 'System.Windows.Markup.XamlParseException' has occured in PresentationFramework.dll

Informations : the value '/ActiproSoftware.SyntaxEditor.Wpf;component/Themes/Includes/Common.xaml' cannot be set to the property 'Source' of the objet System.Windows.ResourceDictionary'. The URI prefix os not recognized. Error at the object 'System.Windows.ResourceDictionary'.



à System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType)
à System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext, Int32 lineNumber, Int32 linePosition, String message, Exception innerException)
à System.Windows.Markup.BamlRecordReader.ThrowExceptionWithLine(String message, Exception innerException)
à System.Windows.Markup.BamlRecordReader.ReadPropertyRecordBase(String attribValue, Int16 attributeId, Int16 converterTypeId)
à System.Windows.Markup.BamlRecordReader.ReadPropertyConverterRecord(BamlPropertyWithConverterRecord bamlPropertyRecord)
à System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
à System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord)
à System.Windows.Markup.TreeBuilderBamlTranslator.ParseFragment()
à System.Windows.Markup.TreeBuilder.Parse()
à System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
à System.Windows.SystemResources.ResourceDictionaries.LoadDictionary(Assembly assembly, String assemblyName, String resourceName, Boolean isTraceEnabled)
à System.Windows.SystemResources.ResourceDictionaries.LoadThemedDictionary(Boolean isTraceEnabled)
à System.Windows.SystemResources.FindDictionaryResource(Object key, Type typeKey, ResourceKey resourceKey, Boolean isTraceEnabled, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
à System.Windows.SystemResources.FindResourceInternal(Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
à System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce)
à System.Windows.FrameworkElement.UpdateThemeStyleProperty()
à System.Windows.FrameworkElement.OnInitialized(EventArgs e)
à System.Windows.FrameworkElement.TryFireInitialized()
à System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
à MS.Internal.FrameworkObject.ChangeLogicalParent(DependencyObject newParent)
à System.Windows.FrameworkElement.AddLogicalChild(Object child)
à System.Windows.Controls.UIElementCollection.SetLogicalParent(UIElement element)
à System.Windows.Controls.UIElementCollection.AddInternal(UIElement element)
à System.Windows.Controls.UIElementCollection.Add(UIElement element)
à ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView.#Kkc()
à ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView..ctor(SyntaxEditor syntaxEditor, EditorViewPlacement viewPlacement)
à #V2b.#w4b.#5oc(SyntaxEditor syntaxEditor, EditorViewPlacement viewPlacement)
à #V2b.#w4b.ResetViews(SyntaxEditor syntaxEditor)
à #V2b.#w4b.#8oc(SyntaxEditor syntaxEditor)
à ActiproSoftware.Windows.Controls.SyntaxEditor.SyntaxEditor..ctor()

[Modified at 12/03/2011 05:04 PM]
Posted 12 years ago by 7Alpha7
Avatar
Ok, I found a way to get rid of the problem, so that I still can have highligthing feature, but no completion nor quick info :

As previously indicated :

        static void Main() {
            ...
            new System.Windows.Application();
            ActiproSoftware.Windows.Controls.SyntaxEditor.SyntaxEditor s = new ActiproSoftware.Windows.Controls.SyntaxEditor.SyntaxEditor();
            ....
        }
Please not that I also have to instanciate a SyntaxEditor there or I will have a crash at a later instantiation.

Then, remove services on the right place :
        
        Language.UnregisterService<ActiproSoftware.Text.Languages.CSharp.Implementation.CSharpCompletionProvider>(); 
               Language.UnregisterService<ActiproSoftware.Text.Languages.CSharp.Implementation.CSharpQuickInfoProvider>();

But remember, my initial goal was to have intellisense and quick info !! Only pain and no gain.
Still stucked.
Posted 12 years ago by 7Alpha7
Avatar
Finally I got it !!

This is a very ugly trick to solve the problem : start a Wpf app which starts a winform app ... see below the code.

Fix appreciated in the next release.

        [STAThread]
        static void Main() {
            startWpfApp();
        }

        static void startWpfApp() {
            new System.Windows.Application();
            try {
                System.Windows.Application.Current.Run(new FakeWindow());
            }
            catch {
            }
        }

        class FakeWindow : System.Windows.Window {
            public FakeWindow() {
                Program.startWinApp();
                Close();
            }
        }

        static void startWinApp() {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }
[Modified at 12/04/2011 08:02 AM]
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello, we tried your sample on multiple machines of Windows 7, and even on XP but couldn't reproduce the crash you describe.

I did notice that your sample didn't reference the ActiproSoftware.Text.LLParser.Wpf.dll, which is a required reference if you are using the .NET Languages Add-on. As long as we had that referenced, there weren't any issues in the sample.

If you add that reference and it still happens, see if you can get any further inner exception detail from the exception that occurs. Otherwise you'll probably have to try the upcoming next build to see if the change we made helps, where you no longer need to create a WPF application.


Actipro Software Support

Posted 12 years ago by 7Alpha7
Avatar
I see the problem under Vista. You didn't mention it. XP is the best O/S ever though I don't use it anymore.

I cannot see why the ActiproSoftware.Text.LLParser.Wpf.dll would be required since it works without it if I start a Wpf App behind the scene. Have you looked at my sample ?

Indeed, after testing, it does not work either with ActiproSoftware.Text.LLParser.Wpf.dll if I dont start a Wpf App behind.

Now, I cannot see either why the next release would change anything if you don't change anything but the Wpf Application hang, which is NOT my actual problem.

--------------------------------------------------------------------------------
Exception msg :

La valeur 'System.Windows.Data.BindingExpression' ne peut pas être attribuée à la propriété 'Source' de l'objet 'System.Windows.Controls.Image'. Le préfixe URI n'est pas reconnu. Erreur à l'objet 'System.Windows.Data.Binding' dans le fichier de balisage 'ActiproSoftware.SyntaxEditor.Wpf;component/Themes/Includes/Styles/IntelliPromptCompletionList.xaml'.

Stack :

à System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType)
à System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext, Int32 lineNumber, Int32 linePosition, String message, Exception innerException)
à System.Windows.Markup.BamlRecordReader.ThrowExceptionWithLine(String message, Exception innerException)
à System.Windows.Markup.BamlRecordReader.SetDependencyComplexProperty(Object currentTarget, BamlAttributeInfoRecord attribInfo, Object o)
à System.Windows.Markup.BamlRecordReader.SetPropertyValueToParent(Boolean fromStartTag, Boolean& isMarkupExtension)
à System.Windows.Markup.BamlRecordReader.ReadElementEndRecord(Boolean fromNestedBamlRecordReader)
à System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
à System.Windows.StyleHelper.LoadOptimizedTemplateContent(DependencyObject container, ParserContext parserContext, OptimizedTemplateContent optimizedTemplateContent, FrameworkTemplate frameworkTemplate, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
à System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
à System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
à System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
à System.Windows.FrameworkElement.ApplyTemplate()
à System.Windows.FrameworkElement.MeasureCore(Size availableSize)
à System.Windows.UIElement.Measure(Size availableSize)
à System.Windows.Controls.Grid.MeasureOverride(Size constraint)
à System.Windows.FrameworkElement.MeasureCore(Size availableSize)
à System.Windows.UIElement.Measure(Size availableSize)
à ActiproSoftware.Windows.Controls.PixelSnapper.MeasureOverride(Size constraint)
à System.Windows.FrameworkElement.MeasureCore(Size availableSize)
à System.Windows.UIElement.Measure(Size availableSize)
à System.Windows.Controls.Control.MeasureOverride(Size constraint)
à System.Windows.FrameworkElement.MeasureCore(Size availableSize)
à System.Windows.UIElement.Measure(Size availableSize)
à ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.IntelliPromptCompletionList.#Jlc()
à ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.IntelliPromptCompletionList.OnApplyTemplate()
à System.Windows.FrameworkElement.ApplyTemplate()
à System.Windows.FrameworkElement.MeasureCore(Size availableSize)
à System.Windows.UIElement.Measure(Size availableSize)
à System.Windows.Controls.Decorator.MeasureOverride(Size constraint)
à System.Windows.FrameworkElement.MeasureCore(Size availableSize)
à System.Windows.UIElement.Measure(Size availableSize)
à System.Windows.Controls.Decorator.MeasureOverride(Size constraint)
à System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
à System.Windows.FrameworkElement.MeasureCore(Size availableSize)
à System.Windows.UIElement.Measure(Size availableSize)
à System.Windows.Controls.Decorator.MeasureOverride(Size constraint)
à System.Windows.FrameworkElement.MeasureCore(Size availableSize)
à System.Windows.UIElement.Measure(Size availableSize)
à System.Windows.Controls.Primitives.PopupRoot.MeasureOverride(Size constraint)
à System.Windows.FrameworkElement.MeasureCore(Size availableSize)
à System.Windows.UIElement.Measure(Size availableSize)
à System.Windows.Interop.HwndSource.SetLayoutSize()
à System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
à System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
à System.Windows.Controls.Primitives.Popup.PopupSecurityHelper.SetWindowRootVisual(Visual v)
à System.Windows.Controls.Primitives.Popup.SetRootVisualToPopupRoot()
à System.Windows.Controls.Primitives.Popup.CreateWindow(Boolean asyncCall)
à System.Windows.Controls.Primitives.Popup.OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
à System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
à System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
à System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
à System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
à System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
à System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
à System.Windows.Controls.Primitives.Popup.set_IsOpen(Boolean value)
à ActiproSoftware.Windows.Controls.SyntaxEditor.IntelliPrompt.Implementation.CompletionSession.OnOpened(EventArgs e)
à ActiproSoftware.Windows.Controls.SyntaxEditor.IntelliPrompt.Implementation.IntelliPromptSessionBase.Open(IEditorView view, TextRange textRange)
à ActiproSoftware.Text.Languages.CSharp.Implementation.CSharpCompletionProvider.RequestSession(IEditorView view, Boolean canCommitWithoutPopup)
à ActiproSoftware.Windows.Controls.SyntaxEditor.EditActions.RequestIntelliPromptAutoCompleteAction.Execute(IEditorView view)
à ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView.ExecuteEditAction(IEditAction action)
à ActiproSoftware.Windows.Controls.SyntaxEditor.Implementation.EditActionBase.#Bfc(Object sender, ExecutedRoutedEventArgs e)
à System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
à System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
à System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
à System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
à System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
à System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
à System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
à System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
à System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
à System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
à System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
à System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
à System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
à System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
à System.Windows.Input.CommandManager.TranslateInput(IInputElement targetElement, InputEventArgs inputEventArgs)
à System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e)
à System.Windows.Input.KeyEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
à System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
à System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
à System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
à System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
à System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
à System.Windows.Input.InputManager.ProcessStagingArea()
à System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
à System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
à System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
à System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
à System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
à System.Windows.Interop.HwndSource.System.Windows.Interop.IKeyboardInputSink.TranslateAccelerator(MSG& msg, ModifierKeys modifiers)
à System.Windows.Forms.Integration.ElementHost.ProcessCmdKey(Message& msg, Keys keyData)
à System.Windows.Forms.Control.PreProcessMessage(Message& msg)
à System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
à System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
à System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(MSG& msg)
à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.Run(Form mainForm)
à SyntaxEditorHangs.Program.startWinFormApp() dans E:\ASauvegarder\7Alpha7\Productif\Projets\_ActiproBugs\SyntaxEditorHangs\Program.cs:ligne 45

Inner Exception msg :

Le préfixe URI n'est pas reconnu.

Stack :

à System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
à System.Net.WebRequest.Create(Uri requestUri)
à MS.Internal.WpfWebRequestHelper.CreateRequest(Uri uri)
à System.IO.Packaging.PackWebRequest.GetRequest(Boolean allowPseudoRequest)
à System.IO.Packaging.PackWebRequest.GetResponse()
à MS.Internal.WpfWebRequestHelper.GetResponse(WebRequest request)
à System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri, Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable, Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream, SafeFileHandle& safeFilehandle)
à System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache)
à System.Windows.Media.Imaging.BitmapImage.FinalizeCreation()
à System.Windows.Media.Imaging.BitmapImage.EndInit()
à System.Windows.Media.Imaging.BitmapImage..ctor(Uri uriSource, RequestCachePolicy uriCachePolicy)
à System.Windows.Media.Imaging.BitmapImage..ctor(Uri uriSource)
à ActiproSoftware.Windows.Controls.SyntaxEditor.IntelliPrompt.Implementation.CommonImageSourceProvider.GetImageSource()
à ActiproSoftware.Windows.Controls.SyntaxEditor.IntelliPrompt.ImageSourceProviderConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
à System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
à System.Windows.Data.BindingExpression.Activate(Object item)
à System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
à System.Windows.Data.BindingExpression.AttachOverride(DependencyObject target, DependencyProperty dp)
à System.Windows.Data.BindingExpressionBase.Attach(DependencyObject target, DependencyProperty dp)
à System.Windows.Data.BindingExpressionBase.OnAttach(DependencyObject d, DependencyProperty dp)
à System.Windows.StyleHelper.GetInstanceValue(UncommonField`1 dataField, DependencyObject container, FrameworkElement feChild, FrameworkContentElement fceChild, Int32 childIndex, DependencyProperty dp, Int32 i, EffectiveValueEntry& entry)
à System.Windows.TemplateApplicationHelper.SetDependencyValueCore(DependencyObject dependencyObject, DependencyProperty dp, Object value)
à System.Windows.Markup.BamlRecordReader.SetDependencyValue(DependencyObject dependencyObject, DependencyProperty dependencyProperty, Object value)
à System.Windows.Markup.BamlRecordReader.SetDependencyComplexProperty(Object currentTarget, BamlAttributeInfoRecord attribInfo, Object o)

[Modified at 12/05/2011 10:16 AM]
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
LLParser is required by the .NET Languages Add-on since the grammar is using types from it. Perhaps it was working for you before since it's probably in your GAC and was getting loaded automatically.

In the next build we have fixed the issue that caused the lock if there was no WPF application created. So perhaps by you trying that and removing your code that creates a stub WPF application, it would help. Would you like us to email you a link to a preview build to test?

Please paste in a reply the text in your VS Output window when running your sample and reproducing the issue.

Also, have you applied the .NET 3.5 Service Pack 1? That is a requirement for some of our assemblies.


Actipro Software Support

Posted 12 years ago by 7Alpha7
Avatar
The crash is caused be the Intellisense stuff trying to load the UI and not the parsing stuff.

As far as I understand, the mechanics involved in the UI construction works by loading xaml resources pointed by an URI. This URI mechanics is ignored by the Win App.

The fact of creating the Wpf Application solves the lock problem but does not solve the URI problem. If I don't invoke the Run on the Wpf Application I have the crash.

So probably I imagine the Wpf App is doing some stuff initialisation regarding the URI mechanism that allows then the Win App to instanciante the SyntaxEditor without problems.

So I am Obviously sure that If you only solve the lock problem I still will have the URI problem. You should look at what a Wpf app do at init time to know what the win app is missing in my case. The fact is that I am not good at Wpf app and I cannot do it myself.

(yes I have the 3.5 SP1 installed)

In the output below I referenced the LL Parser so that your mind will be free from bad thinking :

'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\mscorlib.resources\2.0.0.0_fr_b77a5c561934e089\mscorlib.resources.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'E:\ASauvegarder\7Alpha7\Productif\Projets\_ActiproBugs\SyntaxEditorHangs\bin\Debug\SyntaxEditorHangs.vshost.exe' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\ActiproSoftware.SyntaxEditor.Addons.DotNet.Wpf\11.2.550.0__36ff2196ab5654b9\ActiproSoftware.SyntaxEditor.Addons.DotNet.Wpf.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\ActiproSoftware.SyntaxEditor.Wpf\11.2.550.0__36ff2196ab5654b9\ActiproSoftware.SyntaxEditor.Wpf.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\ActiproSoftware.Text.Addons.DotNet.Wpf\11.2.550.0__36ff2196ab5654b9\ActiproSoftware.Text.Addons.DotNet.Wpf.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\ActiproSoftware.Text.Wpf\11.2.550.0__36ff2196ab5654b9\ActiproSoftware.Text.Wpf.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_32\PresentationCore\3.0.0.0__31bf3856ad364e35\PresentationCore.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\WindowsBase\3.0.0.0__31bf3856ad364e35\WindowsBase.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\PresentationFramework\3.0.0.0__31bf3856ad364e35\PresentationFramework.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\System.Deployment\2.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\UIAutomationProvider\3.0.0.0__31bf3856ad364e35\UIAutomationProvider.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\WindowsFormsIntegration\3.0.0.0__31bf3856ad364e35\WindowsFormsIntegration.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
Le thread 0x1c98 s'est arrêté avec le code 0 (0x0).
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\ActiproSoftware.Text.LLParser.Wpf\11.2.550.0__36ff2196ab5654b9\ActiproSoftware.Text.LLParser.Wpf.dll' chargé
Le thread 0x1878 s'est arrêté avec le code 0 (0x0).
Le thread 0x2428 s'est arrêté avec le code 0 (0x0).
'SyntaxEditorHangs.vshost.exe' (Managé) : 'E:\ASauvegarder\7Alpha7\Productif\Projets\_ActiproBugs\SyntaxEditorHangs\bin\Debug\SyntaxEditorHangs.exe' chargé, symboles chargés.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\ActiproSoftware.Shared.Wpf\11.2.550.0__36ff2196ab5654b9\ActiproSoftware.Shared.Wpf.dll' chargé
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\UIAutomationTypes\3.0.0.0__31bf3856ad364e35\UIAutomationTypes.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\PresentationFramework.Aero\3.0.0.0__31bf3856ad364e35\PresentationFramework.Aero.dll' chargé, chargement des symboles ignoré. Le module est optimisé et l'option du débogueur 'Uniquement mon code' est activée.
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\PresentationFramework.resources\3.0.0.0_fr_31bf3856ad364e35\PresentationFramework.resources.dll' chargé
'SyntaxEditorHangs.vshost.exe' (Managé) : 'Anonymously Hosted DynamicMethods Assembly' chargé
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\PresentationCore.resources\3.0.0.0_fr_31bf3856ad364e35\PresentationCore.resources.dll' chargé
'SyntaxEditorHangs.vshost.exe' (Managé) : 'C:\Windows\assembly\GAC_MSIL\System.resources\2.0.0.0_fr_b77a5c561934e089\System.resources.dll' chargé
Une exception de première chance de type 'System.Windows.Markup.XamlParseException' s'est produite dans PresentationFramework.dll

Informations supplémentaires : La valeur 'System.Windows.Data.BindingExpression' ne peut pas être attribuée à la propriété 'Source' de l'objet 'System.Windows.Controls.Image'. Le préfixe URI n'est pas reconnu. Erreur à l'objet 'System.Windows.Data.Binding' dans le fichier de balisage 'ActiproSoftware.SyntaxEditor.Wpf;component/Themes/Includes/Styles/IntelliPromptCompletionList.xaml'.

[Modified at 12/05/2011 10:56 AM]
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes, we see that the problem is binding the image sources to the Image in the completion list template. That portion of the template code has not been changed since 11.1 though.

Plus as I mentioned, your sample ran fine on multiple machines here and displayed icons in the completion list.

I'm going to reply to your support ticket with a link to a preview build. I'd still like you to try that and remove all the code tweaks you added to your app startup to work around the lock issue. We need to rule that out.


Actipro Software Support

Posted 12 years ago by 7Alpha7
Avatar
The fact is that before installing the 11.2, it worked, and just after it didn't work anymore. So, I can hardly see something else than the 11.2 release as the cause of the problem.

I am not sure I'll have the time to try the preview release. I'll see.

[Modified at 12/05/2011 12:11 PM]
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We understand that however since we are unable to reproduce it here at all, we have been trying to work with you to figure out what the problem could be. Trying what we emailed you about is another step towards trying to narrow it down.


Actipro Software Support

Posted 12 years ago by 7Alpha7
Avatar
Ok, I've just tried. So, it worked. That's it. No System.Windows.Application(), nothing.

The thing is that we'll never know what exactly was the problem.

Thank you for the preview release and still continue to produce good work !

[Modified at 12/05/2011 12:24 PM]
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Great, glad to hear it. We'll try and push out an official build 551 in the next day or two. Please update to that when it's out.


Actipro Software Support

The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.