Re: Lyx crashes with Alt+Enter

2000-01-11 Thread Jean-Marc Lasgouttes

 "Jose" == Jose Abilio Oliveira Matos [EMAIL PROTECTED] writes:

Jose Hi, this report should be for Lars, I think.

Jose   Start a new document, press g or any other letter for that
Jose matter. Type Alt+Enter and ... lyx crashes reporting out of
Jose memory.

Indeed. Bug found and squashed. Lars, this is an instance in
LyXParagraph::BreakParagraph of calling vector::reserve(pos_end - pos)
where pos_end  pos. Since these are unsigned... you know what happens
%-|

There is another suspicious instace of reserve() later that I fixed
too, just in case...

I'll commit soon.

JMarc



Re: Lyx crashes with Alt+Enter

2000-01-11 Thread Lars Gullik Bjønnes

Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

|  "Jose" == Jose Abilio Oliveira Matos [EMAIL PROTECTED] writes:
| 
| Jose Hi, this report should be for Lars, I think.
| 
| Jose Start a new document, press g or any other letter for that
| Jose matter. Type Alt+Enter and ... lyx crashes reporting out of
| Jose memory.
| 
| Indeed. Bug found and squashed. Lars, this is an instance in
| LyXParagraph::BreakParagraph of calling vector::reserve(pos_end - pos)
| where pos_end  pos. Since these are unsigned... you know what happens
| %-|
| 
| There is another suspicious instace of reserve() later that I fixed
| too, just in case...

Note that the reserve's are not really needed, they are just a feeble
atemt to optimize a bit.

So reserve's that look suspisous and that have no obvious right form,
can just be deleted.

Lgb



Re: Lyx crashes with Alt+Enter

2000-01-11 Thread Jean-Marc Lasgouttes

 "Lars" == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:

Lars Note that the reserve's are not really needed, they are just a
Lars feeble atemt to optimize a bit.

Lars So reserve's that look suspisous and that have no obvious right
Lars form, can just be deleted.

Well, they are probably a good idea with large paragraphs, and testing
whether reservation is needed probably does not hurt performance, so I
propose to leave it as is.

JMarc



Re: Lyx crashes with Alt+Enter

2000-01-11 Thread Jean-Marc Lasgouttes

>>>>> "Jose" == Jose Abilio Oliveira Matos <[EMAIL PROTECTED]> writes:

Jose> Hi, this report should be for Lars, I think.

Jose>   Start a new document, press g or any other letter for that
Jose> matter. Type Alt+Enter and ... lyx crashes reporting out of
Jose> memory.

Indeed. Bug found and squashed. Lars, this is an instance in
LyXParagraph::BreakParagraph of calling vector::reserve(pos_end - pos)
where pos_end < pos. Since these are unsigned... you know what happens
%-|

There is another suspicious instace of reserve() later that I fixed
too, just in case...

I'll commit soon.

JMarc



Re: Lyx crashes with Alt+Enter

2000-01-11 Thread Lars Gullik Bjønnes

Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

| >>>>> "Jose" == Jose Abilio Oliveira Matos <[EMAIL PROTECTED]> writes:
| 
| Jose> Hi, this report should be for Lars, I think.
| 
| Jose> Start a new document, press g or any other letter for that
| Jose> matter. Type Alt+Enter and ... lyx crashes reporting out of
| Jose> memory.
| 
| Indeed. Bug found and squashed. Lars, this is an instance in
| LyXParagraph::BreakParagraph of calling vector::reserve(pos_end - pos)
| where pos_end < pos. Since these are unsigned... you know what happens
| %-|
| 
| There is another suspicious instace of reserve() later that I fixed
| too, just in case...

Note that the reserve's are not really needed, they are just a feeble
atemt to optimize a bit.

So reserve's that look suspisous and that have no obvious right form,
can just be deleted.

Lgb



Re: Lyx crashes with Alt+Enter

2000-01-11 Thread Jean-Marc Lasgouttes

> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:

Lars> Note that the reserve's are not really needed, they are just a
Lars> feeble atemt to optimize a bit.

Lars> So reserve's that look suspisous and that have no obvious right
Lars> form, can just be deleted.

Well, they are probably a good idea with large paragraphs, and testing
whether reservation is needed probably does not hurt performance, so I
propose to leave it as is.

JMarc