Bug 51951 - KSim crashes when activating lm_sensors monitor.
Summary: KSim crashes when activating lm_sensors monitor.
Status: RESOLVED FIXED
Alias: None
Product: ksim
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Robbie Ward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-15 19:56 UTC by gerein
Modified: 2003-05-01 12:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
ksim crash fix (533 bytes, patch)
2002-12-28 20:53 UTC, Robbie Ward
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gerein 2002-12-15 19:56:20 UTC
Version:           0.9.0 (using KDE 3.0.4)
Installed from:     (testing/unstable)
Compiler:          gcc version 2.95.4 20011002 (Debian prerelease)
OS:          Linux (i686) release 2.4.18

I have installed lm_sensors 2.7. It works fine in the console (i.e. calling 'sensors').

When I try to activate the lm_sensors monitor in the KSim-configuration, it crashes everytime with this backtrace:

#0  0x40df1269 in wait4 () from /lib/libc.so.6
#1  0x40e643c4 in sys_sigabbrev () from /lib/libc.so.6
#2  0x40c6bc75 in waitpid () from /lib/libpthread.so.0
#3  0x40541a20 in KCrash::defaultCrashHandler () from /usr/lib/libkdecore.so.4
#4  0x40d7cbd8 in sigaction () from /lib/libc.so.6
#5  0x4111d4c6 in SensorBase::update ()
   from /usr/local/kde/lib/kde3/ksim_sensors.so
#6  0x4111d121 in SensorBase::setUpdateSpeed ()
   from /usr/local/kde/lib/kde3/ksim_sensors.so
#7  0x4111d024 in SensorBase::SensorBase ()
   from /usr/local/kde/lib/kde3/ksim_sensors.so
#8  0x4111ca2e in SensorBase::self ()
   from /usr/local/kde/lib/kde3/ksim_sensors.so
#9  0x411184ad in SensorsView::SensorsView ()
   from /usr/local/kde/lib/kde3/ksim_sensors.so
#10 0x41118201 in PluginModule::createView ()
   from /usr/local/kde/lib/kde3/ksim_sensors.so
#11 0x4007469b in KSim::Plugin::Plugin ()
   from /usr/local/kde/lib/libksimcore.so.1
#12 0x400775aa in KSim::PluginLoader::createPlugin ()
   from /usr/local/kde/lib/libksimcore.so.1
#13 0x40075ee9 in KSim::PluginLoader::loadPlugin ()
   from /usr/local/kde/lib/libksimcore.so.1
#14 0x40030592 in KSim::MainView::addPlugin () from /usr/local/kde/lib/ksim.so
#15 0x400304aa in KSim::MainView::addPlugins () from /usr/local/kde/lib/ksim.so
#16 0x4002f2d3 in KSim::MainView::MainView () from /usr/local/kde/lib/ksim.so
#17 0x40032620 in KSim::MainWindow::initWidget ()
   from /usr/local/kde/lib/ksim.so
#18 0x40031e18 in KSim::MainWindow::MainWindow ()
   from /usr/local/kde/lib/ksim.so
#19 0x4002d703 in main () from /usr/local/kde/lib/ksim.so
#20 0x40d6ba5f in __libc_start_main () from /lib/libc.so.6
Comment 1 Robbie Ward 2002-12-28 20:53:23 UTC
Created attachment 664 [details]
ksim crash fix

If you are running lm_sensors 2.7.0, try the attached patch.. this should fix
the problem
Comment 2 Jukka Tastula 2003-03-12 10:06:55 UTC
Different versions here but this bug looks similar enough to me so ... 
 
The patch doesn't seem to do anything for ksim version 1.0.0 from kde 3.1 
release. With or without it after upgrading to 2.7.0 it always crashes at start. 
 
Starting program: /usr/local/kde-3.1-final-gcc3.2/bin/ksim  
[New Thread 16384 (LWP 3654)] 
ksim: loadPlugins: true 
ksim: [Null pointer] 
ksim: KSim::Theme: type = KrellMeter 
ksim: KSim::Theme: size = 11 
ksim: KSim::Theme: depth = 0 
ksim: KSim::Theme: xOffset = 0 
ksim: KSim::Theme: yOffset = 0 
ksim: KSim::Theme: type = KrellMeter 
ksim: KSim::Theme: size = 11 
ksim: KSim::Theme: depth = 0 
ksim: KSim::Theme: xOffset = 0 
ksim: KSim::Theme: yOffset = 0 
ksim: libsensors.so location = /usr/local/lib/libsensors.so 
 
