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

Panic (division by zero) in drawio package #867

Closed
zivnevo opened this issue Sep 10, 2024 · 1 comment · Fixed by #900
Closed

Panic (division by zero) in drawio package #867

zivnevo opened this issue Sep 10, 2024 · 1 comment · Fixed by #900
Assignees
Labels
bug Something isn't working drawio High prio High priority issues
Milestone

Comments

@zivnevo
Copy link
Member

zivnevo commented Sep 10, 2024

See failure in PR #863 (no idea why this happens when the AWS package is upgraded)

    --- FAIL: TestAllWithComparison/iks_workers_large#05 (5.83s)
panic: runtime error: integer divide by zero [recovered]
	panic: runtime error: integer divide by zero

goroutine 112 [running]:
testing.tRunner.func1.2({0xa30640, 0x1022dc0})
	/opt/hostedtoolcache/go/1.22.4/x64/src/testing/testing.go:1631 +0x24a
testing.tRunner.func1()
	/opt/hostedtoolcache/go/1.22.4/x64/src/testing/testing.go:1634 +0x377
panic({0xa30640?, 0x1022dc0?})
	/opt/hostedtoolcache/go/1.22.4/x64/src/runtime/panic.go:770 +0x132
github.com/np-guard/vpc-network-config-analyzer/pkg/drawio.(*layoutOverlap).potentialBypassPoints(0xc044b38000, {0x4102da?, 0x60539b?}, {0xacc120?, 0xc005bd5750?}, {0x623cad?, 0xc044095860?})
	/home/runner/work/vpc-network-config-analyzer/vpc-network-config-analyzer/pkg/drawio/layoutOverlap.go:195 +0x554
github.com/np-guard/vpc-network-config-analyzer/pkg/drawio.(*layoutOverlap).getBypassPoint(0xc044b38000, {0xc044095860?, 0x0?}, {0x56?, 0xaf535b0500000403?}, {0xc12740?, 0xc043fc6d80?}, {0xc12740, 0xc043fc6d80})
	/home/runner/work/vpc-network-config-analyzer/vpc-network-config-analyzer/pkg/drawio/layoutOverlap.go:216 +0x4b
github.com/np-guard/vpc-network-config-analyzer/pkg/drawio.(*layoutOverlap).handleLinesOverIcons(0xc044b38000)
	/home/runner/work/vpc-network-config-analyzer/vpc-network-config-analyzer/pkg/drawio/layoutOverlap.go:166 +0x36d
github.com/np-guard/vpc-network-config-analyzer/pkg/drawio.(*layoutOverlap).fixOverlapping(0xc044b38000)
	/home/runner/work/vpc-network-config-analyzer/vpc-network-config-analyzer/pkg/drawio/layoutOverlap.go:72 +0x39
github.com/np-guard/vpc-network-config-analyzer/pkg/drawio.(*layoutS).layout(0xc005bd5aa0)
	/home/runner/work/vpc-network-config-analyzer/vpc-network-config-analyzer/pkg/drawio/layout.go:103 +0x6db
github.com/np-guard/vpc-network-config-analyzer/pkg/drawio.CreateDrawioConnectivityMap({0xc11a68, 0xc0429f35e0}, 0x0, 0x0, {0x0, 0x0, 0x0}, {0xad6a47, 0x3})
	/home/runner/work/vpc-network-config-analyzer/vpc-network-config-analyzer/pkg/drawio/createMapFile.go:198 +0xc7
github.com/np-guard/vpc-network-config-analyzer/pkg/vpcmodel.(*DrawioOutputFormatter).WriteOutput(0xc0188ce6e0, 0xc015e1cfa0, 0xc01045ef00, 0xc02f312cf0?, 0x0?, {0xc006bcba40, 0xb1}, 0x0?, 0xa28a60?, 0x0, ...)
	/home/runner/work/vpc-network-config-analyzer/vpc-network-config-analyzer/pkg/vpcmodel/drawioOutput.go:290 +0x32e
github.com/np-guard/vpc-network-config-analyzer/pkg/vpcmodel.(*OutputGenerator).Generate(0xc018dab640, 0x4, {0xc006bcba40, 0xb1})
	/home/runner/work/vpc-network-config-analyzer/vpc-network-config-analyzer/pkg/vpcmodel/output.go:161 +0x23d
github.com/np-guard/vpc-network-config-analyzer/pkg/commonvpc.RunTestPerUseCase(0xc0003e69c0, 0x103b760, 0xc015e1cfa0, 0x1, 0x2, {0xae52de, 0xc}, 0x0)
	/home/runner/work/vpc-network-config-analyzer/vpc-network-config-analyzer/pkg/commonvpc/analysis_output_test_functionality.go:328 +0xfb
github.com/np-guard/vpc-network-config-analyzer/pkg/commonvpc.(*VpcGeneralTest).RunTest(0x103b760, 0xc0003e69c0, {0xae52de, 0xc}, {0xc04bc8, 0xc0003cb500})
	/home/runner/work/vpc-network-config-analyzer/vpc-network-config-analyzer/pkg/commonvpc/analysis_output_test_functionality.go:224 +0x547
github.com/np-guard/vpc-network-config-analyzer/pkg/commonvpc.TestAll.func1(0xc0003e69c0)
	/home/runner/work/vpc-network-config-analyzer/vpc-network-config-analyzer/pkg/commonvpc/analysis_output_test_functionality.go:399 +0x68
testing.tRunner(0xc0003e69c0, 0xc0002e7950)
	/opt/hostedtoolcache/go/1.22.4/x64/src/testing/testing.go:1689 +0xfb
created by testing.(*T).Run in goroutine 23
	/opt/hostedtoolcache/go/1.22.4/x64/src/testing/testing.go:1742 +0x390
FAIL	github.com/np-guard/vpc-network-config-analyzer/pkg/ibmvpc	10.445s
@zivnevo zivnevo added bug Something isn't working drawio labels Sep 10, 2024
@zivnevo zivnevo added this to the v0.7 milestone Sep 12, 2024
@zivnevo zivnevo added the High prio High priority issues label Sep 26, 2024
@zivnevo
Copy link
Member Author

zivnevo commented Sep 26, 2024

Probably a dup of #847

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working drawio High prio High priority issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants