DRC reports have no file name and weird extension handling

Bug #1614353 reported by Evan Shultz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Low
Unassigned

Bug Description

If I start a new board and then open the DRC Control form, executing either "Start DRC" or "List Unconnected" will create a report. It's these report filenames that seem to reveal a bug.

The report file is ".rpt", with no file name. So I can't tell to which option the report file pertains in case Pcbnew would ideally be creating different report files for each option. (This may no intentional, I don't know.)

Also, if I create a report again (either one) the resulting report is named ".rpt.rpt", again with no file name but weirdly repeating the extension. Creating further reports overwrites this file name, and even if I delete both report files I must invoke Pcbnew again to avoid overwriting this file.

I suspect both resulting file names are an unintentional bug, but I don't know if there should ideally be different report files for each option in this dialog.

Application: kicad
Version: 4.0.3-stable release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1009,GCC 5.2.0,wx containers,compatible with 2.8)
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Boost version: 1.57.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Revision history for this message
PCB Wiz (1-pcb-wiz) wrote :

I reported what I think is a similar bug earlier - to trigger, you need a NEW session and no active File name.
Started like that, Windows has the wrong defaults in DRC, and it will try to save to \Program Files\... spitting an error.

If you save the design as something, that updates the default names & paths, & this issue goes away.

I thought this was fixed in a june Build, but the build I changed to r7005, seems to have back again
messages around trying to write to \Program Files\ - FWIR, it was windows only.

Revision history for this message
Novak Tamas (novak-7) wrote :

The good design practice is starting KiCad launcher, and create New project there. At this point you must specify path and project name, so no "default name points to nowhere" problems arise.

If you start pcbnew directly (e.g. to draw a PCB pattern without schematic), automatic save, .RPT generation etc. don't have a valid path and name.

To correct this bug, all KiCad programs should have an internal flag of "save path and name valid".
If this flag was cleared prior to any file create operation, the Save dialog would pop up automatically.

Changed in kicad:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
jean-pierre charras (jp-charras) wrote :

@Novak,
What are you actually confirming?

AFAIK, when the user asks for a file report, and if not name was entered (this is the case the first time during a session) a file dialog is opened, to allows this user to enter a *correct* name and path.

A default name (board short name) is set.
Obviously, if the board has no name (this is the case when no project is defined), it is the responsibility to user to set a valid name and path.

Of course, if the user does not enter this valid name and does not choose a reasonable path (although a file dialog is opened), some default is chosen.

But the bug is not in Kicad, and is for me invalid (unless this dialog in not opened).

Changed in kicad:
status: Confirmed → Incomplete
Revision history for this message
PCB Wiz (1-pcb-wiz) wrote :

 I checked my similar bug report at
https://bugs.launchpad.net/kicad/+bug/1596382
and I see this
 "Wayne Stambaugh wrote: I committed a patch to r7019 to fix this issue. Please test it when you get a chance to make sure this resolves the issue."
 Maybe the OP can get > r7019, and see if their issue persists ?

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1614353] Re: DRC reports have no file name and weird extension handling

I don't know that this fixed the DRC issue. It does fix the auto-save
to a path where the user does not have write permissions.

On 8/18/2016 6:54 PM, PCB Wiz wrote:
> I checked my similar bug report at
> https://bugs.launchpad.net/kicad/+bug/1596382
> and I see this
> "Wayne Stambaugh wrote: I committed a patch to r7019 to fix this issue. Please test it when you get a chance to make sure this resolves the issue."
> Maybe the OP can get > r7019, and see if their issue persists ?
>

Revision history for this message
Evan Shultz (evan-shultz) wrote :

First of all, I am launching Pcbnew from KiCad as part of a project. No standalone Pcbnew. And my board file has a file name. So that doesn't apply to my issue report.

Secondly, the DRC Control dialog doesn't ask for a file name or have anywhere to put a path. So there's nowhere I see that I should be putting a path or filename. I haven't checked "Create Report File" but yet these files are being created anyway. Maybe I'm not understanding?

And lastly, I can't fathom why the path and file name wouldn't be auto-set. Prompting for file name is reasonable, but why shouldn't the files go into the project folder by default? And for file names, having a default file name is probably reasonable for 99.99% of users so why not supply a default file name that can be changed by the slim number of users that care for a different file name?

It seems to me that you, JP, are disregarding the validity of my issue report. Perhaps we're missing each other here, but "Incomplete" in no way is fitting FWIW and I identify a legitimate issue which hasn't been addressed in the posts above. If I'm not doing something right please tell me, but that's not what I see.

Revision history for this message
jean-pierre charras (jp-charras) wrote :

1 - A file dialog is opened before saving the .rpt file if no name is entered
2 - the DRC dialog has a widget where to enter a filename
3 - Setting "Incomplete" is usual when something is strange, and needs more info.

I am thinking you encountered this bug:
https://bugs.launchpad.net/kicad/+bug/1593389

and not what you are reporting.

Revision history for this message
Novak Tamas (novak-7) wrote :

My original Confirmed-Low was for report file creation process enabling empty name, like ".rpt".
You mean it is intentional; it's up to the user if he/she is simply click Save button without input a name, so that's ok.

One more -a little bit deceptive- thing on the subject is using Start DRC, OK and Cancel buttons. Everything (running checking and creating report if required) is happening when Start DRC is clicked.
After a sequence of
1 - clicking Start DRC
2 - checking Create report file
3 - clicking OK
someone may require/miss creating report file.
Both OK and Cancel buttons don't do anything out of closing the dialog.
To avoid misunderstading I propose a single "Close" button instead of "OK" and "Cancel".

Revision history for this message
Evan Shultz (evan-shultz) wrote :

@JP

1. I have not checked the Create Report File checkbox on the DRC Control form. I don't know if I'm somehow being unclear, but I'm not asking a report to be created. No dialog is generated asking for a file name. Clicking "Start DRC" or "List Unconnected" is generating reports with no file names and I see absolutely no reason for it to be doing so.

2. Yes, but I'm not using it. Why are report files being created?

3. That popup is exactly what I see. I don't find a popup confirmation to be annoying, and don't think that bug is what I'm reporting. I haven't checked the box to generate a report, there's nowhere for me to enter a file name but unnamed files are being generated nonetheless, and the second report to be generated piles it's extension onto the first bogus report file. That's what I'm reporting.

@Novak That makes complete sense to me. Good proposal.

Revision history for this message
jean-pierre charras (jp-charras) wrote :

I am thinking the bug 1593389 describes your issue: even when generating report is not checked, a dialog is opened, with and incorrect filename
(the first time the name is ".rpt").

It is fixed now, and exists only in 4.0.3 release.

Revision history for this message
Evan Shultz (evan-shultz) wrote :

Indeed, I don't see this in 4.0.4. No report files are generated when I click the "Start DRC" or "List Unconnected" buttons in the DRC Control form. This bug can be closed as far as I'm concerned.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I'm setting the status of this bug report to fix released since this appears to be resolved in 4.0.3 and later releases. Please reopen this bug report if the issue is not resolved.

Changed in kicad:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.