Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
FXScintilla: assertion failure in LexAccessor.h
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jeff Pohlmeyer  
View profile  
 More options Nov 10 2011, 3:25 am
From: Jeff Pohlmeyer <yetanotherg...@gmail.com>
Date: Thu, 10 Nov 2011 02:25:20 -0600
Local: Thurs, Nov 10 2011 3:25 am
Subject: FXScintilla: assertion failure in LexAccessor.h
About a month or so ago I got a bug report from an FXiTe[1] user:

fxite: LexAccessor.h:136: void LexAccessor::ColourTo(unsigned int, int):
  Assertion 'pos >= startSeg' failed.

I tried here on 2 different machines (ArchLinux and Ubuntu) but I wasn't
able to reproduce the crash, but he says it crashes for him on 4 different
Ubuntu systems. He mostly works with LaTeX files with Dutch keyboard and
locale, so maybe that has something to do with it. He also mentioned the
problem only happens with FXiTe/FXScintilla, but not with SciTE/GTK.

Since I had no clue where to begin debugging this, I told him to try commenting
out the assertion and re-compiling the editor. He reported back that solved the
problem, no more crashes and no problems with the lexer. The curious thing to
me is the statement immediately following the assertion:

  assert(pos >= startSeg);
  if (pos < startSeg) {
    return;
  }

which makes me wonder what the purpose of the assertion is anyway (other than
to cause a crash ;-)

Since I already do a minimal amount of patching when pulling in the latest
Scintilla sources, it wouldn't take much effort to patch out the assertion,
but I wonder if this might cause any unforeseen problems. I would also be
interested to know if anyone has any idea what might be causing the
assertion to fail.

Thanks,

 -Jeff

[1] https://github.com/yetanothergeek/fxite


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil Hodgson  
View profile  
 More options Nov 10 2011, 11:34 pm
From: Neil Hodgson <nyamaton...@gmail.com>
Date: Fri, 11 Nov 2011 15:34:28 +1100
Local: Thurs, Nov 10 2011 11:34 pm
Subject: Re: [scintilla] FXScintilla: assertion failure in LexAccessor.h
Jeff Pohlmeyer:

> Since I had no clue where to begin debugging this, I told him to try commenting
> out the assertion and re-compiling the editor. He reported back that solved the
> problem, no more crashes and no problems with the lexer. The curious thing to
> me is the statement immediately following the assertion:

>  assert(pos >= startSeg);
>  if (pos < startSeg) {
>    return;
>  }

   The assert is only active in debug builds so should not be seen by users.

   You can't undo styling by moving backwards so trying is normally a
mistake and having the assert there can help debug lexer behaviour.

   Neil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Pohlmeyer  
View profile  
 More options Nov 11 2011, 5:47 am
From: Jeff Pohlmeyer <yetanotherg...@gmail.com>
Date: Fri, 11 Nov 2011 04:47:27 -0600
Local: Fri, Nov 11 2011 5:47 am
Subject: Re: [scintilla] FXScintilla: assertion failure in LexAccessor.h

On Thu, Nov 10, 2011 at 10:34 PM, Neil Hodgson wrote:
>   The assert is only active in debug builds so should not be seen by users.

Ah, so that's it. I am using autotools to generate the Makefile so I added a
configure option to define -DNDEBUG, hopefully that will prevent "users" from
getting bitten by things like this.

>   You can't undo styling by moving backwards so trying is normally a
> mistake and having the assert there can help debug lexer behaviour.

So it sounds like the assertion failure is more likely due to a problem
with LaTeX lexer itself, and not something in the Fox implementation?

Thanks,

 - Jeff


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil Hodgson  
View profile  
 More options Nov 11 2011, 4:22 pm
From: Neil Hodgson <nyamaton...@gmail.com>
Date: Sat, 12 Nov 2011 08:22:25 +1100
Local: Fri, Nov 11 2011 4:22 pm
Subject: Re: [scintilla] FXScintilla: assertion failure in LexAccessor.h
Jeff Pohlmeyer:

> So it sounds like the assertion failure is more likely due to a problem
> with LaTeX lexer itself, and not something in the Fox implementation?

   Yes, the assertion should help with finding bugs in lexers. It is
often triggered by unexpected character sequences such as comments
starting immediately after an operator.

   Neil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »