rbuj / FreeRouting

Printed Circuit Board Routing Software from FreeRouting.net
GNU General Public License v3.0
29 stars 6 forks source link

NullPointerException during aotoroute #4

Closed michalfapso closed 7 years ago

michalfapso commented 7 years ago

Thanks a lot, Robert, for working on the autorouter.

I saw this exception while autorouting my PCB:

Exception in thread "Thread-3" java.lang.NullPointerException
    at net.freerouting.freeroute.board.PullTightAlgo.smoothen_end_corners_at_trace_1(PullTightAlgo.java:433)
    at net.freerouting.freeroute.board.PullTightAlgo.opt_changed_area(PullTightAlgo.java:164)
    at net.freerouting.freeroute.board.RoutingBoard.opt_changed_area(RoutingBoard.java:210)
    at net.freerouting.freeroute.board.RoutingBoard.opt_changed_area(RoutingBoard.java:186)
    at net.freerouting.freeroute.autoroute.BatchAutorouter.autoroute_item(BatchAutorouter.java:276)
    at net.freerouting.freeroute.autoroute.BatchAutorouter.autoroute_pass(BatchAutorouter.java:192)
    at net.freerouting.freeroute.autoroute.BatchAutorouter.autoroute_passes_for_optimizing_item(BatchAutorouter.java:60)
    at net.freerouting.freeroute.autoroute.BatchOptRoute.opt_route_item(BatchOptRoute.java:192)
    at net.freerouting.freeroute.autoroute.BatchOptRoute.opt_route_pass(BatchOptRoute.java:133)
    at net.freerouting.freeroute.autoroute.BatchOptRoute.optimize_board(BatchOptRoute.java:110)
    at net.freerouting.freeroute.interactive.BatchAutorouterThread.thread_action(BatchAutorouterThread.java:77)
    at net.freerouting.freeroute.interactive.InteractiveActionThread.run(InteractiveActionThread.java:66)

When the exception occurred, autorouting stopped. I was able to reproduce it once more, but not anymore, so it is not a critical bug :)

I use your latest release 1.4.4

Thanks, Michal

rbuj commented 7 years ago

I think that this happens when the main window is closed while autorouting thread is working. In such case you can avoid that by clicking on design board before closing the main window.

michalfapso commented 7 years ago

Thanks Robert, I just ran the autorouting, then switched to another virtual workspace and after few minutes I noticed, that the CPU is idle, so I checked out the autorouter and it was not completed. But I saw this exception in my terminal from which I ran the autorouter. So I didn't close the window before the exception occurred.

rbuj commented 7 years ago

OK, you can add "-test" argument which provides a more verbose output.

michalfapso commented 7 years ago

Thanks, from now on, I am running the freerouter with the -test flag, but as I wrote before, I wasn't able to reproduce this exception anymore. So you can close this issue for now and when I experience it again, I will send you the more verbose output.

rbuj commented 7 years ago

Thanks, feel free to open a new issue if this problem still occurs.