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

java.lang.ClassCastException sometimes when pins of a part are connected only to each other #76

Open
amstan opened this issue May 30, 2019 · 0 comments
Labels

Comments

@amstan
Copy link
Contributor

amstan commented May 30, 2019

I've been working on some complex importing from kicad. The importer is not finished yet, so I have some malformed schematics (ex: stuff isn't all the way connected).

I came upon this error:
java.lang.ClassCastException
Then nothing, the svg file just contains "undefined".
Are there any good ways to start a debugger on this?
I'm still use nodejs ~/netlistsvg/bin/netlistsvg.js --skin ~/netlistsvg/lib/analog.svg out.json to run netlistsvg.

I tried to simplify my file to track down the problem. One of the problems is on U3.
{
	"modules": {
		"SVG Output": {
			"cells": {
				"power_symbol_16": {
					"connections": {
						"A": [
							16
						]
					},
					"attributes": {},
					"type": "gnd"
				},
				"power_symbol_15": {
					"connections": {
						"A": [
							112
						]
					},
					"attributes": {},
					"type": "gnd"
				},
				"U3": {
					"connections": {
						"A0 (2)": [
							0
						],
						"A1 (3)": [
							2
						],
						"A2 (4)": [
							4
						],
						"A3 (5)": [
							6
						],
						"A4 (6)": [
							8
						],
						"A5 (7)": [
							10
						],
						"A6 (8)": [
							12
						],
						"A7 (9)": [
							12
						],
						"G1 (1)": [
							16
						],
						"G2 (19)": [
							116
						],
						"VCC (20)": [
							19
						],
						"GND (10)": [
							20
						],
						"Y0 (18)": [
							21
						],
						"Y1 (17)": [
							22
						],
						"Y2 (16)": [
							23
						],
						"Y3 (15)": [
							25
						],
						"Y4 (14)": [
							26
						],
						"Y5 (13)": [
							28
						],
						"Y6 (12)": [
							29
						],
						"Y7 (11)": [
							31
						]
					},
					"port_directions": {
						"A0 (2)": "input",
						"A1 (3)": "input",
						"A2 (4)": "input",
						"A3 (5)": "input",
						"A4 (6)": "input",
						"A5 (7)": "input",
						"A6 (8)": "input",
						"A7 (9)": "input",
						"G1 (1)": "input",
						"G2 (19)": "input",
						"VCC (20)": "output",
						"GND (10)": "output",
						"Y0 (18)": "output",
						"Y1 (17)": "output",
						"Y2 (16)": "output",
						"Y3 (15)": "output",
						"Y4 (14)": "output",
						"Y5 (13)": "output",
						"Y6 (12)": "output",
						"Y7 (11)": "output"
					},
					"attributes": {
						"value": "74LS541"
					},
					"type": "U3"
				},

			},
			"ports": {}
		}
	}
}

It has to do with net number 12 (connected to pins A6 and A7). If I connect power_symbol_15 to it (s/112/12), then it renders without errors.

Oddly this works (a smaller example)
{
	"modules": {
		"SVG Output": {
			"cells": {
				"gnd": {
					"connections": {
						"A": [
							4
						]
					},
					"attributes": {},
					"type": "gnd"
				},
				"U3": {
					"connections": {
						"A0": [
							1
						],
						"A1": [
							1
						],
						"VCC": [
							3
						],
						"GND": [
							4
						],
					},
					"port_directions": {
						"A0": "input",
						"A1": "input",
						"VCC": "output",
						"GND": "output",
					},
					"attributes": {
						"value": "74LS541"
					},
					"type": "U3"
				},

			},
			"ports": {}
		}
	}
}
Look for net 1. I wanted to toggle the gnd between net 4 and net 1 to show when it crashes and when it doesn't. But it always works.
@nturley nturley added the bug label Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants