Black Areas on Editor Pane

SyntaxEditor for Windows Forms Forum

Posted 16 years ago by Wielage Dirk
Version: 4.0.0253
Avatar
Hi,

we’re using the Actipro editor in an unmanaged Application! In some uncommon situations parts of the editor pane getting black!

This situation occurs if switching between our and other applications! Sometimes the complete editor gets black!

Currently we did not know how to work around this problem! We also don’t know why it is black! Does the editor internally paint out of a bitmap which is maybe not complete filled?

Any idea what is going on here?

Thanks for any help or tips where to look for.
Dirk

Comments (10)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I've not heard of that happening for a long time. I would urge you to upgrade to the latest maintenance release for v4.0. You are far back on releases and something could have been done since then that affects this.


Actipro Software Support

Posted 16 years ago by Wielage Dirk
Avatar
What was the problem in that case?

Could we workaround the problem?

We have tested a lot of time with the version of the editor and our only problem is the black areas!

Will it be hard to migrate to the current version! We also use the .Net language Addon and have written our own VB-Script implementation of a MergableSyntaxLanguage! Whith Lexer Parser and all this stuff!

We planed to migrate to the next version with the next version of our software. So for us in our current situation it would be very helpful to know how to workaround the problem or to get more information to understood the problem!

Dirk
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We are unaware of any current issues with black areas, even going back to the version you have. I think any issues were well before that. However we did make a WinUICore change after the version you have in regards to the double buffer. This could possibly help your situation. Again I would encourage you to try the latest maintenance release just to see if this change does resolve your issue or not.

If you do find that it resolves this issue, migration should be pretty straightforward from that build to the current one, the release history in the Readme gives details on any breaking changes.


Actipro Software Support

Posted 16 years ago by Wielage Dirk
Avatar
Know I switched to Version 4.0.0272 and the problem with the black areas still occur!

What scenario can cause such a problem? Is there a workaround maybe refreshing the internal Bitmap out of which the Editor draws?

The editor is embedded into a tab control and each Page contains one editor control. If loading a Workspace into our Application (a lot of Tabs with files will be opened), only on a few pages the problem occurs.

Activating an other page and back to the corrupted page will fix the problem. But loading the workspace the next time will lead to the same error.

Dirk
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
It sounds like you are running out of GDI memory. So the backbuffer isn't being able to be created and you end up with a black region. You can run into this if you have a lot of controls open.

We have a way you can remove memory used by double buffers when the control is not used, like on an invisible tab. We would like to implement this automatically but Windows Forms doesn't properly inform us when an ancestor control is made invisible.

So what I would recommend is, when you have a tab switch and one tab with SyntaxEditor on it is hidden, call SyntaxEditor.ResetDoubleBufferCanvas(true) on that SyntaxEditor instance. I bet that will fix this.


Actipro Software Support

Posted 16 years ago by Wielage Dirk
Avatar
Hi

I tested ResetDoubleBufferCanvas but no success. The black areas are still there. According to the GDI Handles I don’t think that it is a problem! The taskmanager shows me 2000 used GDI handles. The border should be 10000 (but I am not sure in that point)

If I see the black area in the editor and then switch to a other application, so that our application gets inactive the editors refreshes all black areas! This should also not work if there were not enough GDI handles.

But I will do some more tests with ResetDoubleBufferCanvas and inform you about the results but that might be next week!
Posted 16 years ago by Wielage Dirk
Avatar
Sorry for the long break.

There was some other things to do but know the problem is more clear and i have a small test application which makes it easy for you to reproduce the problem! (i will mail it to you if you send me your email)

the problem is that we use the VisualStudio2005SyntaxEditorRenderer to set the border to the style to ActiproSoftware.Drawing.SimpleBorderStyle.None. If we change this line to ActiproSoftware.Drawing.SimpleBorderStyle.Solid all problems disappear!

There some further steps which you need to do to reproduce the problem. You must have more than one editor. We use one editor for one TabPage in a TabControl!

- If both editors display text scroll one of both to the bottom!
- Switch to the other page
- resize (increase) the Application window
- switch back to the previous tab where scrolled down the page => The page show a big black area

again i can send you a test application if you have problems to follow the behavior on your pc

Dirk
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes please email this project to our support address. Thanks!


Actipro Software Support

Posted 16 years ago by Wielage Dirk
Avatar
Mail send!

Dirk
Posted 16 years ago by Wielage Dirk
Avatar
Thanks for your help, that it will work in next release!
Dirk
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.