ncnn ios armv7 device crash

nwwlzxa7  于 4个月前  发布在  iOS
关注(0)|答案(4)|浏览(66)

i use 20201208_0508315 release.

my code is

ncnn::Net aNet;
aNet.load_param(param_path.c_str());
aNet.load_model(model_path.c_str());

arm64 device(iPhone 7) work fine, but armv7 device(iPhone 4S) crash at load_model().
call stack is

thread #6, queue = 'com.testApp, stop reason = EXC_BAD_ACCESS (code=EXC_ARM_DA_ALIGN, address=0x169aca2c)
  * frame #0: 0x00e4c04c testApp`__kmp_hyper_barrier_release(barrier_type, kmp_info*, int, int, int) + 460
    frame #1: 0x00e4d7b4 testApp`__kmp_fork_barrier(int, int) + 210
    frame #2: 0x00e3e3dc testApp`__kmp_fork_call + 4784
    frame #3: 0x00e39b9e testApp`__kmpc_fork_call + 62
    frame #4: 0x00c9efbe testApp`ncnn::conv3x3s1_winograd64_transform_kernel_pack4_neon(ncnn::Mat const&, ncnn::Mat&, int, int) + 194
    frame #5: 0x00c9cc78 testApp`ncnn::Convolution_arm::create_pipeline(ncnn::Option const&) + 5184
    frame #6: 0x00c8eda4 testApp`ncnn::Net::load_model(ncnn::DataReader const&) + 294
    frame #7: 0x00c8eeb2 testApp`ncnn::Net::load_model(char const*) + 48

thread #7
   frame #0: 0x00e7578e testApp`__kmp_suspend_64 + 58
    frame #1: 0x00e6eb64 testApp`kmp_flag_64::wait(kmp_info*, int) + 704
    frame #2: 0x00e6cecc testApp`__kmp_hyper_barrier_release(barrier_type, kmp_info*, int, int, int) + 76
    frame #3: 0x00e6e7b4 testApp`__kmp_fork_barrier(int, int) + 210
    frame #4: 0x00e60938 testApp`__kmp_launch_thread + 146
    frame #5: 0x00e74a18 testApp`__kmp_launch_worker(void*) + 66
    frame #6: 0x37c08872 libsystem_pthread.dylib`<redacted> + 138
    frame #7: 0x37c087e6 libsystem_pthread.dylib`_pthread_start + 110
    frame #8: 0x37c06740 libsystem_pthread.dylib`thread_start + 8
2admgd59

2admgd591#

hi, please provide your model param file for reproducing the issue

uurv41yg

uurv41yg2#

I also reproduced with example param and model files.

I tested it with previous releases. (Imported ncnn.framework and openmp.framework for each package.)

  • 20201218_5650b77 => crash
  • 20201208_0508315 => crash
  • 20200916_b766c8c => crash
  • 20200727_bedf00a => crash
  • 20200616_622879a => crash
  • 20200413_5580da4 => crash
  • 20200226_57bedd5 => work fine
txu3uszq

txu3uszq3#

20210124_5e4ea0b => crash

juzqafwq

juzqafwq4#

I suspect there is some regression bug during the openmp upgrading from 7.0.0 to 11.0.0
Try linking with openmp 20200226 with the latest ncnn and see if it makes any difference

相关问题