Hello,
I use sciLexer in a dozen objects of a game application with various configurations. Everything works normally except that, from time to time, opens an error-type system window with the following informations:
title: assertion failure
text: C:\v\_vp\_Vip6\source\SciLexer\_src\src\PositionCache.cxx 372
The window has 3 buttons: Abandon Restart Ignore
I type ignore and the program continues without damage.
Is this an 'exception' behavior and do you know what I can do to manage it so that it remains transparent?
-
- Active Member
- Posts: 40
- Joined: 23 Sep 2002 23:01
scilexer random error
Regards
Dominique Pannier
Dominique Pannier
- Thomas Linder Puls
- VIP Member
- Posts: 1401
- Joined: 28 Feb 2000 0:01
Re: scilexer random error
This issue must have slipped my attention.
The sciLexer is (as you may already know) a third party product that we more or less just build (few updates) and supply. The mentioned line is the first assertion (useCount == 0) in this code:
I do not know what it means and even less why it fails for you.
Furthermore, I am afraid that this kind of error reports are not exceptions in Visual Prolog sense: The dialog you see is displayed up by the C++ library software itself.
We will investigate if we can change the behavior, so that it becomes a Visual Prolog exception instead.
The sciLexer is (as you may already know) a third party product that we more or less just build (few updates) and supply. The mentioned line is the first assertion (useCount == 0) in this code:
Code: Select all
void LineLayoutCache::AllocateForLevel(Sci::Line linesOnScreen, Sci::Line linesInDoc) {
PLATFORM_ASSERT(useCount == 0);
size_t lengthForLevel = 0;
if (level == llcCaret) {
lengthForLevel = 1;
} else if (level == llcPage) {
lengthForLevel = linesOnScreen + 1;
} else if (level == llcDocument) {
lengthForLevel = linesInDoc;
}
if (lengthForLevel > cache.size()) {
Deallocate();
Allocate(lengthForLevel);
} else {
if (lengthForLevel < cache.size()) {
for (size_t i = lengthForLevel; i < cache.size(); i++) {
cache[i].reset();
}
}
cache.resize(lengthForLevel);
}
PLATFORM_ASSERT(cache.size() == lengthForLevel);
}
Furthermore, I am afraid that this kind of error reports are not exceptions in Visual Prolog sense: The dialog you see is displayed up by the C++ library software itself.
We will investigate if we can change the behavior, so that it becomes a Visual Prolog exception instead.
Regards Thomas Linder Puls
PDC
PDC
-
- Active Member
- Posts: 40
- Joined: 23 Sep 2002 23:01
Re: scilexer random error
Thank you for this answer, Thomas. I suspected it was not a prolog error, and then did not see how to "trap" it. It would be better if ity were possible. But I can add that its's random and fortunatly rare.
Best regards
![Smile :-)](./images/smilies/icon_smile.gif)
Best regards
Regards
Dominique Pannier
Dominique Pannier