- This topic has 14 replies, 2 voices, and was last updated 8 years, 12 months ago by Scurra.
-
AuthorPosts
-
October 12, 2015 at 10:42 am #36702ScurraParticipant
Hi,
I am having a problem with the TsTrackBar. Unfortunately, I could not reproduce the problem in a simple demo-application. All I can do for the moment is to describe you the problem and sending you a call stack. Maybe you have had a similar problem in the past or you have an idea of what's going wrong.
First, I will explain you what I am doing:
I have a form in my application which contains a TsTrackbar. Assume that the form is initially not in the maximized state. I place the cursor over the titlebar of the form and hold the left mouse-button. Now I drag the form to the upper border of the screen and release the mouse button. As usual, the form is maximized. But after releasing the mouse button, an EInvalidGraphicOperation exception with message “Scan line index out of range” is thrown. The same exception is thrown, when the form is initially in the maximized state. After I drag the titlebar away from the upper border of the screen (the form is no longer maximized) and releasing the mouse button, the same exception is thrown (with the same message).
The exception does not occur when I maximize the form by double clicking the titlebar or when using the “maximize”-button in the titlebar.
I have attached the call stack created by EurekaLog. Using the debugger, I found that GetScanline (the method which raises the exception) is called with parameter Row = 1.
I am pretty sure that the error originates from the TsTrackBar because when I de-activate the skinManager or when I replace the TsTrackBar by a TTrackBar the exception does not appear anymore.
The problem is not that urgent as the exception is absorbed somewhere and does not seem to have any side-effects. So it is no problem for me if you first solve problems which are more important than this one :). I continue trying to create a simple demo-project which reproduces the error.
October 13, 2015 at 8:33 am #54099SupportKeymasterHello! Maybe you can give me Dfm-file for the form with this TrackBar? I'll try to repeat the error with this file.
October 15, 2015 at 8:26 am #54129ScurraParticipantUnfortunately, I am not allowed to send you the dfm-file. I am still trying to reproduce the problem by a simple application but so far without success.
I found out, that in the first line of procedure TsTrackBar.PaintThumb, the rectangle is set to (Left, Top, Right, Bottom) = (0, 0, 1, 1).
Later, the local procedure ReturnToCache is called and from there the procedure Stretch. Here, the thrid and the fourth parameter are 1 (because of the width/height of the rectangle above). This causes the error in Stretch because in line 5975, ScanLine[1] is called. 1 is the height of the rectangle/bitmap and hence the exception will be raised from the Graphics unit.
The question is now, why the rectangle has a width/height of only 1. So far, I could not find the reason.
I will write you, if I have some more information for you.
(I am using AlphaControls V10.18 and Delphi XE.)
October 17, 2015 at 4:05 pm #54134SupportKeymasterQuote:The question is now, why the rectangle has a width/height of only 1. So far, I could not find the reason.Which skin used?
October 20, 2015 at 9:45 am #54145ScurraParticipantI could still not reproduce the error 🙁 but I simplified the skin as much as possible. The skin-file is attached to this post.
The behavior using this skin is now even worse: When I resize the form by dragging the form's border, the same exception as reported above is raised. However, applying the procedure written in the first post of this topic for maximizing/de-maximizing the form, the exception occurs only when maximizing the form (not when de-maximizing the form).
Some additional notes:
– The exception does not occur anymore when I remove section “FORM”, “BAR” or “PANEL” from the skin.
– The critical TsTrackbar is placed on some panels, i. e. the structure looks like
Code:sPanel1
sPanel2
…
sPanel9
sTrackBar1where some of the panels use skin-section “BAR” and some of them use skin-section “PANEL”.
October 24, 2015 at 6:49 am #54160SupportKeymasterThank you, I will check it.
October 28, 2015 at 7:19 am #54195SupportKeymasterThis skin have no images, it's mistake?
October 28, 2015 at 10:02 am #54198ScurraParticipantNo, its not a mistake. I just simplified the skin as much as possible such that the error still occurs.
October 28, 2015 at 11:04 am #54200SupportKeymasterThis TrackBar has horizontal or vertical position?
October 29, 2015 at 6:12 am #54235ScurraParticipantIts position is horizontal.
November 3, 2015 at 7:40 am #54269SupportKeymasterI can't reproduce it, unfortunately. Maybe you has a some demo-application already?
November 3, 2015 at 2:29 pm #54275ScurraParticipantOk, no problem. I can't reproduce it neither. If I get additional information or a demo-application, I will contact you again.
November 10, 2015 at 9:01 am #54296ScurraParticipantOk, now I have good and bad news:
I integrated AlphaControls 10.20 which fixed the bug with the TsTrackbar. Now, however, I have display-bugs with some panels.
The properties in the dfm-file of one of these panels looks as follows:
Code:object pnlTest: TsPanel
Left = 758
Top = 0
Width = 26
Height = 132
Margins.Left = 0
Margins.Top = 0
Margins.Right = 0
Margins.Bottom = 0
Align = alRight
BevelEdges = []
BevelOuter = bvNone
Padding.Left = 7
Padding.Top = 2
Padding.Bottom = 2
TabOrder = 2
SkinData.SkinSection = 'BAR'The skin 'BAR' in Options.dat looks as follows:
[BAR]
GRADIENTPERCENT=0
OUTERMODE=1
Am I doing something wrong? I tried to fix the problem by using TsPanel.Invalidate, .Repaint, .Refresh and .Update at the end of the FormResize-procedure.
When I can reproduce the error, I will upload a demo-project.
November 16, 2015 at 8:48 am #54327SupportKeymasterWait and try the v10.21, some changes were added there.
I hope, the problem is gone there.
November 27, 2015 at 8:22 am #54349ScurraParticipantThank you, the problem is solved now 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.