Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8758055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:27:01+00:00 2026-06-13T14:27:01+00:00

I’ve got a QGraphicsScene to which I’m adding a subclassed QGraphicsRectItem called BorderRect that

  • 0

I’ve got a QGraphicsScene to which I’m adding a subclassed QGraphicsRectItem called BorderRect that indicates the boundaries of the sceneRect. The BorderRect has grips that allow the user to change its size, which then changes the scene’s sceneRect. All this works, except every once in awhile it causes a seg fault, with a back trace like:

#0  _int_malloc (av=0x7ffff587e620, bytes=32) at malloc.c:3415
#1  0x00007ffff55592a4 in *__GI___libc_malloc (bytes=32) at malloc.c:2924
#2  0x00007ffff5e4c40d in operator new(unsigned long) () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/libstdc++.so.6
#3  0x00007ffff723911e in QRegion::QRegion(QRect const&, QRegion::RegionType) () from /usr/lib64/qt4/libQtGui.so.4
#4  0x00007ffff72394de in QRegion::intersect(QRect const&) const () from /usr/lib64/qt4/libQtGui.so.4
#5  0x00007ffff7239509 in QRegion::operator&(QRect const&) const () from /usr/lib64/qt4/libQtGui.so.4
#6  0x00007ffff723952f in QRegion::operator&=(QRect const&) () from /usr/lib64/qt4/libQtGui.so.4
#7  0x00007ffff70e0c6b in QWidgetPrivate::subtractOpaqueSiblings(QRegion&, bool*, bool) const ()
  from /usr/lib64/qt4/libQtGui.so.4
#8  0x00007ffff72b6141 in QWidgetPrivate::scrollRect(QRect const&, int, int) () from /usr/lib64/qt4/libQtGui.so.4
#9  0x00007ffff712fe8a in QWidgetPrivate::scroll_sys(int, int) () from /usr/lib64/qt4/libQtGui.so.4
#10 0x00007ffff70eefe5 in QWidget::scroll(int, int) () from /usr/lib64/qt4/libQtGui.so.4
#11 0x00007ffff76b7fbb in QGraphicsView::scrollContentsBy(int, int) () from /usr/lib64/qt4/libQtGui.so.4
#12 0x00007ffff6b7c0fa in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
  from /usr/lib64/qt4/libQtCore.so.4
#13 0x00007ffff770ec7e in QAbstractSlider::valueChanged(int) () from /usr/lib64/qt4/libQtGui.so.4
#14 0x00007ffff76b0dca in QGraphicsViewPrivate::recalculateContentSize() () from /usr/lib64/qt4/libQtGui.so.4
#15 0x00007ffff76bab39 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#16 0x00007ffff6b7c0fa in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
  from /usr/lib64/qt4/libQtCore.so.4
#17 0x00007ffff7687a45 in QGraphicsScene::sceneRectChanged(QRectF const&) () from /usr/lib64/qt4/libQtGui.so.4
#18 0x000000000042fef0 in BorderRectItem::sceneEventFilter (this=0xfc0070, watched=0xef6e80, event=0x7fffff800590)
    at gui/BorderRectItem.cpp:193
...

There are several more lines, but the line referred to at line 18 of the back trace corresponds to a call to setSceneRect with a QRectF that corresponds to the new dimensions of the BorderRect, in this case:

{xp = 20, yp = -59, w = 563.94193411401511, h = 436.5631806793956}

I don’t know why this is crashing. I’ve checked the scene, and it’s not null. I suspect this is going to be very difficult to debug, and what I’m really interested in is tips on how to go about doing this. In particular, it would be really helpful to check the state of variables in the Qt code as I move up and down through the back trace, and I don’t know how to do that. I’m running Linux… can I rebuild Qt with debugging symbols or something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T14:27:03+00:00Added an answer on June 13, 2026 at 2:27 pm

    Just guessing here, but that stack trace makes me suspect, you return reference to local stack QRect from some of your own methods, or reference to some other stack variable (or even explicit pointer to stack variable, but that is harder to do by accident).

    And yes, you can compile Qt with debugging symbols, see:

    • http://doc.qt.digia.com/latest/install-x11.html#step-3-building-the-library
    • http://doc.qt.digia.com/latest/configure-options.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have an array which has BIG numbers and small numbers in it. I
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.