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 4616694
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:01:10+00:00 2026-05-22T02:01:10+00:00

I have the following Qt class: class GLWidget : public QGLWidget { Q_OBJECT public:

  • 0

I have the following Qt class:

class GLWidget : public QGLWidget
{
    Q_OBJECT
public:
    GLWidget(QWidget *parent = 0);
private:
    void initializeGL();
    void resizeGL(int w, int h);
    void paintGL();

    double posX;
    double posY;
    double posZ;
};

When I put this in the constructor, my program produces a SIGABRT during GLWidget::~GLWidget:

this->posX = 0.0;
this->posY = 0.0;
this->posZ = 1.0;

These member variables aren’t used anywhere else in the class. If I don’t initialize the member variables, the program doesn’t fail. How can this lead to a SIGABRT?

Stack trace

Stack trace

  • 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-05-22T02:01:10+00:00Added an answer on May 22, 2026 at 2:01 am

    Did you check the core file to see where it died?

    That said, the most likely scenario is division by zero and/or assertion that X and Y are not zero.

    EDIT: Also it seems likely that when you don’t initialize the values the program is behaving wrong but it just appears to work correctly/better.

    EDIT2 in response to comment: You can configure unix/linux systems (with coreadm) to leave a “core” file behind when you program crashes or aborts. It contains information about the call stack, registers, memory, etc. It does appear that you found it (or something similar). The line that says

    free(): invalid next size (fast):
    0x00000000006e3110 *

    actually makes me change my mind. It looks like your heap is corrupted, and the deletion is causing that to become visible. One possibility is that you deleted the object twice. If you’re on Linux, valgrind will probably be your best way to figure out what happened.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following class public class ButtonChange { private int _buttonState; public void SetButtonState(int
I have following class: public class PairOfDice { private Dice d1,d2; public int Value
I have following class ( entity ) @Entity public class Magazine { private int
I have following class: template <size_t size> class Araye{ public: Araye(int input[]){ for (int
I have the following class/entity: public class Product : ISaleable { public void ProcessSale()
let say i have following class: class Shape { public int widht; public List<Point>
Lets say i have following class public class abc { int id; string name;
Have the following: class Hal { public int zip { get; set; } public
I have following situation class base { public: virtual void Accepted(SOCKET s) //// Event
I have following code class Test { public: int &ref; int a; Test(int &x)

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.