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

crashed at TfLiteInterpreterCreate #44513

Closed
jucysoft opened this issue Nov 2, 2020 · 14 comments
Closed

crashed at TfLiteInterpreterCreate #44513

jucysoft opened this issue Nov 2, 2020 · 14 comments
Assignees
Labels
comp:lite TF Lite related issues type:support Support issues

Comments

@jucysoft
Copy link

jucysoft commented Nov 2, 2020

  • iPhone11 pro

  • Podfile
    pod 'TensorFlowLiteSelectTfOps', '> 0.0.1-nightly'
    pod 'TensorFlowLiteSwift', '
    > 0.0.1-nightly', :subspecs => ['Metal']

  • crashed at TfLiteInterpreterCreate.
    My custom model is used at StyleTranfer demo project.

guard let cInterpreter = TfLiteInterpreterCreate(model.cModel, cInterpreterOptions) else {
--> Thread 8: EXC_BAD_ACCESS (code=1, address=0x0)

Thread 8 Queue : org.tensorflow.examples.lite.style_transfer (serial)
#0 0x00000001f0bce618 in _platform_memmove ()
#1 0x00000001007d406c in ___lldb_unnamed_symbol7040$$TFL Style Transfer ()
#2 0x00000001007c82e4 in ___lldb_unnamed_symbol6806$$TFL Style Transfer ()
#3 0x00000001007d0f90 in ___lldb_unnamed_symbol6968$$TFL Style Transfer ()
#4 0x00000001007c3744 in ___lldb_unnamed_symbol6746$$TFL Style Transfer ()
#5 0x00000001007c4304 in ___lldb_unnamed_symbol6748$$TFL Style Transfer ()
#6 0x00000001007b94bc in ___lldb_unnamed_symbol6574$$TFL Style Transfer ()
#7 0x0000000100429cfc in ___lldb_unnamed_symbol129$$TFL Style Transfer ()
#8 0x0000000100429924 in ___lldb_unnamed_symbol128$$TFL Style Transfer ()
#9 0x0000000100429678 in ___lldb_unnamed_symbol127$$TFL Style Transfer ()
#10 0x00000001007b9420 in ___lldb_unnamed_symbol6573$$TFL Style Transfer ()
#11 0x000000010042cc80 in ___lldb_unnamed_symbol169$$TFL Style Transfer ()
#12 0x00000001005638fc in ___lldb_unnamed_symbol2108$$TFL Style Transfer ()
#13 0x0000000100524554 in ___lldb_unnamed_symbol1773$$TFL Style Transfer ()
#14 0x000000010052431c in TfLiteInterpreterCreate ()
#15 0x000000010040e854 in Interpreter.init(modelPath:options:delegates:) at /Users/user/git/examples-master/lite/examples/style_transfer/ios/Pods/TensorFlowLiteSwift/tensorflow/lite/experimental/swift/Sources/Interpreter.swift:98
#16 0x000000010040e144 in Interpreter.__allocating_init(modelPath:options:delegates:) ()
#17 0x00000001003fe3a0 in closure #1 in static Inpainting.newInstance(inpaintingModel:useMetalDelegate:completion:) at /Users/user/git/examples-master/lite/examples/style_transfer/ios/StyleTransfer/Inpainting.swift:97
#18 0x00000001003fee34 in thunk for @escaping @callee_guaranteed () -> () ()
#19 0x000000010096bb68 in _dispatch_call_block_and_release ()
#20 0x000000010096d5f0 in _dispatch_client_callout ()
#21 0x0000000100974fa8 in _dispatch_lane_serial_drain ()
#22 0x0000000100975cb4 in _dispatch_lane_invoke ()
#23 0x0000000100981e38 in _dispatch_workloop_worker_thread ()
#24 0x00000001f0bd4908 in _pthread_wqthread ()

@jucysoft jucysoft added the type:bug Bug label Nov 2, 2020
@ravikyram ravikyram added comp:lite TF Lite related issues type:support Support issues and removed type:bug Bug labels Nov 2, 2020
@ravikyram ravikyram assigned jvishnuvardhan and unassigned ravikyram Nov 2, 2020
@jvishnuvardhan
Copy link
Contributor

@jucysoft Can you please create a simple standalone code to reproduce the issue? Thanks!

@jvishnuvardhan jvishnuvardhan added the stat:awaiting response Status - Awaiting response from author label Nov 2, 2020
@google-ml-butler
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

@google-ml-butler google-ml-butler bot added the stale This label marks the issue/pr stale - to be closed automatically if no activity label Nov 9, 2020
@sdgbraincraft
Copy link

this issue still persists. please see this project Link. I cloned the project from examples.

@jucysoft
Copy link
Author

When a tflite model includes a TransposeConv node, this issue happens. Could you test it?

@google-ml-butler google-ml-butler bot removed the stale This label marks the issue/pr stale - to be closed automatically if no activity label Nov 13, 2020
@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Nov 15, 2020
@jucysoft
Copy link
Author

This issue was resolved at nightly build version by khanh.

@nimishpatel19
Copy link

Still it is crashing at my end. @jucysoft can you guide me how to resolve this?

@jucysoft
Copy link
Author

jucysoft commented May 22, 2021 via email

@nimishpatel19
Copy link

nimishpatel19 commented May 22, 2021

It is crashing here.
image

pod 'TensorFlowLiteSwift', '~> 0.0.1-nightly'

I have used this. Is it fine @jucysoft?

@nimishpatel19
Copy link

this issue still persists. please see this project Link. I cloned the project from examples.

Did you solve this issue?

@jucysoft
Copy link
Author

jucysoft commented May 24, 2021 via email

@nimishpatel19
Copy link

I ran the my old project with nightly version, but current nightly version reproduced this error. so, I changed pod file like following. It resolved this error. pod 'TensorFlowLiteSwift', '~> 2.3.0', :subspecs => ['Metal']

2021. 5. 22. 오후 3:20, Nimish Patel @.***> 작성:  this issue still persists. please see this project Link. I cloned the project from examples. Did you solve this issue? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Thanks. Let me try it right now.

@araii
Copy link

araii commented May 31, 2021

I ran the my old project with nightly version, but current nightly version reproduced this error. so, I changed pod file like following. It resolved this error. pod 'TensorFlowLiteSwift', '~> 2.3.0', :subspecs => ['Metal']

2021. 5. 22. 오후 3:20, Nimish Patel @.***> 작성:  this issue still persists. please see this project Link. I cloned the project from examples. Did you solve this issue? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

....
hi, I'm facing the same EXC_BAD_ACCESS error

and I tried changing the pod file, but there is new error. Lines of
" TensorFlow Lite Error: Unsupported data type 13 in tensor" followed by
"Failed to create the interpreter with error: Failed to create the interpreter."

Screenshot 2021-05-31 at 6 28 59 PM

any help? did changing the pod file work you?

@nimishpatel19
Copy link

I ran the my old project with nightly version, but current nightly version reproduced this error. so, I changed pod file like following. It resolved this error. pod 'TensorFlowLiteSwift', '~> 2.3.0', :subspecs => ['Metal']

2021. 5. 22. 오후 3:20, Nimish Patel @.***> 작성:  this issue still persists. please see this project Link. I cloned the project from examples. Did you solve this issue? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

....
hi, I'm facing the same EXC_BAD_ACCESS error

and I tried changing the pod file, but there is new error. Lines of
" TensorFlow Lite Error: Unsupported data type 13 in tensor" followed by
"Failed to create the interpreter with error: Failed to create the interpreter."

Screenshot 2021-05-31 at 6 28 59 PM

any help? did changing the pod file work you?

Nope. But I changed the approch of implementation. I was using custom code to classify. But now I am using TensorFlowLiteTaskText for Text classification in project like this,

pod 'TensorFlowLiteSwift'
pod 'TensorFlowLiteTaskText', '~> 0.0.1-nightly'

Tensorflow released TensorFlowLiteTaskText prereleased version.
Check this examples here
https://github.com/tensorflow/examples/tree/master/lite/examples
I hope this might be useful for you.
Thanks

@mralihaidar
Copy link

how to resolve this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:lite TF Lite related issues type:support Support issues
Projects
None yet
Development

No branches or pull requests

8 participants