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

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:

from 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:
		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.

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.