eeschema: -cache.lib file not created the first time you save

Bug #1102381 reported by Jacobo Aragunde Pérez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Jacobo Aragunde Pérez

Bug Description

Application: KiCad
Version: (2013-01-20 BZR 3915)-testing
Build: wxWidgets 2.8.12 (no debug,Unicode,compiler with C++ ABI 1002,GCC 4.7.2,wx containers,compatible with 2.4,compatible with 2.6)
Platform: Linux 3.7.2-201.fc18.x86_64 x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.49.0
Options: USE_PCBNEW_NANOMETRES=ON
         KICAD_GOST=OFF
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=OFF
         KICAD_SCRIPTING_MODULES=OFF
         KICAD_SCRIPTING_WXPYTHON=OFF

When you save a new .sch file for the first time, the corresponding -cache.lib file is not created. It is created only after you close the document, open it again and then save.

Tags: eeschema save
Revision history for this message
Jacobo Aragunde Pérez (jaragunde) wrote :

Two different things are happening here:

1. When you use "save current sheet as" the code to generate the -cache.lib file is not called.
2. When you use "save whole schematic project" and the document is new, the code is called but the file name is not assigned correctly: the file is named "-cache.lib" instead of "noname-cache.lib".

The attached patch fixes both. To fix (2), I replaced the call

    fn = g_RootSheet->GetFileName();

with

    fn = ScreenList.GetFirst()->GetFileName();

Let me know what you think :)

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote : Re: [Bug 1102381] Re: eeschema: -cache.lib file not created the first time you save

This is good that you found these. I discovered them a while ago but
forgot to fike a bug report.

There was also an issue with specifying a relative path on the eeschema
command line to a schematic, relative path, but longer than a basename.
Can you verify if that is still there?
On Jan 21, 2013 10:40 AM, "Jacobo Aragunde Pérez" <email address hidden>
wrote:

> Two different things are happening here:
>
> 1. When you use "save current sheet as" the code to generate the
> -cache.lib file is not called.
> 2. When you use "save whole schematic project" and the document is new,
> the code is called but the file name is not assigned correctly: the file is
> named "-cache.lib" instead of "noname-cache.lib".
>
> The attached patch fixes both. To fix (2), I replaced the call
>
> fn = g_RootSheet->GetFileName();
>
> with
>
> fn = ScreenList.GetFirst()->GetFileName();
>
> Let me know what you think :)
>
> ** Patch added: "1102381.patch"
>
> https://bugs.launchpad.net/kicad/+bug/1102381/+attachment/3492374/+files/1102381.patch
>
> --
> You received this bug notification because you are a member of KiCad Bug
> Squad, which is subscribed to KiCad.
> https://bugs.launchpad.net/bugs/1102381
>
> Title:
> eeschema: -cache.lib file not created the first time you save
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1102381/+subscriptions
>

Revision history for this message
Jacobo Aragunde Pérez (jaragunde) wrote :

El 21/01/13 17:46, Dick Hollenbeck escribió:
>
> There was also an issue with specifying a relative path on the eeschema
> command line to a schematic, relative path, but longer than a basename.
> Can you verify if that is still there?
>

Found something. The program runs but it shows the error message "Failed
to inspect the lock file ...". I don't know if that was the problem you
found.

I'll take I look tomorrow, I have an idea of where the problem can be.

--
Jacobo Aragunde
Software Engineer at Igalia

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

I am thinking a related bug is Bug #1101718

Changed in kicad:
status: New → Fix Committed
Revision history for this message
Martin Errenst (imp-d) wrote :

r3916 stable

Changed in kicad:
status: Fix Committed → 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.