Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sclang crashes for some GUI operation involving QTextEngine::itemize() #794

Closed
jamshark70 opened this issue Mar 28, 2013 · 11 comments
Closed
Assignees
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead crash things which cause a crash in the interpreter, servers, or IDE. do not use for PRs
Milestone

Comments

@jamshark70
Copy link
Contributor

To reproduce:

  1. Run sclang.
  2. Execute Object.browse
  3. Type "depend" in the search box and switch to search for methods.
  4. Click the search button.
  5. Boom.

From gdb + debug build:

#0  0x00007ffff3de73a4 in QTextEngine::itemize() const ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#1  0x00007ffff3de96f5 in QTextEngine::attributes() const ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#2  0x00007ffff3df5915 in QTextLine::layout_helper(int) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#3  0x00007ffff3e940d6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#4  0x00007ffff3e94c78 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#5  0x00007ffff3e9abe5 in QCommonStyle::sizeFromContents(QStyle::ContentsType, QStyleOption const*, QSize const&, QWidget const*) const ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#6  0x00007ffff3f489d4 in QWindowsStyle::sizeFromContents(QStyle::ContentsType, QStyleOption const*, QSize const&, QWidget const*) const ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#7  0x00007ffff3ee5477 in QPlastiqueStyle::sizeFromContents(QStyle::ContentsType, QStyleOption const*, QSize const&, QWidget const*) const ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#8  0x00007ffff3eb79ae in QProxyStyle::sizeFromContents(QStyle::ContentsType, QStyleOption const*, QSize const&, QWidget const*) const ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#9  0x00007ffff415a516 in QStyledItemDelegate::sizeHint(QStyleOptionViewItem const&, QModelIndex const&) const () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#10 0x00007ffff40d03bc in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#11 0x00007ffff40d0b5d in QListView::updateGeometries() ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#12 0x00007ffff3bdb12a in QWidget::event(QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#13 0x00007ffff3f9b3b6 in QFrame::event(QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#14 0x00007ffff40af89b in QAbstractItemView::viewportEvent(QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#15 0x00007ffff331c028 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#16 0x00007ffff3b8a85f in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#17 0x00007ffff3b8f713 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#18 0x0000000000744cc9 in QcApplication::notify (this=0xcc8fa0, 
    object=0x496e2a0, event=0x7fffff8032b0)
    at /home/dlm/share/sc-ide.git/QtCollider/QcApplication.cpp:146
#19 0x00007ffff331be9c in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#20 0x00007ffff3c257be in QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#21 0x00007ffff3bd5f35 in QWidget::setGeometry(QRect const&) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#22 0x00007ffff401c628 in QAbstractScrollAreaPrivate::layoutChildren() ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#23 0x00007ffff40d0a4d in QListView::updateGeometries() ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#24 0x00007ffff3bdb12a in QWidget::event(QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#25 0x00007ffff3f9b3b6 in QFrame::event(QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#26 0x00007ffff40af89b in QAbstractItemView::viewportEvent(QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#27 0x00007ffff331c028 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#28 0x00007ffff3b8a85f in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#29 0x00007ffff3b8f713 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#30 0x0000000000744cc9 in QcApplication::notify (this=0xcc8fa0, 
    object=0x496e2a0, event=0x7fffff8042d0)
    at /home/dlm/share/sc-ide.git/QtCollider/QcApplication.cpp:146
#31 0x00007ffff331be9c in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4

That's a partial stack trace. I tried to log the whole stack trace but got bored of hitting return after about 4600 stack frames. So I guess this is infinite recursion/stack overflow.

@jleben
Copy link
Member

jleben commented Mar 28, 2013

The culprit could easily be a loop in SC code.
On my machine, the Class Browser seems utterly broken: with the search field empty, I get all kinds of errors. The "Object + subclass methods" search mode the language goes into a loop due to error thrown during another error handling.

@jamshark70
Copy link
Contributor Author

It's unlikely to be an SC code problem. The class browser was working perfectly well in my machine for many months, and it suddenly broke recently. There have been no substantive changes in the class browser for more than a year (February 2012 according to git logs).

If you are encountering bugs, please log them as issues (just like any other bug) with steps to reproduce and I'll try to confirm them.

Again, I'm 100% sure I used the class browser without incident within the last year. The class file hasn't changed since then in any way that would cause the issues you mentioned briefly. Therefore, something else must have changed to break it. The stack trace I obtained suggests strongly that (foot my issue) Qt is going into a tailspin without involvement from the language.

@jleben
Copy link
Member

jleben commented Mar 29, 2013

Alright, it seems that we are looking at two (or more) different issues. I'll try and dig deeper...

@jleben
Copy link
Member

jleben commented Apr 1, 2013

Can you please test if the issue is reproducible in the latest master or 3.6?
I can't reproduce it here.

@jamshark70
Copy link
Contributor Author

My original case is still crashing here. I see that you fixed an issue with an empty search string, but my case provides a search string.

@jleben
Copy link
Member

jleben commented Apr 1, 2013

Could you please try to run a debug version and invoke "QtGUI.debugLevel = 1" before the issue reproduction steps, then paste the interpreter output somewhere?

@jleben
Copy link
Member

jleben commented Apr 1, 2013

Also, does the issue occur with any other search string?

@jamshark70
Copy link
Contributor Author

Interesting... other strings do seem to be okay. Moreover, if I do a successful method search for some other string, and then do a method search for "depend," then "depend" doesn't crash either.

I may not have time to look at this right away, but that would seem to put it in the territory of the class browser's SC code, and I'm probably more familiar with that code than anybody else. So I'll assign the issue to myself for now.

@ghost ghost assigned jamshark70 Apr 4, 2013
@telephon
Copy link
Member

Seems to be solved – can we close?

@scztt scztt added this to the 3.7 milestone Apr 14, 2015
@scztt scztt added the crash things which cause a crash in the interpreter, servers, or IDE. do not use for PRs label Apr 19, 2015
@scztt scztt modified the milestones: future, 3.7 May 24, 2015
@scztt
Copy link
Contributor

scztt commented May 24, 2015

Moving this to future. @jamshark70 - If you're still pursuing and want to fix for 3.7, please feel free to move it back.

@jamshark70
Copy link
Contributor Author

I can't reproduce this on a more-or-less up-to-date master. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead crash things which cause a crash in the interpreter, servers, or IDE. do not use for PRs
Projects
None yet
Development

No branches or pull requests

4 participants