exclm / wavelet1d

Automatically exported from code.google.com/p/wavelet1d
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 bluekid70@gmail.com on 6 Jan 2013 at 9:09

GoogleCodeExporter commented 9 years ago
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 rafat....@gmail.com on 6 Jan 2013 at 10:39

GoogleCodeExporter commented 9 years ago
i added my code
but code same with your  demo file
code works in console program and break at GUI

Original comment by bluekid70@gmail.com on 8 Jan 2013 at 11:45

Attachments:

GoogleCodeExporter commented 9 years ago
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 rafat....@gmail.com on 8 Jan 2013 at 11:36

GoogleCodeExporter commented 9 years ago
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 bluekid70@gmail.com on 9 Jan 2013 at 7:11

GoogleCodeExporter commented 9 years ago
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 rafat....@gmail.com on 10 Jan 2013 at 6:18

GoogleCodeExporter commented 9 years ago
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 bluekid70@gmail.com on 11 Jan 2013 at 3:02

GoogleCodeExporter commented 9 years ago
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 rafat....@gmail.com on 12 Jan 2013 at 7:02

GoogleCodeExporter commented 9 years ago
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 bluekid70@gmail.com on 12 Jan 2013 at 7:52

Attachments:

GoogleCodeExporter commented 9 years ago
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 rafat....@gmail.com on 14 Jan 2013 at 10:09

Attachments: