Comment 8 for bug 328805

Revision history for this message
Todddeluca (todddeluca) wrote :

Ok, I've created a simple reproducible example. The
following code consistently freezes if the last character in
the file is '1'. If there is a newline following the '1',
then everything is fine.
if 1 < 2:
    # die here

    x = 1

It also freezes under the same condition if you replace the
if statement with a for i in range(10): loop.

The following file does NOT freeze even if the '1' is the
last character in the file:
x = 1

So perhaps it has something to do with the indentation.
Everything seems to hinge on there being no characters
following the last line of code. I tried putting spaces on
the end of the 'x = 1' line and it still froze with a 'Force
full reparse' message. Sometimes the 'Force full reparse'
message is not displayed when it freezes, but I think that
detail is insignificant.

I hope these code snippets are helpful in debugging the
problem. Thank y'all for producing and maintaining
python-mode. Its coloring and indenting features have been
very helpful to me, and I get the feeling I'm just
scratching the surface.

Cheers,
Todd