Discussions related to Visual Prolog
dominique f pannier
Active Member
Posts: 40
Joined: 23 Sep 2002 23:01

scilexer random error

Unread post by dominique f pannier »

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?
Regards
Dominique Pannier
User avatar
Thomas Linder Puls
VIP Member
Posts: 1285
Joined: 28 Feb 2000 0:01

Re: scilexer random error

Unread post by Thomas Linder Puls »

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:

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); }
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.
Regards Thomas Linder Puls
PDC
dominique f pannier
Active Member
Posts: 40
Joined: 23 Sep 2002 23:01

Re: scilexer random error

Unread post by dominique f pannier »

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
Regards
Dominique Pannier
Post Reply