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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:00:54+00:00 2026-06-06T16:00:54+00:00

Update : The error seems to be generated by this line: *line = color;

  • 0

Update : The error seems to be generated by this line: *line = color;

I get the following error but I don’t understand where it can come from:

The error:

HEAP[testQt.exe]:
Heap block at 0B444FE8 modified at 0B44C6B0 past requested size of 76c0

The line that generates it:

return QPixmap::fromImage(qimage);

From:

QPixmap Interpolation::getData() {
    QPointF pt(0, 0);
    QRgb color;
    QImage qimage(m_width, m_height, QImage::Format_ARGB32);
    qimage.fill(Qt::transparent);

    for (int i(0); i < m_height; ++i) {
        m_progress->setValue(m_width+i);
        QRgb *line = (QRgb *)qimage.scanLine(i);
        for (int j(0); j < m_width; ++j) {
            pt.setX(j);
            pt.setY(i);
            line += 1;
            if (isInHull(pt)) {
                color = colorScale(interp(&pt));
                *line = color; //If I remove this part the program won't crash
            }
        }
    }  
    return QPixmap::fromImage(qimage);
}

If it helps:

QRgb Interpolation::colorScale(qreal value)
{
    int cat;
    cat = qFloor(qreal(9)*(value-m_min)/(m_max-m_min));

    return m_couleurs[cat];
}

with:

m_couleurs[0] = qRgb(247, 252, 240);
m_couleurs[1] = qRgb(224, 243, 219);
m_couleurs[2] = qRgb(204, 235, 197);
m_couleurs[3] = qRgb(168, 221, 181);
m_couleurs[4] = qRgb(123, 204, 196);
m_couleurs[5] = qRgb(78, 179, 211);
m_couleurs[6] = qRgb(43, 140, 190);
m_couleurs[7] = qRgb(8, 104, 172);
m_couleurs[8] = qRgb(8, 64, 129);

Any lead would be appreciated.

Edit: added the full function in case it helps.
Edit2: made the code more clear and removed the useless parts.
Edit3: updated the question.

  • 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-06T16:00:55+00:00Added an answer on June 6, 2026 at 4:00 pm

    You advance line before you assign color to *line. So when j = 0, you’re actually setting pixel 1, at the end of the last pixel on the last scan line you write past the end of the buffer.

    Move line += 1 to the end of the loop.

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

Sidebar

Related Questions

I am getting the following error when trying to update my project from Intellij
I am trying to update code via Linq, but I am getting this error:
Update getting error when i try to call the method from Activity: SQLiteDatabase db
I am getting the following error when trying to update an object using nhibernate.
I am getting the following error after running git svn rebase: 'update-index --refresh: command
I tried to update some part of a matrix, I got the following error
I am trying to do a terminal update and I keep getting this error,
I try to update a table using another table. I get the error number
I refactored some code, and now I get this error when calling a function.
I am trying to update a DOM element with HTML generated from a symfony

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.