Dear all,
I'm using SNPE to deligate network on DSP of my android phone, without root device
I have tested DSP with follow https://developer.qualcomm.com/sites/default/files/docs/snpe/tools.html#... and results is passed
I'm facing an issue that when I input a black image into network, It will be crashed
with running on Android studio Debuging, It pointed out that crash come from function
error crash reported from app is memory access error: Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR)
in SNPE.hpp
bool execute(const zdl::DlSystem::ITensor *input, zdl::DlSystem::TensorMap &output) noexcept;
in my wrapper call
void NNDLC::executeNetwork(std::map<std::string, std::vector<float>> &result) {
zdl::DlSystem::TensorMap outputTensorMap; snpe->execute(inputTensor.get(), outputTensorMap); ////////////////=> crashing point to this line zdl::DlSystem::StringList tensorNames = outputTensorMap.getTensorNames(); std::for_each( tensorNames.begin(), tensorNames.end(), [&](const char* name) { auto tensorPtr = outputTensorMap.getTensor(name); size_t size = tensorPtr->getSize(); result[name].reserve(size); std::copy (tensorPtr->begin(), tensorPtr->end() ,std::back_inserter(result[name])); });
also if I run app with Cameramode, It will work normally but if I hide the camera, Crashing come and point to same function above
I have tested on 3 kind of device and below is behavior, It make me so confusing and dont know why it happen:
Delegate network on CPU is working fine for all cases except last one(input black image frame)
Could someone englighten me what issue there?
Is there anyone meet the same issue or know the reason why above issue occur?
please help to verify