texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] TeXmacs crashing on Qt 4.4


From: Henri Lesourd
Subject: Re: [Texmacs-dev] TeXmacs crashing on Qt 4.4
Date: Wed, 08 Oct 2008 19:02:33 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

Massimiliano Gubinelli wrote:

Hi all,
I've fixed some problems with the Qt port but it continues to crash
on my Linux  machine with Qt 4.4. I've tried to cook up test programs
to make Qt crash the same way TeXmacs make it crash but without
success. Finally I've tried to compile Qt 4.4.3 without sse2 support
(-no-sse2 during configure) and it works fine without crashes. So I
think something weird is going on and that we should report to
Trolltech for a possible bug in Qt. Somebody could try the last CVS on
other Linux boxes and report if it works or crashes? thanks.
Apparently there is another problem linked with 64 bits but now I'm
concerned with a crash affecting 32 bit machines causing TeXmacs to
crash while opening the "Open File" dialog box. The exact point of the
crash is while performing some sse2 optimized operation in
QImage::fill.

Somebody has suggestions in how to proceed ?
Very clearly, there are also current (and relatively
long lasting, i.e., last November, probably) problems
in TeXmacs itself due to reference counting and memory
allocation. These problems are highly in need of a fix.

Without *first* being sure that these problems have
been eradicated, it will be difficult to completely
test a GUI library which, as a matter of fact, depends
on code having such problems.

Especially:

1. The "close buffer" crash problem, which is related
  to a redundant delete instruction. To my knowledge,
  this instruction has only be commented out, but this
  does not addresses the underlying root cause ;

2. The way the Scheme GUI code of TeXmacs is all
  the time creating new widgets. There are different
  approaches to manage this, which all involve dealing
  with reference counting in the TeXmacs code, *plus*
  knowing how (and when) to free (or reuse, e.g. to
  avoid blinking) the Qt objects.

  As far as I remember my own code, this part was
  tricky, because on the one hand subtle bugs can
  exist in the TeXmacs code, and on the other hand,
  memory leaks of one kind or another can appear
  on the Qt side, not only because you would have
  bad pointers or crush memory for some reason (e.g.:
  using a Qt method in a way which looks correct,
  but in fact is not for subtle reasons, e.g. C++
  references), but also because of timing problems:
  in designing the main loop, I observed that the
  Qt library is relatively fragile if you enter
  the main Qt loop, then leave, then reenter, etc.
  at a too high frequency.

  I devised a solution which does not raises such
  concerns, but still, not everything is perfect
  in the Qt library, there are ways to crash Qt
  which should not be possible ;

To summarize: in my experience, we are in front
of two chunks of code which are slightly unstable,
and heavily under pressure (high bandwidth of
creating/deleting GUI elements) from TeXmacs.

Thus being sure that at least the TeXmacs side
is 100% clean seems to be an important prerequisite.

It's only later that fine tuning our understanding of
how the different Qt versions work would make sense.

Best, Henri




reply via email to

[Prev in Thread] Current Thread [Next in Thread]