← Back to team overview

kicad-developers team mailing list archive

Re: pcbnew hang

 

It looks like I won't be able to test the fix here. The flag, *
wxDIR_NO_FOLLOW*, appears to have been added in wxWidgets 2.9.5 according
to the documentation.

http://docs.wxwidgets.org/trunk/dir_8h.html#aa45988fae9ce0d0c4f8312a6cf026232a25c09a8059a40281ca2d7919d84b4941

But on Kubuntu 13.04 wxWidgets is version 2.8.12.....

Chris







On Sun, Jun 16, 2013 at 12:46 PM, Chris Morgan <chmorgan@xxxxxxxxx> wrote:

> Oh that flag is allowed for the getallfiles call. I would have tried
> that if I had noticed that. Ill give it a shot tonight but I bet that
> will fix it. Whether it is the right thing to do is another thing.
>
> Chris
>
>
>
> On Jun 16, 2013, at 11:25 AM, Wayne Stambaugh <stambaughw@xxxxxxxxxxx>
> wrote:
>
> > On 6/15/2013 8:12 PM, Chris Morgan wrote:
> >> Dick turned out to be correct, that was some good insight there.
> >>
> >> Attached strace to the process and sure enough it is traversing a
> >> directory that has symlinks, several of which appear to be pointing back
> >> to the same directory. So, the process is making progress but because of
> >> the several symlink loops its taking a long long time to complete.
> >>
> >> It looks like if we used
> >>
> http://docs.wxwidgets.org/trunk/dir_8h.html#aa45988fae9ce0d0c4f8312a6cf026232a25c09a8059a40281ca2d7919d84b4941instead
> >> of wxDir then we would be able to disable symlink traversal.
> >>
> >> Chris
> >>
> >>
> >>
> >>
> >> On Sat, Jun 15, 2013 at 5:46 PM, Chris Morgan <chmorgan@xxxxxxxxx
> >> <mailto:chmorgan@xxxxxxxxx>> wrote:
> >>
> >>    Ok. Ill see what I can come up with. Good idea on the recursive
> >>    symlink. Surprised wx wouldn't handle that situation.
> >>
> >>    Ill try to figure it out this evening.
> >>
> >>    Chris
> >
> > Chris,
> >
> > When you get time, please try changing:
> >
> > unsigned cnt = wxDir::GetAllFiles( GetLibraryPathList()[i], &tmp, wxT(
> "*.mod" ) );
> >
> > to:
> >
> > unsigned cnt = wxDir::GetAllFiles( GetLibraryPathList()[i], &tmp, wxT(
> "*.mod" ), wxDIR_DEFAULT | wxDIR_NO_FOLLOW );
> >
> > and see if that resolves the problem.  It's seems odd to me that it
> works correctly when Pcbnew is run directly from the command line but fails
> when Pcbnew is launched from KiCad.  Are you using a debug build?  It may
> be possible that wxWidgets is trying log something to stdout and that is
> what is actually causing it hang.
> >
> > I wont be able to look at this until sometime tonight or tomorrow.  I
> plan on enjoying the rest of Fathers Day with the family.  Good catch and
> thanks for the help.
> >
> > Happy Father's Day to all of you fathers out there.
> >
> > Wayne
> >
> >
> >>
> >>
> >>
> >>    On Jun 15, 2013, at 5:31 PM, Dick Hollenbeck <dick@xxxxxxxxxxx
> >>    <mailto:dick@xxxxxxxxxxx>> wrote:
> >>
> >>     > No idea.  This is new code.
> >>     >
> >>     > KISYSMOD env var is not used yet, so one option is to comment out
> >>    the entire block from
> >>     > 194 to 213.
> >>     >
> >>     > But I think Wayne would appreciate getting help nailing the
> >>    problem.  You can try and log
> >>     > the execution with fprintf().  Using printf() likely won't work,
> >>    since the output as a
> >>     > child process is directed into parent process "kicad".
> >>     >
> >>     > So fprintf() is a good quick test.  Write GetCount() at the top,
> >>    then each iteration and
> >>     > the path that you are going into.  I think will be informative.
> >>      gdb is probably not up to
> >>     > that task.
> >>     >
> >>     > Then simply do bzr revert pcbnew/pcbnew.cpp when you are done.
> >>     >
> >>     > You might have a circular set of symlinks, who knows.  the log
> >>    file you create will tell.
> >>     >
> >>     >
> >>     >
> >>     >
> >>     >
> >>     >
> >>     > _______________________________________________
> >>     > Mailing list: https://launchpad.net/~kicad-developers
> >>     > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> >>    <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> >>     > Unsubscribe : https://launchpad.net/~kicad-developers
> >>     > More help   : https://help.launchpad.net/ListHelp
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> Mailing list: https://launchpad.net/~kicad-developers
> >> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> >> Unsubscribe : https://launchpad.net/~kicad-developers
> >> More help   : https://help.launchpad.net/ListHelp
> >
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References