# TFLite Interpreter crash on Windows

**URL:** <https://discuss.ai.google.dev/t/tflite-interpreter-crash-on-windows/30473>\
**Category:** General Discussion\
**Tags:** tflite, windows, help\_request\
**Created:** [May 9, 2022, 5:29am UTC](https://discuss.ai.google.dev/t/tflite-interpreter-crash-on-windows/30473 "2022-05-09T05:29:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![huqq1234](https://avatars.discourse-cdn.com/v4/letter/h/9de0a6/32.png) [@huqq1234](https://discuss.ai.google.dev/u/huqq1234)\
**Post date:** [May 9, 2022, 5:29am UTC](https://discuss.ai.google.dev/t/tflite-interpreter-crash-on-windows/30473/1 "2022-05-09T05:29:15Z")

</div>

When assign assign interpreter-\>outputs() to another variable, it crashed. Same code works fine on Linux.

```c++
#include <tensorflow/lite/kernels/register.h>
using namespace tflite;

int main() {
	std::unique_ptr<tflite::Interpreter> interpreter;
	auto model = tflite::FlatBufferModel::BuildFromFile("D:/test.tflite");
	if (model == nullptr) {
		printf("Error1\n");
	}
	tflite::ops::builtin::BuiltinOpResolver resolver;
	if (InterpreterBuilder(*model, resolver)(&interpreter) != kTfLiteOk) {
		printf("Error2\n");
	}
	if (interpreter->AllocateTensors() != kTfLiteOk) {
		printf("Error3\n");
	}

	interpreter->outputs(); // This line will work
	 //auto outs = interpreter->outputs(); // This line will crash

	printf("Done\n");
	return 0;
}

```

The crash is in \<vector\> line 559

```c++
const pointer _Rightfirst = _Right_data._Myfirst;

```

The exception is

```auto
Exception thrown: read access violation.
_Right_data was 0xFFFFFFFFFFFFFFF7.

```

---

<div class="post-metadata">

**Author:** ![LK\_Kadali](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/lk_kadali/32/13996_2.png) [@LK\_Kadali](https://discuss.ai.google.dev/u/LK_Kadali)\
**Post date:** [March 19, 2024, 12:13pm UTC](https://discuss.ai.google.dev/t/tflite-interpreter-crash-on-windows/30473/3 "2024-03-19T12:13:05Z")

</div>

Hi @huqq1234 ,

Please provide your tflite file and the code related to the `interpreter->outputs()` assignment, along with any associated functions or classes, for analysing the issue. At the same time, if you’re using any custom classes with pointers make sure that objects aren’t removed before the TensorFlow Lite converter has finished processing them. It may lead to access violations.

Thank You
