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

Program received signal SIGSEGV, Segmentation fault. In q1fv_2 () #6

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 9 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
there is no problem at console application but same code over an GUI 
program received signal SIGSEGV, Segmentation fault. In q1fv_2 ()
when dwt dwt_sym and swt functions called

What version of the product are you using? On what operating system?

Static Libraries compiled with newer (4.5) MinGW-g++ compiler

Please provide any additional information below.

i also use a fft function of this library it works over an GUI

i use a FLTK GUI library


Original issue reported on code.google.com by [email protected] on 6 Jan 2013 at 9:09

@GoogleCodeExporter
Copy link
Author

q1fv_2() is a FFTW codelet. Can you e-mail me a part of your code to rafat.hsn 
- gmail.com as this information is insufficient to pinpoint the error. 

Original comment by [email protected] on 6 Jan 2013 at 10:39

@GoogleCodeExporter
Copy link
Author

i added my code
but code same with your  demo file
code works in console program and break at GUI

Original comment by [email protected] on 8 Jan 2013 at 11:45

Attachments:

@GoogleCodeExporter
Copy link
Author

So based on the code fragment, the library is functioning correctly. I think 
the problem may be something as trivial as dwt_output and sig not being of the 
same length. Check the lengths of the two signals. You can adjust the lengths 
accordingly before running the GUI code.

Original comment by [email protected] on 8 Jan 2013 at 11:36

@GoogleCodeExporter
Copy link
Author

code same with original demo 
http://code.google.com/p/wavelet1d/source/browse/trunk/demo/wavedemo1.cpp
at that code 

vector<double> dwt_output, flag;
// perform J-Level DWT
dwt(sig, J, nm, dwt_output,flag );

dwt_output vector only created not justified size 

and this example works at console application without size justification

anyway i try justfiy size of dwt_output adn gives same error

Original comment by [email protected] on 9 Jan 2013 at 7:11

@GoogleCodeExporter
Copy link
Author

Have you checked the sizes of the two vectors in question? In the original 
example I have used a copy of the original signal to compare to the IDWT 
output. This isn't an inplace implementation so the DWT output isn't 
necessarily  of the same size (ndata) as the input. 

Original comment by [email protected] on 10 Jan 2013 at 6:18

@GoogleCodeExporter
Copy link
Author

sorry but i dont understand you 
first you say 
I think the problem may be something as trivial as dwt_output and sig not being 
of the same length. Check the lengths of the two signals.
then now you say
DWT output isn't necessarily  of the same size (ndata) as the input. 

if calling parameters cause problem please write how to use dwt function
with requred parameters ?

one additional note;
when i use same code under console aplication program runs without error
problem occurs when called under GUI application.

i try to find a q1fv_2() calling line at trunk
but i cant find calling q1fv_2 or any other fftw function 



Original comment by [email protected] on 11 Jan 2013 at 3:02

@GoogleCodeExporter
Copy link
Author

Based on your code snippet the problem is occurring when you are calling the 
FFTPlot function and from what I understand none of the library functions is 
getting called in that loop. You are using two different vectors in the same 
loop (length : ndata ). Segmentation fault will occur if one of the vector is 
shorter than ndata. You can check the lengths of the two vectors before calling 
the loop. If this is the problem you can zero pad the shorter vector. 

Original comment by [email protected] on 12 Jan 2013 at 7:02

@GoogleCodeExporter
Copy link
Author

No
i said that 
"program received signal SIGSEGV, Segmentation fault. In q1fv_2 ()
when dwt dwt_sym and swt functions called"

so
program breaks any of your dwt functions called
see attached screenshots 
program gives errors at dwt line 98 

if programs breaked at FFTPlot calling line i dont write to you

Original comment by [email protected] on 12 Jan 2013 at 7:52

Attachments:

@GoogleCodeExporter
Copy link
Author

There appears to be some conflict with FLTK GUI framework and FFTW library. I 
have added a non-fftw option (Please find it attached to the comment) that uses 
kiss_fft (see the accompanied license) which resolves the issue for now.

Original comment by [email protected] on 14 Jan 2013 at 10:09

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant