xiph / opus

Modern audio compression for the internet.
https://opus-codec.org/
Other
2.25k stars 602 forks source link

1.3.1 libopus.lib compiled by vs 2013 crash in some machines #201

Open dttlgotv opened 3 years ago

dttlgotv commented 3 years ago

I used 1.1.4 libopus.lib compiled by vs 2010 (old version) well, bult I use libopus.lib compiled by vs 2013 and it crashed in some machins after running for 1 minutes.

crash stack is below:

图片

xnorpx commented 3 years ago

Need, more info for repro.

Note that version 1.3.1 has a bugs in CMake so please use latest master if your aren't already.

dttlgotv commented 3 years ago

Need, more info for repro.

* Git commit

* Does it repro on newer visual studios or only 2013

* Exact CMake commandline to build

* What type of machine is it crashing on. CPU id etc.

* Collect full crashdump not only screenshot of call stack

Note that version 1.3.1 has a bugs in CMake so please use latest master if your aren't already.

  1. I just tested it using the newset commit .
  2. I only use 2013, so I do not verify ti on 2015
  3. I just run cmake .. "visual stuido 2013". Then compile opus using vs 2013
  4. 图片

xnorpx commented 3 years ago

Does the test pass?

xnorpx commented 3 years ago

cmake .. -DOPUS_BUILD_TESTING=ON cmake --build . ctest

dttlgotv commented 3 years ago

Does the test pass?

Crash in encoder after running some time

xnorpx commented 3 years ago

C:\git\opus\build>ctest -j 4 Test project C:/git/opus/build Start 1: test_opus_decode Start 2: test_opus_padding Start 3: test_opus_api Start 4: test_opus_encode 1/4 Test #2: test_opus_padding ................ Passed 0.04 sec 2/4 Test #3: test_opus_api .................... Passed 8.78 sec 3/4 Test #1: test_opus_decode ................. Passed 41.62 sec 4/4 Test #4: test_opus_encode ................. Passed 92.26 sec

100% tests passed, 0 tests failed out of 4

Total Test time (real) = 92.31 sec

xnorpx commented 3 years ago

C:\git\opus\build>cmake .. -G "Visual Studio 12 2013" -DOPUS_BUILD_TESTING=ON -- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.27.0.windows.1") -- Opus package version from git repo: 1.3.1-76-g034c1b61 -- Opus project version: 1.3.1 -- The C compiler identification is MSVC 18.0.40629.0 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe - works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Looking for floor in m -- Looking for floor in m - not found -- Performing Test VLA_SUPPORTED -- Performing Test VLA_SUPPORTED -- failed to compile -- Looking for alloca.h -- Looking for alloca.h - not found -- Looking for alloca -- Looking for alloca - found -- Looking for lrintf -- Looking for lrintf - found -- Looking for lrint -- Looking for lrint - found -- Looking for intrin.h -- Looking for intrin.h - found -- Check SIMD support by compiler -- Looking for xmmintrin.h -- Looking for xmmintrin.h - found -- Performing Test SSE1_SUPPORTED -- Performing Test SSE1_SUPPORTED - Success -- Looking for emmintrin.h -- Looking for emmintrin.h - found -- Performing Test SSE2_SUPPORTED -- Performing Test SSE2_SUPPORTED - Success -- Looking for smmintrin.h -- Looking for smmintrin.h - found -- Performing Test SSE4_1_SUPPORTED -- Performing Test SSE4_1_SUPPORTED - Success -- Looking for immintrin.h -- Looking for immintrin.h - found -- Performing Test AVX_SUPPORTED -- Performing Test AVX_SUPPORTED - Success -- Performing Test FAST_MATH_SUPPORTED -- Performing Test FAST_MATH_SUPPORTED - Success -- Performing Test STACK_PROTECTOR_SUPPORTED -- Performing Test STACK_PROTECTOR_SUPPORTED - Success -- Performing Test STACK_PROTECTOR_DISABLED_SUPPORTED -- Performing Test STACK_PROTECTOR_DISABLED_SUPPORTED - Success -- The following features have been enabled:

-- The following OPTIONAL packages have been found:

-- The following features have been disabled:

-- Opus library version: 0.8.0 -- Configuring done -- Generating done -- Build files have been written to: C:/git/opus/build

C:\git\opus\build>cmake --build . -j 32 Microsoft (R) Build Engine version 12.0.40629.0 [Microsoft .NET Framework, version 4.0.30319.42000] Copyright (C) Microsoft Corporation. All rights reserved.

Checking Build System Building Custom Rule C:/git/opus/CMakeLists.txt opus.c opus_decoder.c opus_encoder.c opus_multistream.c opus_multistream_encoder.c opus_multistream_decoder.c repacketizer.c opus_projection_encoder.c opus_projection_decoder.c mapping_matrix.c analysis.c mlp.c mlp_data.c CNG.c code_signs.c init_decoder.c decode_core.c decode_frame.c decode_parameters.c decode_indices.c Generating Code... Compiling... decode_pulses.c decoder_set_fs.c dec_API.c enc_API.c encode_indices.c encode_pulses.c gain_quant.c interpolate.c LP_variable_cutoff.c NLSF_decode.c NSQ.c NSQ_del_dec.c PLC.c shell_coder.c tables_gain.c tables_LTP.c tables_NLSF_CB_NB_MB.c tables_NLSF_CB_WB.c tables_other.c tables_pitch_lag.c Generating Code... Compiling... tables_pulses_per_block.c VAD.c control_audio_bandwidth.c quant_LTP_gains.c VQ_WMat_EC.c HP_variable_cutoff.c NLSF_encode.c NLSF_VQ.c NLSF_unpack.c NLSF_del_dec_quant.c process_NLSFs.c stereo_LR_to_MS.c stereo_MS_to_LR.c check_control_input.c control_SNR.c init_encoder.c control_codec.c A2NLSF.c ana_filt_bank_1.c biquad_alt.c Generating Code... Compiling... bwexpander_32.c bwexpander.c debug.c decode_pitch.c inner_prod_aligned.c lin2log.c log2lin.c LPC_analysis_filter.c LPC_inv_pred_gain.c table_LSF_cos.c NLSF2A.c NLSF_stabilize.c NLSF_VQ_weights_laroia.c pitch_est_tables.c resampler.c resampler_down2_3.c resampler_down2.c resampler_private_AR2.c resampler_private_down_FIR.c resampler_private_IIR_FIR.c Generating Code... Compiling... resampler_private_up2_HQ.c resampler_rom.c sigm_Q15.c sort.c sum_sqr_shift.c stereo_decode_pred.c stereo_encode_pred.c stereo_find_predictor.c stereo_quant_pred.c LPC_fit.c bands.c celt.c celt_encoder.c celt_decoder.c cwrs.c entcode.c entdec.c entenc.c kiss_fft.c laplace.c Generating Code... Compiling... mathops.c mdct.c modes.c pitch.c celt_lpc.c quant_bands.c rate.c vq.c apply_sine_window_FLP.c corrMatrix_FLP.c encode_frame_FLP.c find_LPC_FLP.c find_LTP_FLP.c find_pitch_lags_FLP.c find_pred_coefs_FLP.c LPC_analysis_filter_FLP.c LTP_analysis_filter_FLP.c LTP_scale_ctrl_FLP.c noise_shape_analysis_FLP.c process_gains_FLP.c Generating Code... Compiling... regularize_correlations_FLP.c residual_energy_FLP.c warped_autocorrelation_FLP.c wrappers_FLP.c autocorrelation_FLP.c burg_modified_FLP.c bwexpander_FLP.c energy_FLP.c inner_product_FLP.c k2a_FLP.c LPC_inv_pred_gain_FLP.c pitch_analysis_core_FLP.c scale_copy_vector_FLP.c scale_vector_FLP.c schur_FLP.c sort_FLP.c x86cpu.c x86_celt_map.c pitch_sse.c pitch_sse2.c Generating Code... Compiling... vq_sse2.c celt_lpc_sse4_1.c pitch_sse4_1.c NSQ_sse4_1.c NSQ_del_dec_sse4_1.c x86_silk_map.c VAD_sse4_1.c VQ_WMat_EC_sse4_1.c Generating Code... pitch_sse4_1.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\git\opus\build\opus.vcxproj] celt_lpc_sse4_1.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\git\opus\build\opus.vcxproj] pitch_sse2.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\git\opus\build\opus.vcxproj] opus.vcxproj -> C:\git\opus\build\Debug\opus.lib Building Custom Rule C:/git/opus/CMakeLists.txt Building Custom Rule C:/git/opus/CMakeLists.txt Building Custom Rule C:/git/opus/CMakeLists.txt Building Custom Rule C:/git/opus/CMakeLists.txt test_opus_padding.c test_opus_api.c test_opus_decode.c test_opus_encode.c opus_encode_regressions.c Generating Code... test_opus_padding.vcxproj -> C:\git\opus\build\Debug\test_opus_padding.exe test_opus_decode.vcxproj -> C:\git\opus\build\Debug\test_opus_decode.exe test_opus_api.vcxproj -> C:\git\opus\build\Debug\test_opus_api.exe test_opus_encode.vcxproj -> C:\git\opus\build\Debug\test_opus_encode.exe Building Custom Rule C:/git/opus/CMakeLists.txt

C:\git\opus\build>ctest -j 4 Test project C:/git/opus/build Start 1: test_opus_decode Start 2: test_opus_padding Start 3: test_opus_api Start 4: test_opus_encode 1/4 Test #2: test_opus_padding ................ Passed 0.04 sec 2/4 Test #3: test_opus_api .................... Passed 8.78 sec 3/4 Test #1: test_opus_decode ................. Passed 41.62 sec 4/4 Test #4: test_opus_encode ................. Passed 92.26 sec

100% tests passed, 0 tests failed out of 4

Total Test time (real) = 92.31 sec

xnorpx commented 3 years ago

Cannot, reproduce with VS2013, can you share crash dump and symbols from test_opus_encode test?

dttlgotv commented 3 years ago

Cannot, reproduce with VS2013, can you share crash dump and symbols from test_opus_encode test?

cmake --build . -j 32 Unknown argument -j Unknown argument 32 Usage: cmake --build

[options] [-- [native-options]] Options:

= Project binary directory to be built. --target = Build instead of default targets. May only be specified once. --config = For multi-configuration tools, choose . --clean-first = Build target 'clean' first, then build. (To clean only, use --target 'clean'.) --use-stderr = Ignored. Behavior is default in CMake >= 3.0. -- = Pass remaining options to the native tool.
xnorpx commented 3 years ago

Use: "cmake --build ." or upgrade your cmake

xnorpx commented 3 years ago

@dttlgotv did you manage to reproduce the crash with the tests?

dttlgotv commented 3 years ago

@dttlgotv did you manage to reproduce the crash with the tests?

D:\opus\build>ctest -j 4 Test project D:/opus/build Start 4: test_opus_encode Start 1: test_opus_decode Start 3: test_opus_api Start 2: test_opus_padding 1/4 Test #2: test_opus_padding ................ Passed 0.05 sec 2/4 Test #3: test_opus_api .................... Passed 10.89 sec 3/4 Test #1: test_opus_decode ................. Passed 59.38 sec 4/4 Test #4: test_opus_encode ................. Passed 111.37 sec

100% tests passed, 0 tests failed out of 4

Total Test time (real) = 111.39 sec

I can run ctest well, but I use the opuslib produced by it and the crash can be seen. By the way if I use old opus lib in my program produced by 1.1.4, no crash can be seen.

xnorpx commented 3 years ago

So official test is passing, so either a test gap or you have some bug in your application.

Can you write a test that reproduces the issue and share it. Working from a callstack from a screenshot is really hard. One would like to check memory and input signals and encoder state.