Random crash in automake manager with Makefile.am open

Matt Rogers mattr at kde.org
Mon Oct 23 12:22:02 UTC 2006


On Sunday 22 October 2006 05:19, Megan Webb wrote:
> Hi,
>
> I've submitted patches for automake manger. And am working on
> on more automake manager bugs now.
>
> But getting random crashes when trying to Remove files from a target,
> add new target, add existing files to a target.  I'm not able to get a
> reproducible do "x then y, then crash", but always crash sooner or later.
>
> Besides working on these bugs, I've not used automake manager in the
> past. (didn't know it existed). In the early bug work, only added/removed
> subproject and targets. I didn't add/remove files to a target.  I can still
> add/remove subprojects and targets without problem. Only have crashes
> when I start using "create new file/ add existing files" and have the
> Makefile.am open
>
> I had random problems before - and just rebuilt qt, kdelibs, kdebase
> with debug symbols to get a full trace.
>
> Sample of my efforts:
>
> Check no kdevelop processes running.
>
> 1. Create new project 'test' (c++) - simple hello world
> 2. In automake manger: RMB on 'test.kdevelop', add new subproject 'foo'
> 3. RMB on 'foo', add target Program/bin: 'bar'
> 4. RMB on 'bar' create new file 'f0' (blank file)
> 5. RMB on 'bar' remove
> 6. RMB on 'foo', add target Program/bin: 'bar'
> 7. RMB on 'bar' add existing file and add f0 back.
> 8. RMB on 'bar' create new file 'f1' (blank file)
> 9. RMB on 'bar' remove
> 10. RMB on 'foo', add target Program/bin: 'bar'
> 11. RMB on 'bar' add existing file and add f0, f1 back.
>
> No crash.
>
> Close kdevelop, check no kdevelop processes running,
> delete test project from disk. Start kdevelop:
>
> 1. Create new project 'test' - simple hello world
> 2. In automake manger: RMB on 'test.kdevelop', add new subproject 'foo'
> 3. RMB on 'foo', add target Program/bin: 'bar'
> -- open foo/Makefile.am in the window - so I can watch what happens to
> the file.
> 4. RMB on 'bar' create new file 'f0' (blank file)
> -- reload Makefile.am
> 5. RMB on 'bar' remove
> 6. RMB on 'foo', add target Program/bin: 'bar'
> 7. RMB on 'bar' add existing file and add f0 back.
> -- reload Makefile.am - at this time I have foo and f0 added twice (the
> bug I'm working on)
> 8. RMB on 'bar' create new file
> - crash.
>
> trace6.txt attached.
>
> Check no kdevelop processes running. Delete test project from disk.
> Start kdevelop:
>
> 1. Create new project 'test' - simple hello world
> 2. In automake manger: RMB on 'test.kdevelop', add new subproject 'foo'
> 3. RMB on 'foo', add target Program/bin: 'bar'
> -- open foo/Makefile.am in the window - so I can watch what happens to
> the file.
> 4. RMB on 'bar' create new file 'f0' (blank file)
> -- reload Makefile.am
> 5. RMB on 'bar' remove
> - crash
>
> trace7.txt attached
>
> Sometimes I do not crash for sometime, but continue to add/remove target
> and files with refresh of foo/Makefile.am and eventually the crash happens.
>
> If I attach gdb when running, I find that the crash line in trace7.txt ends
> something like:
>
> 0xb7f0914c in QString::unicode (this=0x890126c) at qstring.h:653
> 653         const QChar* unicode() const { return d->unicode; }
> (gdb) p d
> $1 = (QStringData *) 0x11
>
>
> If I do not have foo/Makefile.am open in kdevelop, no crash.
>
> Anyone else get this?
>
> Cheers
>
> Megan

I'm pretty sure that this has to do with Kate's automatic change detection 
that it uses to automatically reload files or notify the user if they've been 
changed outside the editor, which would explain why you see the crash when 
the Makefile.am is open and don't see it when the Makefile.am is closed.

Unfortunately, I have no idea how to fix it. I'll post it to kde-core-devel 
within the next day to get feedback there from the people who know stuff 
about the file watching classes.

Thanks
-- 
Matt




More information about the KDevelop-devel mailing list