# Function Crashing in Vision Client, but works fine in the Designer

**URL:** <https://forum.inductiveautomation.com/t/function-crashing-in-vision-client-but-works-fine-in-the-designer/65787>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [October 27, 2022, 9:51pm UTC](https://forum.inductiveautomation.com/t/function-crashing-in-vision-client-but-works-fine-in-the-designer/65787 "2022-10-27T21:51:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex.chmelka](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alex.chmelka/32/26672_2.png) [@alex.chmelka](https://forum.inductiveautomation.com/u/alex.chmelka)\
**Post date:** [October 27, 2022, 9:51pm UTC](https://forum.inductiveautomation.com/t/function-crashing-in-vision-client-but-works-fine-in-the-designer/65787/1 "2022-10-27T21:51:04Z")

</div>

Ran into an issue that I've never had before. We use a Vision window for various data imports for various reasons. We rolled back a version of this window from a few years ago, and use the following button script to load a CSV into a table:

```auto
from java.io import BufferedReader,FileReader,File
	from system.dataset import toDataSet
	path = event.source.parent.getComponent('File Explorer').selectedPath
	br = BufferedReader(FileReader(path))
	line = br.readLine()
	
	headers = line.split(',')
	
	line = br.readLine()
	
	data = []
	while line != None:
		data.append(line.split(','))
		line = br.readLine()
	
	dataset = toDataSet(headers,data)
	
	event.source.parent.getComponent('Table').data = dataset

```

When pushing this button in a vision client OPENED via the designer, it has no issues loading the data into a table on large CSV files with 100000+ cells of data within a few seconds. However, when attempting the same thing in a vision client OPENED via the vision client launcher, the window freezes and crashes the client. Have not ran into an issue like this before. Tried giving the Vision client the max amount of memory allocation and no luck. I'm on 8.1.21. Thanks for any ideas.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 28, 2022, 12:53am UTC](https://forum.inductiveautomation.com/t/function-crashing-in-vision-client-but-works-fine-in-the-designer/65787/2 "2022-10-28T00:53:43Z")

</div>

Use the client launcher's log file to determine the actual java command that launched the client. Run that same command in a terminal. That will show you the console output prior to the crash.
