public static void showCrashReport(Throwable error) {


		Log.e(error);

		try {
			inst.deinit();
		} catch (Throwable t) {}

		JFrame f = new JFrame("SpriteGen has crashed!");
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		f.getContentPane().setLayout(new BoxLayout(f.getContentPane(), BoxLayout.Y_AXIS));


		StringWriter sw = new StringWriter();
		error.printStackTrace(new PrintWriter(sw));
		String exceptionAsString = sw.toString();

		String errorLogAsString = "Not found.";
		String wholeLogAsString = "Not found.";

		try {
			wholeLogAsString = FileUtils.fileToString(Utils.getGameSubfolder(Constants.FILE_LOG));
		} catch (Exception e) {
			e.printStackTrace();
		}

		try {
			errorLogAsString = FileUtils.fileToString(Utils.getGameSubfolder(Constants.FILE_LOG_E));
		} catch (Exception e) {
			e.printStackTrace();
		}

		String txt = "";
		txt = "";
		txt += "SPRITE-GEN HAS CRASHED!\n";
		txt += "\n";
		txt += "Please report it to MightyPork:\n";
		txt += "\tE-mail: ondra@ondrovo.com\n";
		txt += "\tTwitter: #MightyPork (post log via pastebin.com)\n";
		txt += "\n";
		txt += "\n";
		txt += "\n";
		txt += "### STACK TRACE ###\n";
		txt += "\n";
		txt += exceptionAsString + "\n";
		txt += "\n";
		txt += "\n";
		txt += "### ERROR LOG ###\n";
		txt += "\n";
		txt += errorLogAsString + "\n";
		txt += "\n";
		txt += "\n";
		txt += "### FULL LOG ###\n";
		txt += "\n";
		txt += wholeLogAsString + "\n";


		// Create Scrolling Text Area in Swing
		JTextArea ta = new JTextArea(txt, 20, 70);
		ta.setFont(new Font("Courier", 0, 16));
		ta.setMargin(new Insets(10, 10, 10, 10));
		ta.setEditable(false);
		ta.setLineWrap(false);
		JScrollPane sbrText = new JScrollPane(ta);
		sbrText.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10), BorderFactory.createEtchedBorder()));
		sbrText.setWheelScrollingEnabled(true);
		sbrText.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
		sbrText.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);


		// Create Quit Button
		JButton btnQuit = new JButton("Quit");
		btnQuit.setAlignmentX(Component.CENTER_ALIGNMENT);

		btnQuit.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				System.exit(0);
			}
		});

		JPanel buttonPane = new JPanel();
		buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.LINE_AXIS));
		buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
		buttonPane.add(btnQuit);


		f.getContentPane().add(sbrText);
		f.getContentPane().add(buttonPane);

		// Close when the close button is clicked
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);



		//Display Frame
		f.pack(); // Adjusts frame to size of components

		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
		f.setLocation((dim.width - f.getWidth()) / 2, (dim.height - f.getHeight()) / 2);

		f.setVisible(true);

		while (true) {}
	}