Posted 18 years ago by phruby
Avatar
I'm using SyntaxEditor version 3.1.0213. On some of my customer machines, they see a big red X where the SyntaxEditor control should be. Other customer machines work fine. They are all using the same exact version of the software. Any ideas on what to look for?

Comments (13)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
That would only happen if an exception occurs during the painting of the
control. Can you debug the program and in VS set to catch exceptions when
they are thrown? That way we can try and narrow down the issue.

We haven't heard any other reports of this happening. Looking at the release notes for build 213, I'm not really seeing any changes that I would think could cause
this to happen since the previous version. What build did you run prior to build 213 and did it work without any problems in that one?

Let us know what you find so we can help resolve this.


Actipro Software Support

Posted 18 years ago by László Mohácsi
Avatar
I am having the same issue with 4.0 final -
big red X (exception during onPaint)
That was my "oops" post. Hope this helps.
Posted 18 years ago by phruby
Avatar
Yah, here is my JIT

> System.ArgumentOutOfRangeException: Index was out of range. Must be
> non-negative and less than the size of the collection.
> Parameter name: index
> at System.Collections.ArrayList.get_Item(Int32 index)
> at ActiproSoftware.SyntaxEditor.DisplayLineCollection.get_Item(Int32
> index)
> at ActiproSoftware.SyntaxEditor.EditorView._2(Graphics , Rectangle )
> at ActiproSoftware.SyntaxEditor.EditorView.OnRender(PaintEventArgs e)
> at ActiproSoftware.WinUICore.UIElement.Render(PaintEventArgs e)
> at
> ActiproSoftware.WinUICore.UIControl.OnRenderChildElements(PaintEventArgs
> e)
> at ActiproSoftware.WinUICore.UIControl.Render(PaintEventArgs e)
> at ActiproSoftware.WinUICore.UIControl._1(PaintEventArgs )
> at ActiproSoftware.WinUICore.UIControl.OnPaint(PaintEventArgs e)
> at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e,
> Int16 layer, Boolean disposeEventArgs)
> at System.Windows.Forms.Control.WmPaint(Message& m)
> at System.Windows.Forms.Control.WndProc(Message& m)
> at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
> at ActiproSoftware.SyntaxEditor.SyntaxEditor.WndProc(Message& m)
> at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
> at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
> at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
> IntPtr wparam, IntPtr lparam)
Posted 18 years ago by phruby
Avatar
We've found that you need to reset your caret offset back to zero before loading the language file.

_editor.Caret.Offset=0
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
If you are able to duplicate this problem in our sample app, please let us know so that we can debug it and make a fix. We haven't been able to dupe it yet. Thanks.


Actipro Software Support

Posted 18 years ago by Adam Dickinson
Avatar
Here's another callstack after a Red X.

Paste text with Ctrl+V:

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at ActiproSoftware.SyntaxEditor.LexicalState.a(StringBuilder A_0, Int32& A_1, Int32 A_2, LexicalPattern& A_3)
at ax.a(SyntaxLanguage A_0, StringBuilder A_1, Int32& A_2, Int32 A_3, o A_4, Token A_5, Int32 A_6)
at ActiproSoftware.SyntaxEditor.Document.a(DocumentModification A_0)
at ActiproSoftware.SyntaxEditor.Document.a(DocumentModificationType A_0, Int32 A_1, Int32 A_2, String A_3, Boolean A_4)
at ActiproSoftware.SyntaxEditor.Document.UndoableInsert(DocumentModificationType type, Int32 offset, Int32 length, String text, Boolean retainSelection)
at ActiproSoftware.SyntaxEditor.Document.UndoableInsert(DocumentModificationType type, Int32 offset, Int32 length, String text)
at ActiproSoftware.SyntaxEditor.EditorView.a(DocumentModificationType A_0, String A_1)
at ActiproSoftware.SyntaxEditor.Commands.PasteFromClipboardCommand.Execute(EditCommandContext context)
at ActiproSoftware.SyntaxEditor.MacroRecording.a(EditCommand A_0, EditCommandContext A_1)
at ActiproSoftware.SyntaxEditor.EditorView.a(EditCommand A_0, Boolean A_1)
at ActiproSoftware.SyntaxEditor.EditorView.RaiseEditCommand(EditCommand command)
at ActiproSoftware.SyntaxEditor.EditorView.PasteFromClipboard()
at ragScriptEditorShared.ScriptEditor.ExecuteAppAction(AppAction action)
at ragScriptEditor.Form1.ExecuteAppAction_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripMenuItem.ProcessCmdKey(Message& m, Keys keyData)
at System.Windows.Forms.ToolStripManager.ProcessShortcut(Message& m, Keys shortcut)
at System.Windows.Forms.ToolStripManager.ProcessCmdKey(Message& m, Keys keyData)
at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
at TD.SandDock.DocumentContainer.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
at TD.SandDock.DockControl.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)

Edit: this was on 3.1.211

[Modified at 10/12/2006 11:00 AM]
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Are you able to duplicate this in a small project or post detailed steps on how to make it happen in our sample? That procedure where it occurred is huge and these sort of things are near impossible to track down unless we can debug them in house via a project that reproduces the bug.


Actipro Software Support

Posted 18 years ago by Adam Dickinson
Avatar
Nope. Just like with everybody else, it's a seemingly random occurrence. Believe me, if I could reproduce it myself, I'd be all over it.
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I don't believe I've ever seen any exceptions reported for in that procedure. Are you doing anything like dynamic modification of patterns in your language?


Actipro Software Support

Posted 18 years ago by Adam Dickinson
Avatar
Ah yes. We load a Language Defintion XML file that specifies our built-in keywords, but at run-time we parse the user's file(s) looking for user-defined functions and keywords. We only perform the dynamic modifications at certain times such as On File Save, and On Tab Select. It's a blocking call (unfortunately).
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Adam, I think I located what was causing this and fixed it for the next maintenance release. It was happening due to the order of procedures that occurred when IsUpdating was set to false after dynamically adding/removing patterns.


Actipro Software Support

Posted 18 years ago by Adam Dickinson
Avatar
Excellent. We look forward to picking up the fix.
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
It's up now.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.