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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:18:43+00:00 2026-05-12T10:18:43+00:00

I’m developing an image processing application in C++. I’ve seen a lot of compiler

  • 0

I’m developing an image processing application in C++. I’ve seen a lot of compiler errors and backtraces, but this one is new to me.

#0  0xb80c5430 in __kernel_vsyscall ()
#1  0xb7d1b6d0 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7d1d098 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7d5924d in ?? () from /lib/tls/i686/cmov/libc.so.6
#4  0xb7d62276 in ?? () from /lib/tls/i686/cmov/libc.so.6
#5  0xb7d639c5 in malloc () from /lib/tls/i686/cmov/libc.so.6
#6  0xb7f42f47 in operator new () from /usr/lib/libstdc++.so.6
#7  0x0805bd20 in Image<Color>::fft (this=0xb467640) at ../image_processing/image.cpp:545

What’s happening here? The operator new is crashing, ok. But why? That’s not an out of memory (it tries to allocate about 128Kb, a 128×64 pixel with two floats each). Also, it doesn’t seam as it’s an error in my own code (the constructor doesn’t get touched!).

The code in the mentioned line (#7) is:

Image<Complex> *result = new Image<Complex>(this->resX, resY); 
// this->resX = 128, resY = 64 (both int), Complex is a typedef for std::complex<float>

Almost the same instantiation works on other places in my code. If I comment out this part of the code, it will crash a bit later on a similar part. I don’t understand it, I also don’t have any ideas, how to debug it. Any help?

Compiler is gcc 4.3.3, libc is 2.9 (both from Ubuntu Jaunty)

Update:

I’ve included the following lines just above the faulty line in the same method and in main()

    Image<Complex> *test = new Image<Complex>(128, 64);
    delete test;

The strange thing: in the same method it will crash, in main() it won’t. As I mentioned, Complex is a typedef of std::complex<float>. The constructor doesn’t get called, I’ve inserted a cout just before this line and in the constructor itself.

Update 2:

Thanks to KPexEA for this tip! I tried this:

Image<Complex> *test = new Image<Complex>(128, 64);
delete test;

kiss_fft_cpx *output = (kiss_fft_cpx*) malloc( this->resX * this->resY/2 * sizeof(kiss_fft_cpx) );
kiss_fftndr( cfg, input, output );

Image<Complex> *test2 = new Image<Complex>(128, 64);
delete test2;

It crashes at – you guess? – test2! So the malloc for my kissfft seams to be the faulty one. I’ll take a look at it.

Final update:

Ok, it’s done! Thanks to all of you!

Actually, I should have noticed it before. Last week, I noticed, that kissfft (a fast fourier transform library) made a 130×64 pixel fft image from a 128×128 pixel source image. Yes, 130 pixel broad, not 128. Don’t ask me why, I don’t know! So, 130x64x2xsizeof(float) bytes had to be allocated, not 128x64x… as I thought before. Strange, that it didn’t crash just after I fixed that bug, but some days later.

For the record, my final code is:

int resY = (int) ceil(this->resY/2);

kiss_fft_cpx *output = (kiss_fft_cpx*) malloc( (this->resX+2) * resY * sizeof(kiss_fft_cpx) );
kiss_fftndr( cfg, input, output );

Image<Complex> *result = new Image<Complex>(this->resX, resY);

Thanks!

craesh

  • 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-12T10:18:43+00:00Added an answer on May 12, 2026 at 10:18 am

    Perhaps a previously allocated chunk of memory has a buffer overflow that is corrupting the heap?

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

Sidebar

Ask A Question

Stats

  • Questions 204k
  • Answers 204k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you use ReSharper with Visual Studio, any comment with… May 12, 2026 at 8:42 pm
  • Editorial Team
    Editorial Team added an answer DateTimeFormatterBuilder#appendFixedDecimal() may well do what you need. Alternatively, you could… May 12, 2026 at 8:42 pm
  • Editorial Team
    Editorial Team added an answer If you use the second solution (ie, several URLs, one… May 12, 2026 at 8:42 pm

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
In order to apply a triggered animation to all ToolTip s in my app,
I have a French site that I want to parse, but am running into
I have text I am displaying in SIlverlight that is coming from a CMS

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.