Program received signal SIGSEGV, Segmentation fault. 
[Switching to Thread 16384 (LWP 3654)] 
0x41392fba in sensors_get_all_features () from /usr/local/lib/libsensors.so 
(gdb) bt 
#0  0x41392fba in sensors_get_all_features () from /usr/local/lib/libsensors.so 
#1  0x41389abe in SensorBase::update() (this=0x8119748) at 
sensorbase.cpp:108 
#2  0x4138997b in SensorBase::setUpdateSpeed(unsigned) (this=0x8119748, 
speed=15000) at sensorbase.cpp:87 
#3  0x41389526 in SensorBase (this=0x8119748) at sensorbase.cpp:71 
#4  0x41388c7c in SensorBase::self() () at sensorbase.cpp:41 
#5  0x41384b3a in SensorsView (this=0x80ab0f0, parent=0x8109c50, 
name=0x80aa6f8 "ksim_sensors") at ksimsensors.cpp:81 
#6  0x413847e7 in PluginModule::createView(char const*) (this=0x8109c50, 
className=0x80aa6f8 "ksim_sensors") at ksimsensors.cpp:51 
#7  0x4007b421 in Plugin (this=0xbffff110, plugin=0x8109c50, file=@0xbffff280) at 
/home/ftp/pub/archive/iso/kde31/qt-x11-free-3.1.1/include/qcstring.h:295 
#8  0x4007e39a in KSim::PluginLoader::createPlugin(KDesktopFile const&) 
(this=0x8106bc8, file=@0xbffff110) 
    at /home/ftp/pub/archive/iso/kde31/qt-x11-free-3.1.1/include/qcstring.h:295 
#9  0x4007cde5 in KSim::PluginLoader::loadPlugin(KDesktopFile const&) 
(this=0x8106bc8, file=@0xbffff280) at pluginloader.cpp:91 
#10 0x40032d50 in KSim::MainView::addPlugin(KDesktopFile const&, bool) 
(this=0x8510c484, file=@0xbffff280) at ksimview.cpp:326 
#11 0x40032c52 in KSim::MainView::addPlugins() (this=0x80e8b08) at 
/home/ftp/pub/archive/iso/kde31/qt-x11-free-3.1.1/include/qvaluelist.h:186 
#12 0x400318c9 in MainView (this=0x80e8b08, config=0x809b8f8, 
loadPlugins=true, parent=0x80fd8d8, name=0x4004b5a0 "m_view") at 
ksimview.cpp:145 
#13 0x40034a1e in KSim::MainWindow::initWidget(KURL::List const&) 
(this=0x80d9a60, urlList=@0xbffff580) at 
/usr/local/kde-3.1-final-gcc3.2/include/kapplication.h:178 
#14 0x4003418c in MainWindow (this=0x80d9a60, urlList=@0xbffff580, 
parent=0x0, name=0x0) at ksim.cpp:45 
#15 0x4002fb89 in main (argc=1, argv=0xbffff724) at 
/home/ftp/pub/archive/iso/kde31/qt-x11-free-3.1.1/include/qvaluelist.h:431 
 
Comment 3 gerein 2003-03-12 10:33:43 UTC
I tried the patch on 0.9 and current CVS HEAD. Worked fine. KSim runs great now. 
 
Comment 4 Jukka Tastula 2003-03-12 13:16:30 UTC
Argh! My bad. Used --dry-run and then forgot to actually apply the patch :) 
1.0.0 works fine now, too. Sorry. 
 
Comment 5 Robbie Ward 2003-05-01 12:19:49 UTC
Ok, After giving it some thought i've commited this fix into cvs HEAD, but since it breaks for lm_sensors 
2.6.2 and below (i believe that was the last 2.6 version before 2.7) im not sure if its the correct fix, so i'll 
probably look for a more long term solution... but this fix will do for now.