Bi-monthly release with minor bug fixes and improvements
Please Log in or Create an account to join the conversation.
// Returns the median of the sample values.
// The values are not modified.
template <typename T>
T median(T *values, int size, int sampleBy)
{
const int downsampled_size = size / sampleBy;
std::vector<T> samples(downsampled_size);
for (int index = 0, i = 0; index < size; ++i, index += sampleBy)
samples[i] = values[index];
return median(samples);
}
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
KiB Mem : 3801320 total, 1780620 free, 1072236 used
KiB Swap: 1900632 total, 1900632 free, 0 used
VIRT RES SHR S %CPU %MEM
kstars 2088.8m 240.4m 90.5m S 9 6.5
kstars/fits 2988.8m 687.1m 95.7m S 9 18.5
(gdb) bt
#0 0x0000007fb52804d8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x0000007fb52818b4 in __GI_abort () at abort.c:79
#2 0x0000007fb52ba65c in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7fb537bb88 "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#3 0x0000007fb52c09c4 in malloc_printerr (str=str@entry=0x7fb5377878 "double free or corruption (!prev)") at malloc.c:5350
#4 0x0000007fb52c25e8 in _int_free (av=0x7fb53a1a70 <main_arena>, p=0x555b4bf4b0, have_lock=<optimized out>) at malloc.c:4281
#5 0x00000055558fc73c in __gnu_cxx::new_allocator<unsigned short>::deallocate(unsigned short*, unsigned long) (this=<synthetic pointer>, __p=<optimized out>)
at /usr/include/c++/7/ext/new_allocator.h:125
#6 0x00000055558fc73c in std::allocator_traits<std::allocator<unsigned short> >::deallocate(std::allocator<unsigned short>&, unsigned short*, unsigned long) (__a=<synthetic pointer>..., __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/7/bits/alloc_traits.h:462
#7 0x00000055558fc73c in std::_Vector_base<unsigned short, std::allocator<unsigned short> >::_M_deallocate(unsigned short*, unsigned long) (this=<synthetic pointer>, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/7/bits/stl_vector.h:180
#8 0x00000055558fc73c in std::_Vector_base<unsigned short, std::allocator<unsigned short> >::~_Vector_base() (this=<synthetic pointer>, __in_chrg=<optimized out>)
at /usr/include/c++/7/bits/stl_vector.h:162
#9 0x00000055558fc73c in std::vector<unsigned short, std::allocator<unsigned short> >::~vector() (this=<synthetic pointer>, __in_chrg=<optimized out>)
at /usr/include/c++/7/bits/stl_vector.h:435
#10 0x00000055558fc73c in (anonymous namespace)::median<unsigned short> (sampleBy=<optimized out>, size=45441024, values=0x3f80000000000000, this=<optimized out>, this=<optimized out>) at ./kstars/fitsviewer/stretch.cpp:35
#11 0x00000055558fc73c in (anonymous namespace)::computeParamsOneChannel<unsigned short> (width=<optimized out>, height=<optimized out>, inputRange=127, params=0x7fffffd9e8, buffer=0x3f80000000000000, this=<optimized out>, this=<optimized out>) at ./kstars/fitsviewer/stretch.cpp:219
#12 0x00000055558fc73c in Stretch::computeParams(unsigned char*) (this=this@entry=0x7fffffda68, input=0x7f06149010 "X\004_\004_\004\243\004\243\004\353\003\353\003~\004~\004\243\005\243\005\031\005\031\005D\005D\005,\006,\006\027\004\027\004\206\004\206\004\060\005\060\005\261\004\261\004\356\003\356\003\311\005\311\005_\005_\005\314\004\314\004\270\003\270\003\314\004\314\004U\005U\005'\005'\005\210\004\210\004X\004X\004n\004n\004\033\005\033\005\353\004\353\004\355\005\355\005%\005%\005z\004z\004f\004f\004k\005k\005\367\004\367\004\206\004\206\004k\005k\005\206\004\206\004\006\005\006\005]\005]\005\264\004\264\004\b\005\b\005\356\004\356\004I\004I\004\070\004\070\004d\004d\004\017\005\017\005Q\005Q\005\337\005\337\005\203\004\203\004f\005f\005\r\005\r\005\001\004\001\004f\004"...) at ./kstars/fitsviewer/stretch.cpp:378
#13 0x00000055557b1768 in (anonymous namespace)::doStretch(FITSData*, QImage*, bool) (data=0x55586bc000, outputImage=outputImage@entry=0x55586b6a08, stretchOn=<optimized out>)
at ./kstars/fitsviewer/fitsview.cpp:56
#14 0x00000055557b99e4 in FITSView::rescale<unsigned short>(FITSZoom) (this=this@entry=0x55586b6920, type=type@entry=ZOOM_KEEP_LEVEL) at ./kstars/fitsviewer/fitsview.cpp:423
#15 0x00000055557bb3f0 in FITSView::rescale(FITSZoom) (this=this@entry=0x55586b6920, type=type@entry=ZOOM_KEEP_LEVEL) at ./kstars/fitsviewer/fitsview.cpp:340
#16 0x00000055557bb518 in FITSView::toggleStretch() (this=0x55586b6920) at ./kstars/fitsviewer/fitsview.cpp:1218
#17 0x00000055558f3ad4 in FITSViewer::toggleStretch() (this=0x555996b1c0) at ./kstars/fitsviewer/fitsviewer.cpp:1003
#18 0x00000055558457e4 in FITSViewer::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>)
at ./obj-aarch64-linux-gnu/kstars/KStarsLib_autogen/GB6ZSSQLTO/moc_fitsviewer.cpp:251
#19 0x0000007fb5f5117c in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/aarch64-linux-gnu/libQt5Core.so.5
#20 0x0000007fb68f6ec8 in QAction::triggered(bool) () at /usr/lib/aarch64-linux-gnu/libQt5Widgets.so.5
#21 0x0000007fb68f990c in QAction::activate(QAction::ActionEvent) () at /usr/lib/aarch64-linux-gnu/libQt5Widgets.so.5
Please Log in or Create an account to join the conversation.
stellarmate@stellarmate:~$ gdb kstars
GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
Copyright (C) 2018 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 "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from kstars...Reading symbols from /usr/lib/debug/.build-id/05/4c30d4c3320dea2f9858f5402d028749695ab0.debug...done.
done.
(gdb) run
Starting program: /usr/bin/kstars
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ff0a29080 (LWP 16156)]
[New Thread 0x7febbd5080 (LWP 16157)]
org.kde.kstars: Welcome to KStars 3.3.8
org.kde.kstars: Build: 2019-11-20T17:32:01Z
org.kde.kstars: OS: "neon"
org.kde.kstars: API: "arm64-little_endian-lp64"
org.kde.kstars: Arch: "arm64"
org.kde.kstars: Kernel Type: "linux"
org.kde.kstars: Kernel Version: "4.19.81-v8-20"
org.kde.kstars: Qt Version: 5.9.5
[New Thread 0x7fe8971080 (LWP 16159)]
[New Thread 0x7fe0567080 (LWP 16160)]
[New Thread 0x7fdfd66080 (LWP 16161)]
org.kde.kstars: Processing "unnamedstars.dat" , HTMesh Level 3
org.kde.kstars: Sky Mesh Size: 512
org.kde.kstars: Loaded DSO catalog file: "unnamedstars.dat"
org.kde.kstars: "Star HD20,794 not found."
org.kde.kstars: "Star HD98,230 not found."
File opened: "/usr/share/kstars/ngcic.dat"
org.kde.kstars: Loading NGC/IC objects
File opened: "/home/stellarmate/.local/share/kstars/comets.dat"
org.kde.kstars: "Object named NGC 6050A not found"
[New Thread 0x7fdf565080 (LWP 16163)]
glibc >= 2.1 detected. Using GNU extension sincos()
[New Thread 0x7fde29a080 (LWP 16165)]
[New Thread 0x7fdda99080 (LWP 16166)]
[New Thread 0x7fdc9a1080 (LWP 16167)]
[New Thread 0x7fbffff080 (LWP 16168)]
[New Thread 0x7fbf7fe080 (LWP 16169)]
[New Thread 0x7fbeffd080 (LWP 16172)]
File opened: "/home/stellarmate/.local/share/kstars/comets.dat"
[Thread 0x7fbeffd080 (LWP 16172) exited]
File opened: "/home/stellarmate/.local/share/kstars/asteroids.dat"
[Thread 0x7fde29a080 (LWP 16165) exited]
[Thread 0x7fdda99080 (LWP 16166) exited]
[Thread 0x7fbffff080 (LWP 16168) exited]
org.kde.kstars.fits: Loading FITS file "/home/stellarmate/Pictures/NGC 7635_Light_120_secs_2019-10-29T22-03-07_114.fits"
double free or corruption (!prev)
Thread 1 "kstars" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x0000007ff50b38b4 in __GI_abort () at abort.c:79
#2 0x0000007ff50ec65c in __libc_message (action=action@entry=do_abort,
fmt=fmt@entry=0x7ff51adb88 "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#3 0x0000007ff50f29c4 in malloc_printerr (
str=str@entry=0x7ff51a9878 "double free or corruption (!prev)") at malloc.c:5350
#4 0x0000007ff50f45e8 in _int_free (av=0x7ff51d3a70 <main_arena>, p=0x555b70cad0,
have_lock=<optimized out>) at malloc.c:4281
#5 0x00000055558fc73c in __gnu_cxx::new_allocator<unsigned short>::deallocate (
this=<synthetic pointer>, __p=<optimized out>)
at /usr/include/c++/7/ext/new_allocator.h:125
#6 std::allocator_traits<std::allocator<unsigned short> >::deallocate (
__a=<synthetic pointer>..., __n=<optimized out>, __p=<optimized out>)
at /usr/include/c++/7/bits/alloc_traits.h:462
#7 std::_Vector_base<unsigned short, std::allocator<unsigned short> >::_M_deallocate (
this=<synthetic pointer>, __n=<optimized out>, __p=<optimized out>)
at /usr/include/c++/7/bits/stl_vector.h:180
#8 std::_Vector_base<unsigned short, std::allocator<unsigned short> >::~_Vector_base (
this=<synthetic pointer>, __in_chrg=<optimized out>)
at /usr/include/c++/7/bits/stl_vector.h:162
#9 std::vector<unsigned short, std::allocator<unsigned short> >::~vector (
this=<synthetic pointer>, __in_chrg=<optimized out>)
at /usr/include/c++/7/bits/stl_vector.h:435
#10 (anonymous namespace)::median<unsigned short> (sampleBy=<optimized out>,
size=45441024, values=0x3f80000000000000, this=<optimized out>,
this=<optimized out>) at ./kstars/fitsviewer/stretch.cpp:35
#11 (anonymous namespace)::computeParamsOneChannel<unsigned short> (
width=<optimized out>, height=<optimized out>, inputRange=127,
---Type <return> to continue, or q <return> to quit---
buffer=0x3f80000000000000, this=<optimized out>, this=<optimized out>) at ./kstars/fitsviewer/stretch.cpp:219
#12 Stretch::computeParams (this=this@entry=0x7fffffd888,
input=0x7f8a149010 "#\004E\004E\004,\004,\004o\005o\005\307\004\307\004\206\004\206\004f\004f\004i\005i\005\206\004\206\004\264\004\264\004f\004f\004R\005R\005m\005m\005u\004u\004\302\004\302\004\212\005\212\005\376\003\376\003\024\004\024\004I\004I\004\066\004\066\004\353\003\353\003\003\004\003\004Q\005Q\005r\005r\005r\005r\005\360\004\360\004\337\003\337\003\222\004\222\004\374\005\374\005\264\005\264\005\275\004\275\004\b\004\b\004\243\004\243\004\374\003\374\003\344\004\344\004\330\004\330\004\351\004\351\004\316\004\316\004\215\004\215\004\311\004\311\004\344\003\344\003\r\005\r\005G\006G\006I\004I\004\240\005\240\005p\004p\004\376\003\376\003\206\005\206\005\325\004\325\004\240\004\240\004;\004"...) at ./kstars/fitsviewer/stretch.cpp:378
#13 0x00000055557b1768 in (anonymous namespace)::doStretch (data=0x5558536a20, outputImage=outputImage@entry=0x55585f1958,
stretchOn=<optimized out>) at ./kstars/fitsviewer/fitsview.cpp:56
#14 0x00000055557b99e4 in FITSView::rescale<unsigned short> (this=this@entry=0x55585f1870, type=type@entry=ZOOM_KEEP_LEVEL)
at ./kstars/fitsviewer/fitsview.cpp:423
#15 0x00000055557bb3f0 in FITSView::rescale (this=this@entry=0x55585f1870, type=type@entry=ZOOM_KEEP_LEVEL)
at ./kstars/fitsviewer/fitsview.cpp:340
#16 0x00000055557bb518 in FITSView::toggleStretch (this=0x55585f1870) at ./kstars/fitsviewer/fitsview.cpp:1218
#17 0x00000055558f3ad4 in FITSViewer::toggleStretch (this=0x55585f90f0) at ./kstars/fitsviewer/fitsviewer.cpp:1003
#18 0x00000055558457e4 in FITSViewer::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>,
_a=<optimized out>) at ./obj-aarch64-linux-gnu/kstars/KStarsLib_autogen/GB6ZSSQLTO/moc_fitsviewer.cpp:251
#19 0x0000007ff5d89c64 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/aarch64-linux-gnu/libQt5Core.so.5
#20 0x0000007ff67b54e0 in QAction::triggered(bool) () from /usr/lib/aarch64-linux-gnu/libQt5Widgets.so.5
#21 0x0000007ff67b7e9c in QAction::activate(QAction::ActionEvent) () from /usr/lib/aarch64-linux-gnu/libQt5Widgets.so.5
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.