StacktraceSource contains errors instead of source code
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Apport |
Fix Released
|
Undecided
|
Unassigned | ||
apport (Ubuntu) |
Fix Released
|
Medium
|
Martin Pitt |
Bug Description
The StacktraceSource information being added by apport-retrace contains Error messages see the attachment in bug 1459716.
Here's part of it:
#0 0xb7751be0 in __kernel_vsyscall ()
#1 0xb6813057 in __GI_raise (sig=6) at ../sysdeps/
[Error: ../sysdeps/
#2 0xb6814699 in __GI_abort () at abort.c:89
[Error: abort.c was not found in source tree]
#3 0xb685119e in __libc_message (do_abort=1, fmt=0xb694b444 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/
[Error: ../sysdeps/
I think part of the issue is that apport-retrace only ever searches the srcdir returned by get_source_tree (which is a temporary directory) and doesn't search the sandbox for the filename. Another problem is that find_file_dir is being passed a filename like "../sysdeps/
Related branches
Changed in apport (Ubuntu): | |
assignee: | nobody → Martin Pitt (pitti) |
I fixed the filename being searched for via the following.
@@ -178,7 +185,8 @@ 'Stacktrace' ].splitlines( ): match(frame) 1).split( "/")[-1]
for frame in report[
m = src_frame.
if m:
- result += frame + '\n' + get_code(srcdir, m.group(1), int(m.group(2)))
+ filename = m.group(
+ result += frame + '\n' + get_code(srcdir, cache, filename, int(m.group(2)))
Then a StacktraceSource looked like this:
#3 0x00007ffff776889d in XtAppMainLoop (app=0x6090e0) at ../../src/ Event.c: 1554 xeyes.c: 137 Widget ("eyes", eyesWidgetClass, toplevel, NULL, 0); toplevel) , XtWindow(toplevel), app_context) ;
[Error: Event.c was not found in source tree]
#4 0x000000000040198f in main (argc=1, argv=<optimized out>) at ../xeyes/
132:
133: (void) XtCreateManaged
134: XtRealizeWidget (toplevel);
135: (void) XSetWMProtocols (XtDisplay(
136: &wm_delete_window, 1);
137: XtAppMainLoop(
138:
139: return 0;
140: }