Opened 16 years ago

Closed 16 years ago

#4819 closed defect (worksforme)

"ASSERT failure in QList<T>::at: "index out of range"" instead of showing the file dialog.

Reported by: diabo@… Owned by: nobody@…
Priority: high Milestone:
Component: frontend-qt4 Version: 1.5.4
Severity: critical Keywords: assertion
Cc: poenitz@…, j.spitzmueller@…, younes@…

Description

Description of Problem:
A corrupted ~/.config/Trolltech.conf causes Lyx to crash when trying to display a file dialog, for instance while opening or saving a file.

The problem is that running Lyx makes this file become corrupted, i.e. either it is a bug in qt of a improper use of qt by Lyx.

Deleting Trolltech.conf solves the problem and re-creating it with qtconfig-qt4 doesn't reintroduce the bug. However running Lyx sometimes does.

cf. http://bugs.launchpad.net/ubuntu/+source/lyx/+bug/197950 for more information.

Using QT 4.3.4 from Ubuntu 8.04; and Lyx 1.5.4 from source.

A diff between a good Trolltech.conf and a bad one gives:

$ diff Trolltech.conf.good Trolltech.conf.bad
30c30
< filedialog=@ByteArray(\0\0\0\xbe\0\0\0\x3\0\0\0\x1e\0\0\0\xff\0\0\0\0\0\0\0\x2\0\0\0h\0\0\x2\0\x1\0\0\0\x6\x1\0\0\0\x1\0\0\0\x2\0\0\0\x5\x66ile:\0\0\0\xf\x66ile:///home/gm\0\0\0\x1\0\0\0\x10\0/\0h\0o\0m\0\x65\0/\0g\0m\0\0\0\x10\0/\0h\0o\0m\0\x65\0/\0g\0m\0\0\0~\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x2\x1c\0\0\0\x4\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\x1\x1e\0\0\0\x1\0\0\0\0\0\0\0\x45\0\0\0\x1\0\0\0\0\0\0\0\x44\0\0\0\x1\0\0\0\0\0\0\0u\0\0\0\x1\0\0\0\0\0\0\0\x1)
---

filedialog="@ByteArray(\0\0\0\xbe\0\0\0\x3\0\0\0\x1e\0\0\0\xff\0\0\0\0\0\0\0\x2\0\0\0`\0\0\x2\b\x1\0\0\0\x6\x1\0\0\0\x1\0\0\0\x2\0\0\0\x5\x66ile:\0\0\0\xf\x66ile:///home/gm\0\0\0\x2\0\0\0$\0/\0m\0\x65\0\x64\0i\0\x61\0/\0\x64\0i\0s\0k\0-\0\x31\0/\0p\0\x65\0n\0n\0\0\0\x10\0/\0h\0o\0m\0\x65\0/\0g\0m\0\0\0$\0/\0m\0\x65\0\x64\0i\0\x61\0/\0\x64\0i\0s\0k\0-\0\x31\0/\0p\0\x65\0n\0n\0\0\0~\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1\xc3\0\0\0\x4\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\0\xea\0\0\0\x1\0\0\0\0\0\0\0:\0\0\0\x1\0\0\0\0\0\0\0;\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x1)"

This is most probably a bug in QT, however you might want to check whether the corruption doesn't come from, say, a corrupted UTF-8 string passed by Lyx to QT.

Steps to reproduce the problem, once Trolltech.conf is corrupted:

  1. Start Lyx, launch the Open File dialog
  2. Witness the crash of Lyx

But I do not know how Trolltech.conf becomes corrupted.

Change History (10)

comment:1 by diabo@…, 16 years ago

Component: frontend-qt2frontend-qt4
Version: unspecified1.5.4

I'm sorry, the correct component is frontend-qt4 and not frontend-qt2. The
"simple" bug tracker interface proposed a component called "QT frontend" but did
not specify whether it was qt4 or qt2, hence my mistake.

comment:2 by Uwe Stöhr, 16 years ago

Cc: j.spitzmueller@… added
Keywords: assertion added

comment:3 by Juergen Spitzmueller, 16 years ago

Cc: poenitz@… added

André, do you have an idea?

comment:4 by Juergen Spitzmueller, 16 years ago

Severity: normalcritical

Is this bug somehow related to the qt4.4 issues on debian hardy?

comment:5 by Juergen Spitzmueller, 16 years ago

Cc: younes@… added

inviting Abdel to the party.

comment:6 by diabo@…, 16 years ago

see my comments on #4835,
https://bugs.launchpad.net/ubuntu/+source/lyx/+bug/228067 and
https://bugs.launchpad.net/ubuntu/+source/lyx/+bug/197950 -- I thought it was
related to #4835 (aka #228067 on launchpad), as "my" #4835 went away
when I deleted Trolltech.conf just as with this bug.

Yet, this does not solve the issue for everybody. Maybe #228067 hides 2
distinct bugs, one that goes away when one deletes Trolltech.conf and that would
related to 4819 (aka 197950) and another one that doesn't go away. At least 2
ppl experienced the first behaviour and at least 2 pple experienced the second
behaviour.

Another clue is that this bug first came with qt4.3.4.

comment:7 by Juergen Spitzmueller, 16 years ago

I'd really like to have this bug solved for 1.5.5, but due to #4835, we have
to release 1.5.5 soon.

From a report on LyX users, it is clear that the assert is triggered within the
dlg.exec() process triggered by FileDialog::opendir or FileDialog::open.

As I understand it, the reason is a null pointer in QList, perhaps in
LyXFileDialog::LyXFileDialog.

Abdel, do you have an idea?

diabo, can you provide a backtrace via gdb?

comment:8 by younes, 16 years ago

It seems that this is a packaging issue, read the last comments there:
https://bugs.launchpad.net/ubuntu/+source/lyx/+bug/228067

comment:9 by diabo@…, 16 years ago

In the meanwhile qt 4.3.4 was updated into qt 4.4 in Ubuntu backports, and since
then I've been unable to reproduce this bug, even by recreating the "bad"
Trolltech.conf above by hand. (Hence no gdb backtrace.)

Given the aforementioned condition I cannot ask you to make of this bug a
blocker for 1.5.5.

You might want to close the bug as it definitely seems to be a qt bug.

comment:10 by Juergen Spitzmueller, 16 years ago

Resolution: worksforme
Status: newclosed

closing. reopen if it reappears.

Note: See TracTickets for help on using tickets.