A lot of space will crash

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

kili
Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Fri Apr 27, 2007 06:17

A lot of space will crash

Postby kili » Fri Sep 21, 2012 07:07

I download ceed-snapshot10 and use StockDatafiles1_0.project.
In Demo8.layout, when i input a lot of space in root/Demo8/Window1/Controls/ins1,
the Editor crashed.

I found that it will loop infinitely in

Code: Select all

void RenderedStringWordWrapper<JustifiedRenderedString>::format(const Size& area_size)
{
    deleteFormatters();

    RenderedString rstring, lstring;
    rstring = *d_renderedString;
    float rs_width;

    FormattedRenderedString* frs;

    for (size_t line = 0; line < rstring.getLineCount(); ++line)
    {
        while ((rs_width = rstring.getPixelSize(line).d_width) > 0)        //here
        {
            // skip line if no wrapping occurs
            if (rs_width <= area_size.d_width)
                break;

            // split rstring at width into lstring and remaining rstring
            rstring.split(line, area_size.d_width, lstring);
            frs = new JustifiedRenderedString(*new RenderedString(lstring));
            frs->format(area_size);
            d_lines.push_back(frs);
            line = 0;
        }
    }

    // last line (which we do not justify)
    frs = new LeftAlignedRenderedString(*new RenderedString(rstring));
    frs->format(area_size);
    d_lines.push_back(frs);
}



I'm sorry for no log, seems out of memory.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: A lot of space will crash

Postby Kulik » Tue Oct 02, 2012 16:50

Seems like a bug in CEGUI, I will investigate and report back.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 17 guests