How to write a good bugreport

Angelegt von suung Mon, 27 Sep 2010 19:03:00 GMT

Found this snippet here in our internal tech support issue tracker:

instructions for debian

  • create a backtrace
  • get configuration details
    uname -a
    ls -l /lib/libc.so.6
    dpkg -s libc6 | grep ^Version
    
  • send a debian bug report:
    sudo apt-get install reportbug ; reportbug
    • answer questions and add a problem description when asked (what you executed and its output):
      package:
      version:
      
      problem description:
      [describe the problem shortly]
      
      [add the backtrace here]
      
      configuration details:
      [add output of the commands above]
      
      

example for hal (debian/sid@gibson)

From: coders | brueckenschlaeger <coders@brueckenschlaeger.de>
To: Debian Bug Tracking System <538698@bugs.debian.org>
Subject: Re: Bug#538698: Crash during install and init
Date: Wed, 05 Aug 2009 12:01:05 +0000

Package: hal
Version: 0.5.12~git20090406.46dc48-2
Severity: normal

same problem on x86-K7 2.6.26 debian/sid
this report was created with report bug.

Setting up hal (0.5.12~git20090406.46dc48-2) ...
Reloading system message bus config...done.
Starting Hardware abstraction layer: haldinvoke-rc.d: initscript hal,
action "start" failed.
dpkg: error processing hal (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up kdelibs5-data (4:4.3.0-1) ...
dpkg: dependency problems prevent configuration of xserver-xorg:
 xserver-xorg depends on hal (>= 0.5.12~git20090406); however:
  Package hal is not configured yet.
dpkg: error processing xserver-xorg (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 hal
 xserver-xorg
E: Sub-process /usr/bin/dpkg returned an error code (1)

gdb /usr/sbin/hald
GNU gdb (GDB) 6.8.50.20090628-cvs-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying" 
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb) set pagination 0
(gdb) run
Starting program: /usr/sbin/hald 
[Thread debugging using libthread_db enabled] 
Program exited with code 02.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-gibson (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages hal depends on:
ii  acl          2.2.47-3                    Access control list utilities
ii  adduser      3.110                       add and remove users and
groups
ii  consolekit   0.3.0-3                     framework for defining and
trackin
ii  dbus         1.2.16-2                    simple interprocess messaging
syst
ii  hal-info     20090309-1                  Hardware Abstraction Layer -
fdi f
ii  libc6        2.9-23                      GNU C Library: Shared
libraries
ii  libdbus-1-3  1.2.16-2                    simple interprocess messaging
syst
ii  libdbus-glib 0.82-1                      simple interprocess messaging
syst
ii  libexpat1    2.0.1-4                     XML parsing C library -
runtime li
ii  libgcc1      1:4.4.1-1                   GCC support library
ii  libglib2.0-0 2.20.4-1                    The GLib library of C routines
ii  libhal-stora 0.5.12~git20090406.46dc48-2 Hardware Abstraction Layer -
share
ii  libhal1      0.5.12~git20090406.46dc48-2 Hardware Abstraction Layer -
share
ii  libpolkit2   0.9-4                       library for accessing
PolicyKit
ii  libsmbios2   2.0.3.dfsg-1                Provide access to (SM)BIOS
informa
ii  libstdc++6   4.4.1-1                     The GNU Standard C++ Library
v3
ii  libusb-0.1-4 2:0.1.12-13                 userspace USB programming
library
ii  libvolume-id 0.141-1                     libvolume_id shared library
ii  lsb-base     3.2-23                      Linux Standard Base 3.2 init
scrip
ii  mount        2.15.1~rc1-1                Tools for mounting and
manipulatin
ii  pciutils     1:3.1.3-1                   Linux PCI Utilities
ii  pm-utils     1.2.5-4                     utilities and scripts for
power ma
ii  policykit    0.9-4                       framework for managing
administrat
ii  udev         0.141-1                     /dev/ and hotplug management
daemo
ii  usbutils     0.84-1                      Linux USB utilities

Versions of packages hal recommends:
ii  eject           2.1.5+deb1+cvs20081104-6 ejects CDs and operates
CD-Changer
ii  libsmbios-bin   2.0.3.dfsg-1             Provide access to (SM)BIOS
informa

Versions of packages hal suggests:
pn  gnome-device-manager          <none>     (no description available)

-- no debconf information

$ uname -a
Linux gibson 2.6.26 #1 SMP Tue Jul 14 12:17:46 CEST 2009 i686 GNU/Linux
$ ls -l /lib/libc.so.6
lrwxrwxrwx 1 root root 11 2009-08-04 06:20 /lib/libc.so.6 -> libc-2.9.so
$ dpkg -s libc6 | grep ^Version
Version: 2.9-23

as answer to

Followup 1 - #538698: Crash during install and init

From: Michael Biebl <biebl@debian.org>
Subject: Re: Bug#538698: Crash during install and init
Date: Wed, 05 Aug 2009 03:28:34 +0200

Juhapekka Tolvanen wrote:
> 
> Package: hal
> Version: 0.5.12~git20090406.46dc48-2
> Severity: grave
> 
> 
> This is what happens during installation:
> 
> ---- Clip here ----
> Selecting previously deselected package hal-info.
> (Reading database ... 589821 files and directories currently installed.)
> Unpacking hal-info (from .../hal-info_20090309-1_all.deb) ...
> Selecting previously deselected package hal.
> Unpacking hal (from .../hal_0.5.12~git20090406.46dc48-2_i386.deb) ...
> Processing triggers for man-db ...
> Setting up hal-info (20090309-1) ...
> Setting up hal (0.5.12~git20090406.46dc48-2) ...
> Reloading system message bus config...done.
> Starting Hardware abstraction layer: haldinvoke-rc.d: initscript hal, action
> "start" failed.
> dpkg: error processing hal (--configure):
>  subprocess installed post-installation script returned error exit status 1
> Errors were encountered while processing:
>  hal
> E: Sub-process /usr/bin/dpkg returned an error code (1)

...

> That's it. What should I do now?

Please follow the instructions on the wiki [1] and try to get a proper backtrace.
We had crashes before due to broken fdi cache files, so you could try and
remove/var/cache/hald/fdi-cache (make a copy before you rm it).

Michael

[1] http://wiki.debian.org/HowToGetABacktrace

Javascript toggle bug with SASS 1

Angelegt von suung Fri, 06 Aug 2010 16:09:00 GMT

I found out, what was wracking my mind weeks ago:

 

Consider: I want to toggle the visbility (in css spoken: the display) of a <div>  - container.


in Rails this would work for example like this:

 

in the view


<%= link_to_remote "toggle", :url => toggle_preview_url(:template => template) %>

<div id=:preview">[PREVIEW]</div>

 

and in the controller

render :update do |page|

   page["preview"].toggle

end

 

For this to work, the preview-div should be set on in SASS

display: none

in the beginning

which would be resetted to 'block' by the javascript (in Rails we often we use Prototype, which brings stuff like a toggle(); method)

 

So ... what's special about this?

It does not work. If I skip the display: none step, it works. That means: My preview is visible but get's toggled afterwards,

Now i found out, that when I don't use sass but say

<div style="display:none">

it works.


So i wonder: What is going on here?

Don;t have the time, to figure that out now, but maybe someone can help me.