[BUG] Infinite loop with progress bar

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Blakharaz
Not too shy to talk
Not too shy to talk
Posts: 31
Joined: Wed Jan 12, 2005 12:06
Location: Potsdam, Germany
Contact:

[BUG] Infinite loop with progress bar

Postby Blakharaz » Tue Jan 10, 2006 10:05

Hi,

I noticed some problem with our customized progress bar. It is composed of three parts (left | middle, which can change it's length | right). When the progress bar is set to a very low value, the application hangs and more and more memory is consumed (I killed it on 1.2 GB).
It seems the cause is the middle part getting set to a negative length. Can anyone verify this?
Coder in the Pantheon Team - creators of "Rastullahs Lockenpracht" (http://www.rastullahs-lockenpracht.de/)

User avatar
Blakharaz
Not too shy to talk
Not too shy to talk
Posts: 31
Joined: Wed Jan 12, 2005 12:06
Location: Potsdam, Germany
Contact:

Re: [BUG] Infinite loop with progress bar

Postby Blakharaz » Wed Jan 11, 2006 00:14

Okay, I found out more details:

We have a progress bar with frame and inner parts ("status_filling"). The inner part is <HorzFormat type="Tiled" />. If I remove this by surrounding with XML comments, the crash won't happen.

Full code is:

Code: Select all

<WidgetLook name="RastullahLook/StatusBar">
        <PropertyDefinition name="StatusColour" initialValue="FF0000FF" redrawOnWrite="true" />
        <Property name="AbsoluteMinSize" value="w:36 h:13" />

        <NamedArea name="ProgressArea">
            <Area>
                <Dim type="LeftEdge" ><AbsoluteDim value="2" /></Dim>
                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
                <Dim type="RightEdge" >
                    <UnifiedDim scale="1" type="RightEdge">
                        <DimOperator op="Subtract">
                            <AbsoluteDim value="2" />
                        </DimOperator>
                    </UnifiedDim>
                </Dim>
                <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
            </Area>
        </NamedArea>
     
        <ImagerySection name="status_filling" >
            <FrameComponent>
                <Area>
                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
                </Area>
                <Image type="LeftEdge" imageset="RastullahLook-Images" image="StatusBarFillingLeft" />
                <Image type="RightEdge" imageset="RastullahLook-Images" image="StatusBarFillingRight" />
                <Image type="Background" imageset="RastullahLook-Images" image="StatusBarFilling" />

                <VertFormat type="Stretched" />
                <!--<HorzFormat type="Tiled" />-->
            </FrameComponent>
        </ImagerySection>
        <ImagerySection name="frame">
            <FrameComponent>
                <Area>
                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
                </Area>
                <Image type="LeftEdge" imageset="RastullahLook-Images" image="StatusBarLeft" />
                <Image type="RightEdge" imageset="RastullahLook-Images" image="StatusBarRight" />
                <Image type="Background" imageset="RastullahLook-Images" image="StatusBarMiddle" />
            </FrameComponent>
        </ImagerySection>
       

        <StateImagery name="EnabledProgress">
            <Layer>
                <Section section="status_filling" >
                    <ColourProperty name="StatusColour" />
                </Section>
            </Layer>
        </StateImagery>
        <StateImagery name="DisabledProgress">
            <Layer>
                <Section section="status_filling">
                    <Colours topLeft="EEEEEEEE" topRight="EEEEEEEE" bottomLeft="DDDDDDDD" bottomRight="DDDDDDDD" />
                </Section>
            </Layer>
        </StateImagery>
        <StateImagery name="Enabled">
            <Layer>
                <Section section="frame">
                </Section>
            </Layer>
        </StateImagery>
        <StateImagery name="Disabled">
            <Layer>
                <Section section="frame">
                    <Colours topLeft="EEEEEEEE" topRight="EEEEEEEE" bottomLeft="DDDDDDDD" bottomRight="DDDDDDDD" />
                </Section>
            </Layer>
        </StateImagery>
    </WidgetLook>
Coder in the Pantheon Team - creators of "Rastullahs Lockenpracht" (http://www.rastullahs-lockenpracht.de/)

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: [BUG] Infinite loop with progress bar

Postby lindquist » Sat Jan 28, 2006 18:16

Sorry for the delay.
I will do some testing and see if I can confirm this bug or not.


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests