First Try with Freerouting - Nothing but a blue rectangle?

I’m following the instructions in this blog post.

I have the freeRouting.jar installed from the LayoutEditor package.
I can open freeRouting, and it opens the Java UI with title “Board Routing”.
From PCBnew, I export my layout as Specctra DSN.
I open the DSN file in the freeRouting application.

And I have nothing. Only a dark blue rectangle on a black background.

The DSN file looks valid:

(pcb C:\Data\DEV\KiCad\Green14segLED\Green14SegLED\Green14SegLED.dsn
  (parser
    (string_quote ")
    (space_in_quoted_tokens on)
    (host_cad "KiCad's Pcbnew")
    (host_version "(5.1.6)-1")
  )
  (resolution um 10)
  (unit um)

The blog says “Eventually freeRouting will display your board with the various footprints and its layout exactly as you see it in Pcbnew”

I’ve given in about 20 minute and no change. Nothing is displayed except the faint dark blue rectangle.

What did I miss?

First of all don’t use the one in the Layout package, it’s ancient. Use a recent release by Miho, search the forum for posts by me about it.

There has been some maintenance of the Freerouting jars to support more recent Java. The original authors release no longer works

Thanks, good to know. I’ve been using the Layout packages for ages and didn’t know there were new packages.

For those following along, kenyapcomau’s referenced post is here

The fork by Miho is here.

I don’t have time to test it now, but I’ll report back later. Thanks!

1 Like

freeRouting development moves fast. The version you found is actually archived and a couple of releases behind. They finally got their own freerouting organisation under Github, so look here:

3 Likes

It looks to me from the link that it isn’t developed as much as ‘maintained’ to keep the java updated. I see no indication that its basic functionality is being worked on.

Well I simply meant they moved the site, not implying that they added features.

Although they seem to have improved the UI. Not sure I like the default colour scheme but you can change it.

kenyapcomau thanks for the later link. I have downloaded 1.4.4, but not installed yet.
The 1.4.1 version I downloaded earlier does work, but still doesn’t show anything.
I found the log file, and see this:

2020-07-01 09:06:16.038 [main] INFO  eu.mihosoft.freerouting.FreeRouting - Freerouting application is started.
2020-07-01 09:06:16.398 [main] TRACE eu.mihosoft.freerouting.FreeRouting - Method 'MainApplication.main()' was performed in 0.42 seconds.
2020-07-01 09:06:45.541 [AWT-EventQueue-0] INFO  eu.mihosoft.freerouting.FreeRouting - Opening 'Green14SegLED.dsn'...
2020-07-01 09:06:46.179 [AWT-EventQueue-0] INFO  eu.mihosoft.freerouting.FreeRouting - Opening 'Green14SegLED.rules'...
2020-07-01 09:06:46.181 [AWT-EventQueue-0] ERROR eu.mihosoft.freerouting.FreeRouting - File 'Green14SegLED.rules' was not found.

So it appears to be looking for a projectname.rules file.
I searched on “kicad rules file”, which took me to this article.

The closest thing is

" drc-rules : S-expression file containing design rule checking constraints. Introduced in v6."

But the v6 tells me this is not the right file, since freeRouting obviously predates Kicad v6.

I ran the Design Rules Checker on the unrouted board, but no .rules file was generated.
I looked in Board Settings, and see a button for Import settings, but nothing to export a .rules file.
Can anyone offer any guidance on whether the .rules file is indeed the reason freeRouting is not displaying anything, and if so, how do I create it?

I uninstalled freeRouting 1.4.1 and installed 1.4.4.

I have the same results - empty window. Same log with .rules file not found:

2020-07-01 13:23:41.344 [AWT-EventQueue-0] INFO  eu.mihosoft.freerouting.FreeRouting - Opening 'Green14SegLED.dsn'...
2020-07-01 13:23:41.859 [AWT-EventQueue-0] INFO  eu.mihosoft.freerouting.FreeRouting - Opening 'Green14SegLED.rules'...
2020-07-01 13:23:41.860 [AWT-EventQueue-0] ERROR eu.mihosoft.freerouting.FreeRouting - File 'Green14SegLED.rules' was not found.

I read the information on the latest Github page, but the section on " Additional steps for users of KiCad" does not mention anything about the .rules file being mandatory, or how to create it.

I sent an email with this thread link to the guy maintaining the code. The page lists of forum but I see no link.

I noticed in the Github page the statement for Kicad users:

Start the router by running the freerouting-executable.jar file, push the “Open Your Own Design” button and select the exported .dsn file in the file chooser.

I was running freeRouthing from the start menu since the freerouting-1.4.4-windows-x64.msi installer created a link to C:\Users\Tim\AppData\Local\Freerouting\Freerouting.exe

So I’ll try to run the .jar executable. When I try to directly run the “freerouting-1.4.4-executable.jar” (right-click Open), I get this error: “Java Virtual Machine Launcher. Error: a JNI error has occurred, please check your installation and try again”.
Clicking OK bring up" “A Java Exception has occurred”.

The .rules file is created after a run so doesn’t have to exist. It looks more like a problem with Java on your system.

I didn’t use an installer because I already have Java on my Linux system. I just unpacked the zip file and invoked java on the jar file using a script of mine, essentially doing:

java -jar freerouting-executable.jar

Maybe you could post some details about your OS version and the Java version on it?

This is what I get when I run

java -version

openjdk version "11.0.7" 2020-04-14

Would be interesting to see what your version is. I think freeRouting is built against 11 these days.

1 Like

There was another fork

kenyapcomau, thanks!
Java - what a mess! I don’t use it as a developer, but it “rides along” with other environments.

When I run java -version from a prompt in an empty folder (using the system path), I get:

c:\temp>java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

Searching for java*.exe, I find executables in Arduino, TI CCS, Oracle, jre7, Microchip, jre1.8, javapath, and Windows\Syswow64.

I need to update, so off I go…

Java.com downloads wants to install a browser plugin, with the caveat “We have detected you are using the 64-bit version of Firefox which will not run the Java plugin from this browser.”
Follow a little link at the bottom to " Java Downloads for All Operating Systems"
Here I find a link for jre-8u251-windows-x64.exe, but still has the caveat about browsers.

Over on the left, there is a small link " Looking for the JDK?" and embedded in that page another link to JDK downloads.

At the top of that page is " Java SE 14 Java SE 14.0.1 is the latest release for the Java SE Platform"

Below that I find " Java SE 11 (LTS) Java SE 11.0.7 is the latest release for the Java SE 11 Platform". Getting warmer? There I can download jdk-11.0.7_windows-x64_bin.exe, after legal agreements and signing into an Oracle account.

But your version says “openjdk”. Searching on that, I find https://openjdk.java.net/
The link for Windows binary takes me back to the Oracle page a above. The GPL release takes me to JDK 14.0.1 General-Availability Release.

Hmm, is there a LTS vs beta distinction for the GPL version too? Unclear.
Over on the left there is a link to Java Platform, Standard Edition 11 Reference Implementations. From there I can download openjdk-11+28_windows-x64_bin.zip.

That is just a ZIP with no installer, so I extract to a folder.
With explicit path, I now get:

c:\Data\DEV>C:\Data\DEV\OpenJDK11\bin\java.exe --version
openjdk 11 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)

Hmm - that looks different than yours! You have openjdk version “11.0.7” 2020-04-14
Why is my OpenJDK version 11 dated 2018 and yours is dated 2020?

Let’s give it a try anyway. Creating a directory for freerouting-1.4.4-executable.jar, and running that version of Java from there:

 Directory of c:\Data\DEV\freeRouting

07/02/2020  07:58 AM    <DIR>          .
07/02/2020  07:58 AM    <DIR>          ..
07/01/2020  01:02 PM         4,212,871 freerouting-1.4.4-executable.jar
               1 File(s)      4,212,871 bytes
               2 Dir(s)  292,603,842,560 bytes free

c:\Data\DEV\freeRouting>C:\Data\DEV\OpenJDK11\bin\java.exe -jar freerouting-1.4.4-executable.jar
2020-07-02 07:59:10.397 [main] INFO  eu.mihosoft.freerouting.FreeRouting - Freerouting application is started.
2020-07-02 07:59:34.942 [AWT-EventQueue-0] INFO  eu.mihosoft.freerouting.FreeRouting - Opening 'Green14SegLED.dsn'...
2020-07-02 07:59:35.542 [AWT-EventQueue-0] INFO  eu.mihosoft.freerouting.FreeRouting - Opening 'Green14SegLED.rules'...
2020-07-02 07:59:35.544 [AWT-EventQueue-0] ERROR eu.mihosoft.freerouting.FreeRouting - File 'Green14SegLED.rules' was not found.

Exact same result - empty window with blue rectangle.

I also tried starting from in the JDK bin directory (in case there were path dependencies) with explicit path to freerouting jar, but it still made no difference:

c:\Data\DEV\OpenJDK11\bin>java -jar c:\data\dev\freeRouting\freerouting-1.4.4-executable.jar

The 2018 vs 2020 probably reflects the release date in your case and the build date in mine.

I would report it on the freeRouting Github issues page, maybe somebody has ideas, which I’m out of. The only thing I can think of is something to do with the GUI libraries which is why the older release wouldn’t display either.

I think the installer versions are meant to provide a suitable java interpreter in case the system version isn’t suitable but something went awry on your system.

Java versioning is a mess. First JDKs started off 1.0, 1.1, etc. But the Java version was consecutive integers so there was the confusion of mapping one to the other. Eventually they settled on integers. Be glad Kicad isn’t written in Java (shudder). You’d have 3 times the current hassle with v4/5 and Py2/3.

Mind you, the Linux kernel version was also irrational when for the longest time, the version stayed at 2.6.x until Linus decided to move on to 3.

1 Like

Just a thought: Do you have a CLASSPATH in your environment that could interpose a disrupting jar before the freeRouting jar?

I do not have any classpath in my Environment.

I think I will try on a “clean” system rather than this development system with tons of Java detritus hanging around from other environments.

If I was starting on a Windows 10 x64 system with no Java, which of the many installers above would you recommend I start with?

And would I run the freerouting-1.4.4-executable.jar from commandline, or should I first try installing freerouting-1.4.4-windows-x64.msi?

I also have a Ubuntu VM I could try if need be.

I would first try the freeRouting installer which I think should provide a suitable Java interpreter so you don’t have to go looking for one…

If you need a test DSN, here’s one from a project of mine I shelved. It should keep freeRouting busy for quite a few minutes. It’s easier to see it working if you change the background colour from the default dark gray to something lighter using Display > Colors > Background.

sbc.dsn (48.4 KB)

The result should be something like this:

1 Like