Bug#474313: Infinite loop when creating 100uF capacitor in circuit

2008-08-15 Thread Petter Reinholdtsen
[Richard Atterer]
 My fix is to perform the above comparison on the two values (integer
 and multiplier) rather than the combined double. The patch is
 attached. I've only tested it lightly!

Comparing doubles using == is probably not a reliable test.  Perhaps
it is better to use (!islessgreater()) from math.h instead?  Another
way to do it is to use (x - y  epsilon), checking that the difference
between two numbers are small.

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#474313: Infinite loop when creating 100uF capacitor in circuit

2008-04-04 Thread Richard Atterer
Package: ktechlab
Version: 0.3-8
Severity: important

Any attempt to create a 100uF capacitor causes the application to freeze at 
100% CPU. This only happens at exactly 100uF - something like 99uF is OK.

To reproduce, start ktechlab, create a new circuit, drag a capacitor onto it, 
select the capacitor, then change its value in the top bar.

It doesn't seem to be the simulation, the problem also happens when simulation 
is paused. I tried stracing the process, but this doesn't give any useful 
info: The process alternates between read(), write(), poll() and 
gettimeofday() calls.

Justification for severity important: You lose your unsaved work when the bug 
is triggered.

Cheers,

  Richard

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.24 (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/bash

Versions of packages ktechlab depends on:
ii  gpsim  0.22.0-4  Simulator for Microchip's PIC micr
ii  kdelibs4c2a4:3.5.8.dfsg.1-7  core libraries and binaries for al
ii  libacl12.2.45-1  Access control list shared library
ii  libart-2.0-2   2.3.20-1  Library of functions for 2D graphi
ii  libatk1.0-01.20.0-1  The ATK accessibility toolkit
ii  libattr1   1:2.4.41-1Extended attribute shared library
ii  libaudio2  1.9.1-2   Network Audio System - shared libr
ii  libc6  2.7-6 GNU C Library: Shared libraries
ii  libcairo2  1.4.14-1  The Cairo 2D vector graphics libra
ii  libfontconfig1 2.5.0-2   generic font configuration library
ii  libfreetype6   2.3.5-1+b1FreeType 2 font engine, shared lib
ii  libgamin0 [libfam0]0.1.9-2   Client library for the gamin file 
ii  libgcc11:4.3.0-1 GCC support library
ii  libglib2.0-0   2.16.1-2  The GLib library of C routines
ii  libgtk2.0-02.12.9-2  The GTK+ graphical user interface 
ii  libice62:1.0.4-1 X11 Inter-Client Exchange library
ii  libidn11   1.4-1 GNU libidn library, implementation
ii  libjpeg62  6b-14 The Independent JPEG Group's JPEG 
ii  libpango1.0-0  1.20.0-1  Layout and rendering of internatio
ii  libpng12-0 1.2.15~beta5-3PNG library - runtime
ii  libpopt0   1.10-3lib for parsing cmdline parameters
ii  libqt3-mt  3:3.3.8b-5Qt GUI Library (Threaded runtime v
ii  libreadline5   5.2-3 GNU readline and history libraries
ii  libsm6 2:1.0.3-1+b1  X11 Session Management library
ii  libstdc++6 4.3.0-1   The GNU Standard C++ Library v3
ii  libx11-6   2:1.0.3-7 X11 client-side library
ii  libxcursor11:1.1.9-1 X cursor management library
ii  libxext6   2:1.0.4-1 X11 miscellaneous extension librar
ii  libxfixes3 1:4.0.3-2 X11 miscellaneous 'fixes' extensio
ii  libxft22.1.12-2  FreeType-based font drawing librar
ii  libxi6 2:1.1.3-1 X11 Input extension library
ii  libxinerama1   2:1.0.3-1 X11 Xinerama extension library
ii  libxrandr2 2:1.2.2-1 X11 RandR extension library
ii  libxrender11:0.9.4-1 X Rendering Extension client libra
ii  libxt6 1:1.0.5-3 X11 toolkit intrinsics library
ii  zlib1g 1:1.2.3.3.dfsg-11 compression library - runtime

Versions of packages ktechlab recommends:
ii  gputils   0.13.5-1   GNU PIC utilities

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]