The attached patch is an attempt to get a real start on fixing problems
with recursive includes. As you'll note, there are a couple places I
know still crash, but I wanted to see if anyone had a better idea. On
this approach, we basically have to make sure we NEVER try to recurse
via Buffer
Am 30.09.2010 um 19:03 schrieb Richard Heck:
The attached patch is an attempt to get a real start on fixing problems with
recursive includes. As you'll note, there are a couple places I know still
crash, but I wanted to see if anyone had a better idea. On this approach, we
basically have
Stephan Witt wrote:
There is a cool algorithm to detect infinite loops without global state:
Use two pointers, start both somewhere at the same point.
Increment the first by one, the second by two (if not hitting the end), until
one of the conditions is true:
1. Stop if one of the pointers
Pavel Sanda wrote:
there is a slight complication that we can branch in each document... so
either we have towards beginning or send pointer messenger in all possible
branches...
actually whats the depth where lyx crashes...? i guess thats posing maximum
depth for, say, 100 is enough for any
is
information about the overall structure, who is whose parent, etc. We
basically reconstruct that over and over again, which isn't so bad if
recursive includes aren't an issue but becomes serious when they are,
because, in that case, what structure the thing seems to have depends
upon where
Le 30/09/2010 23:03, Richard Heck a écrit :
It's not so much detecting the recursion. It's what to do about it once
you detect it. So, say, we have: A - B - A. What should
B.masterBuffer() return? What should A.masterBuffer() return? How do you
safely write recursions?
I would say the second A
something stable.
Maybe the place to do this is in Buffer::setParent(). I.e., every time
we are asked to set a parent, we check for recursive includes and refuse
to set it if doing saw causes recursion.
Of course, we'd like to accept:
A-B
\C-B
where B is inserted twice
something stable.
Maybe the place to do this is in Buffer::setParent(). I.e., every time
we are asked to set a parent, we check for recursive includes and refuse
to set it if doing saw causes recursion.
Of course, we'd like to accept:
A-B
\C-B
where B is inserted twice
The attached patch is an attempt to get a real start on fixing problems
with recursive includes. As you'll note, there are a couple places I
know still crash, but I wanted to see if anyone had a better idea. On
this approach, we basically have to make sure we NEVER try to recurse
via Buffer
Am 30.09.2010 um 19:03 schrieb Richard Heck:
>
> The attached patch is an attempt to get a real start on fixing problems with
> recursive includes. As you'll note, there are a couple places I know still
> crash, but I wanted to see if anyone had a better idea. On this approach, we
Stephan Witt wrote:
> There is a cool algorithm to detect infinite loops without global state:
>
> Use two pointers, start both somewhere at the same point.
> Increment the first by one, the second by two (if not hitting the end), until
> one of the conditions is true:
> 1. Stop if one of the
Pavel Sanda wrote:
> there is a slight complication that we can branch in each document... so
> either we have towards beginning or send pointer messenger in all possible
> branches...
actually whats the depth where lyx crashes...? i guess thats posing maximum
depth for, say, 100 is enough for
each Buffer, whereas what we seem to need here is
information about the overall structure, who is whose parent, etc. We
basically reconstruct that over and over again, which isn't so bad if
recursive includes aren't an issue but becomes serious when they are,
because, in that case, what structu
Le 30/09/2010 23:03, Richard Heck a écrit :
It's not so much detecting the recursion. It's what to do about it once
you detect it. So, say, we have: A -> B -> A. What should
B.masterBuffer() return? What should A.masterBuffer() return? How do you
safely write recursions?
I would say the second
B->A. We want something stable.
Maybe the place to do this is in Buffer::setParent(). I.e., every time
we are asked to set a parent, we check for recursive includes and refuse
to set it if doing saw causes recursion.
Of course, we'd like to accept:
A->B
\>C->B
wher
B->A. We want something stable.
Maybe the place to do this is in Buffer::setParent(). I.e., every time
we are asked to set a parent, we check for recursive includes and refuse
to set it if doing saw causes recursion.
Of course, we'd like to accept:
A->B
\>C->B
wher
16 matches
Mail list logo