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

[Mobile] onnxruntime-objc crash #21026

Open
hasayakey opened this issue Jun 13, 2024 · 4 comments
Open

[Mobile] onnxruntime-objc crash #21026

hasayakey opened this issue Jun 13, 2024 · 4 comments
Labels
platform:mobile issues related to ONNX Runtime mobile; typically submitted using template

Comments

@hasayakey
Copy link

hasayakey commented Jun 13, 2024

Describe the issue

I am currently using Whisper for ASR, which is a tiny/base multi-language model generated by Olive. It works fine most of the time, but when I feed Chinese audio to Whisper, the generated string may crash in some cases.

企业微信20240613-104431

企业微信20240613-105631

To reproduce

https://github.com/microsoft/Olive/blob/main/examples/whisper/README.md
python prepare_whisper_configs.py --model_name openai/whisper-tiny --no_audio_decoder --multilingual --enable_timestamps
olive run --config whisper_cpu_int8.json --setup

Urgency

No response

Platform

iOS

OS Version

17.5.1

ONNX Runtime Installation

Built from Source

Compiler Version (if 'Built from Source')

1.18.0

Package Name (if 'Released Package')

None

ONNX Runtime Version or Commit ID

1.18.0

ONNX Runtime API

Objective-C/Swift

Architecture

ARM64

Execution Provider

Default CPU

Execution Provider Library Version

No response

@hasayakey hasayakey added the platform:mobile issues related to ONNX Runtime mobile; typically submitted using template label Jun 13, 2024
@skottmckay
Copy link
Contributor

It's not clear from the screenshots what the complete error message is, or what the callstack is.

Which object Is the nil?

@hasayakey
Copy link
Author

It's not clear from the screenshots what the complete error message is, or what the callstack is.

Which object Is the nil?

create NSString from tensorStrindData return nil

@edgchen1
Copy link
Contributor

is the string a valid UTF-8 encoded string? the representation shown by lldb (po tensorStringData.data()) in the screenshot has some odd-looking content at the end.

@hasayakey
Copy link
Author

is the string a valid UTF-8 encoded string? the representation shown by lldb (po tensorStringData.data()) in the screenshot has some odd-looking content at the end.

This is not a valid UTF-8 string, which will cause NSString creation to fail, and NSMutableArray cannot add nil objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:mobile issues related to ONNX Runtime mobile; typically submitted using template
Projects
None yet
Development

No branches or pull requests

3 participants