Frequent crashes of CQRLOG

19 posts / 0 new
Last post
PG4I
PG4I's picture
Frequent crashes of CQRLOG

CQRLOG crashes almost every time it is started. I have started cqrlog with --debug=1. It seems the program crashes after receiving info from DK0WCY. Any help would be appreciated. This is what I get:

$ /usr/bin/cqrlog --debug=1
Gtk-Message: 06:16:49.822: Failed to load module "gail"
Gtk-Message: 06:16:49.822: Failed to load module "atk-bridge"

Cqrlog Ver:2.4.0 (001) Date:2019-10-27
**** DEBUG LEVEL 1 ****

OS:
Linux version 4.19.0-8-amd64 (debian-kernel@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.98-1 (2020-01-26)
SSL libraries:
libssl.so
libcrypto.so
Loaded 134350 LoTW users
Loaded 125829 eQSL users
Loaded 36919 SCP calls
/home/pg4i/.config/cqrlog/database/shackpc.pid
p.Executable: kill Parameters: 4357

*
User home directory: /home/pg4i/
Program home directory: /home/pg4i/.config/cqrlog/
Data directory: /home/pg4i/.config/cqrlog/database/
Memebers directory: /home/pg4i/.config/cqrlog/members/
ZIP code directory: /usr/share/cqrlog/zipcodes/
Binary dir: /usr/bin/
Share dir: /usr/share/cqrlog/
*
56 us states loaded
Grid map created
/usr/bin/mysqld
MySQLProcess.Executable: /usr/sbin/mysqld Parameters: --defaults-file=/home/pg4i/.config/cqrlog/database/mysql.cnf
--datadir=/home/pg4i/.config/cqrlog/database/
--socket=/home/pg4i/.config/cqrlog/database/sock
--port=64000

Trying to connect to database
2020-04-01 6:16:56 0 [Note] /usr/sbin/mysqld (mysqld 10.3.22-MariaDB-0+deb10u1) starting as process 4478 ...
TMySQL57Connection : Server connect failed.
Trying:1
select * from tables where table_schema = 'cqrlog_common'

SELECT log_nr,log_name FROM cqrlog_common.log_list order by log_nr

use cqrlog001

use cqrlog001

use cqrlog001

use cqrlog001

use cqrlog001

SELECT * FROM cqrlog_config

select * from db_version

[UpgradeMainDatabase] Old version: 16 cDB_MAIN_VER: 16
select * from cqrlog_common.db_version

SELECT * FROM cqrlog_common.dxcc_ref ORDER BY ADIF

SELECT * FROM cqrlog_common.dxcc_ref ORDER BY ADIF

Settings:
-----------------------------------------------------
RigCtldPath:/usr/bin/rigctld
RigCtldArgs:-m 2 -r -t 4532
RunRigCtld: FALSE
RigDevice:
RigCtldPort:4532
RigCtldHost:localhost
RigPoll: 500
RigSendCWR: FALSE
RigId: 2

rigctld started!
Connected to localhost:4532

Settings:
-----------------------------------------------------
RotCtldPath:/usr/bin/rotctld
RotCtldArgs:
RunRotCtld: FALSE
RotDevice:
RotCtldPort:4533
RotCtldHost:localhost
RotPoll: 500
RotId: 1

rotctld started!
Connected to localhost:4533
FreqmemSql:select id,freq,mode,bandwidth,info from freqmem order by id

FreqmemNR:0=27
FreqmemNR:1=28
FreqmemNR:2=29
FreqmemNR:3=30
FreqmemNR:4=31
FreqmemNR:5=32
FreqmemNR:6=33
FreqmemNR:7=34
FreqmemNR:8=35
FreqmemNR:9=36
FreqmemNR:10=37
FreqmemNR:11=38
FreqmemNR:12=39
FreqmemNR:13=40
FreqmemFirst:27 FreqmemLast:40
Sending: fmv

CW init
Device: /dev/ttyUSB1
Last error nr: 0
Last error desc:OK
After sending null command
After sending echo command: 20
Firmware version: 23
Speed: 0
Speed: 25
TMP:

table { margin-left:40px; border-style:none; border-spacing:0px; padding:0px; border-collapse:collapse }
th { text-align:left; font-size:16px; font-family:Verdana,Arial,Helvetica,sans-serif; font-variant:small-caps;margin-bottom:24px; background-color:#d0d8e8 }
td { font-family:Verdana,Arial,Helvetica,sans-serif; font-size:14px }
.header { margin-top:30px; margin-bottom:4px }
.footer { margin-top:30px }
.footer td { padding-left:110px; margin-bottom: 0px; font-size:11px }

DK0WCY Magnetogram

Indices of 31 Mar 
Current Geomagnetic Field 
Forecast 

Boulder A 14
Kiel 3-hour k 3
Solar Activity quiet

Kiel A 18
Kiel current k 2.97
Geomagnetic Fieldactive

Sunspot Number 12
Aurora no
  

Solar Flux 70
  
  

Erl�uterungen zum Magnetogramm
Notes on the magnetogram

Informationen zur neuen Magnetogramm Darstellung
About the new magnetogram display

Fragen? Senden Sie eine E-Mail an dk0wcy@darc.de
Questions? Contact us at dk0wcy@darc.de

Diese Seite wird alle 5 Minuten von Ihrem Browser neu geladen.
Your browser will reload this page every 5 minutes.

Time: Indices of 31 Mar
UTC: 06:17:00
Boulder A:14
Solar Act:quiet
Kiel A:18
Kiel K: 2.97
Kiel 3h 3
GF: active
SSN: 12
Aurora: no
SFI: 70
munmap_chunk(): invalid pointer
Aborted

PG4I
PG4I's picture
I have disabled the DK0WCY

I have disabled the DK0WCY window, but crashes still occur, here is the last bit:

CW init
Device: /dev/ttyUSB1
Last error nr: 0
Last error desc:OK
After sending null command
After sending echo command: 20
Firmware version: 23
Speed: 0
Speed: 25
munmap_chunk(): invalid pointer
Aborted

How can I debug this? Thanks!

oh1kh
I have disabled the DK0WCY

HI !

Do you have GTK2 installed?
Some distros offer now only gtk3 as default. gtk2 must be installed separately.

That looks like glibc / gtk problem that has something to do with used memory release.
(found lot of hits with Google)

You can also try alpha test version if you like. But read the README then first!
There you have also change to try QT5 version (see the QT5 part of README).
https://github.com/OH1KH/cqrlog/tree/loc_testing/compiled

--
Saku
OH1KH

PG4I
PG4I's picture
Hello Saku,

Hello Saku,

yes gtk2 is installed, I compiled cqrlog from source. I still have random crashed and also popups with "Access violation". After 3-4 tries CQRLOG will eventually start.

Will installing the QT5 version help me?

Joop PG4I

oh1kh
Frequent crashes of CQRLOG

HI Joop!

I can not say. But it is easy to test. Just backup first your logs, then compile new compilation with QT5 enabled.
You may need to install qt5pas library first.

Either with Lazarus-IDE:
Project/settings for project (Ctrl+Shift+F11)
Compiler /additional settings/set widget type/qt5
Then run/clean and build

Or change "Makefile" --ws=gtk2 to --ws=qt5 (I have not used this, but I think it works this way)
Then make clean && make && make install

--
Saku
OH1KH

PG4I
PG4I's picture
Hello, I am sorry saku but it

Hello, I am sorry saku but it does not compile with qt5. I have grabbed the latest source code from git at https://github.com/ok2cqr/cqrlog.git (is this the correct source) and changed the makefile. I get:

...
(3104) Compiling uScrollBars.pas
/home/pg4i/Projects/cqrlog/src/cqrlog.lpr(6,3) Fatal: (10022) Can't find unit Interfaces used by cqrlog
Fatal: (1018) Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
Error: (lazarus) Compile Project, Target: cqrlog: stopped with exit code 1
Error: (lazbuild) failed compiling of project /home/pg4i/Projects/cqrlog/src/cqrlog.lpi

oh1kh
compile with qt5

HI !

Best to try it with Lazarus-GUI.
Did you install qt5pas library first?

Then open Lazarus-GUI and load cqrlog.lpi. Then open top menu Project/Project options/Additions and Overrides/Set LCL widget type /Value QT5/OK
From top menu View/Messages
After that from top menu Run/Clean up and build/Clean up and build
When it reports error press button Skip errors

Finally you should get green line in messages window and then you find the compiled binary file from "src" directory.

--
Saku
OH1KH

PG4I
PG4I's picture
Hello, yes I have installed

Hello, yes I have installed libqt5pas-dev and libqt5pas1. On debian it is version 2.6beta.

Okay my mistake, together with QT5 the GTK2 target should also be enabled in lazarus. It now compiles okay! I will do some tests and get back to you. First I must make backups...

PG4I
PG4I's picture
This version is equally

This version is equally unstable. I have popups with 'Acces violation' and frequent crashes. I tried to run cqrlog through gdb.

(gdb) run
Starting program: /home/pg4i/Projects/cqrlog/src/cqrlog
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Cqrlog Ver:2.4.0 (001) Date:2019-11-09
**** DEBUG LEVEL 0 ****
**** CHANGE WITH --debug=1 PARAMETER ****

OS:
[Detaching after fork from child process 5456]
Linux version 4.19.0-8-amd64 (debian-kernel@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.98-1 (2020-01-26)
[New Thread 0x7ffff3c5f700 (LWP 5457)]
[New Thread 0x7ffff385e700 (LWP 5458)]
/home/pg4i/Projects/cqrlog/src/mysqld
[Detaching after fork from child process 5459]
2020-04-13 11:33:15 0 [Note] /usr/sbin/mysqld (mysqld 10.3.22-MariaDB-0+deb10u1) starting as process 5459 ...
[New Thread 0x7ffff3046700 (LWP 5498)]
[New Thread 0x7ffff2c45700 (LWP 5499)]

Thread 1 "cqrlog" received signal SIGSEGV, Segmentation fault.
0x00007ffff74b09ef in __GI___libc_free (mem=) at malloc.c:3115
3115 malloc.c: No such file or directory.
(gdb) cont
Continuing.
[Thread 0x7ffff2c45700 (LWP 5499) exited]
[Thread 0x7ffff3046700 (LWP 5498) exited]
[New Thread 0x7ffff27cc700 (LWP 5508)]
[New Thread 0x7ffff1fcb700 (LWP 5509)]

Thread 1 "cqrlog" received signal SIGSEGV, Segmentation fault.
0x000000000046ca08 in ?? ()
(gdb)

PG4I
PG4I's picture
I am thinking about a

I am thinking about a solution. Only one of my logs has this problem. It is the main log with nearly 6400 QSO's. All of the other logs have no problem when loading! They have around 1000 QSO's. The smaller logs also have less windows open...

So I want to delete the main log from the database and then restore it from the backup adif file. Hopefully this will fix it. Would this be a good idea?

oh1kh
want to delete the main l

HI!

Make copy of ~./.config/cqrlog folder with files and subfolders. just in case. Then you can make full adif backup from main log and delete it.
Or from all logs and delete whole ~./.config/cqrlog an start as "first run" then import all logs via adif.
In that case it is worth of taking copy also from log settings (open database/utils/export-import). Note that you can not import settings to open log. It must be done before opening the log. Otherwise it may not take effect.

--
Saku
OH1KH

PG4I
PG4I's picture
Okay Saku, I have done a

Okay Saku, I have done a different approach. I have created a new log and improrted all of the QSO's from the main log into it. Now CQRLOG has become stable again.

However, tracking of awards does not work anymore. I have setup award tracking the same as in the old log with the same membership lists. All of the award fields have been imported correctly, as I can see them in the award field. But every time a type in a callsign in the callsign field, cqrlog thinks it is a new member...

Do you know how to fix this?

oh1kh
tracking of awards

Hi!

I am not played with that, but it seems that table cqrlog_main at database holds information of every qso and it's relations to clubs 1-5.

ADIF export does not transfer that data, so that is why the new log does not know anything about clubs.

First thing is to make save copy from your ~/.config/cqrlog folder, if you have not done that already.
(and you still have the original log there).

When it is in save place you can start to fix.
Have you run open database/utils/repair database when that faulty log is selected? Any help from that?

If not then you must use mysql commands to dig out all callsign records that have something in their club_nr1- club_nr5 columns from old log.
When found and listed you have to make sql command list using that digged information so that you can alter those club_nr columns in your new log.

I have never done this kind of job, so I do not have ready made commands for it.
Perhaps someone has easier way to fix this, but I would do it that way with sql console and text editor.

--
Saku
OH1KH

PG4I
PG4I's picture
Thank you Saku,

Thank you Saku,

No, repair database did not fix the unstable log.

I was suspecting this is the way it works, since ADIF import contains all the info but the new log thinks all award QSO's are new. Thanks for the suggestion... If I cannot fix it I will have to without awards tracking from now on I guess.

oh1kh
tracking of awards

Hi!

I made dome testing here. There is a glue for you to do the job.
Start cqrlog (so that database engine starts, if you have "save to log to local machine").

Open command line and give:

mysql --socket=/home/saku/.config/cqrlog/database/sock -Be "select qsodate,time_on,callsign,club_nr1,club_nr2,club_nr3,club_nr4,club_nr5 from cqrlog_main where club_nr5<>'' or club_nr4<>'' or club_nr3<>'' or club_nr2<>'' or club_nr1<>'' " cqrlog004

Replace "saku" as your username and cqrlog004 to your old broken log's number.

You should get a list like:

qsodate time_on callsign club_nr1 club_nr2 club_nr3 club_nr4 club_nr5
2020-04-15 13:27 G0PNM 1962
2020-04-15 13:27 DL4PU 167

If that looks good go on.

You should do separate list for every club_nr.
It makes next step easier.

so first do the lists (change my username to yours in paths below):

mysql --socket=/home/saku/.config/cqrlog/database/sock -Bse "select qsodate,time_on,callsign,club_nr1 from cqrlog_main where club_nr1<>'' " cqrlogXXX > /tmp/listX.txt

Do the same 5 times if needed by change of "club_nrX" and same for /tmp/listX.txt (X = 1 - 5) and of course cqrlogXXX to point your OLD log.

Now you have 1 - 5 lists.

then run this (also 5 times with same changes if needed):
cat /tmp/listX.txt | awk '{print "mysql --socket=/home/saku/.config/cqrlog/database/sock -Bse \x22update cqrlog_main set club_nrX=\x27"$4"\x27 where qsodate=\x27"$1"\x27 and time_on=\x27"$2"\x27 and callsign=\x27"$3"\x27\x22 cqrlogXXX "}' > /tmp/cmdX.sh

replace cqrlogXXX with the number of your NEW log file number and change "tmp/listX.txt, "club_nrX" and for /tmp/cmdX.txt same. (X = 1 - 5)

This will make /tmp/cmdX.sh (1-5) for you.

Check those contents with editor and if they look ok make them executable:
chmod a+x /tmp/cmdX.sh (1-5)

Then start them one by one:
/tmp/cmdX.sh (1-5)

I hope I did not make many typing errors.

--
Saku
OH1KH

PG4I
PG4I's picture
This looks promising Saku but

This looks promising Saku but only QSO's of the last 2 months are shown. The log goes back nearly 16 months... What could be wrong?

oh1kh
This looks promising

Hi!

You mean when you do club_nr list from the old broken log?
Or that you can see only partially log (old or new) in "QSO list"?

This command should show how many qso records are in log:

mysql --socket=/home/saku/.config/cqrlog/database/sock -Be "select count(id_cqrlog_main) from cqrlog_main" cqrlog004

Again change "saku" and "cqrlog004" for your needs.

--
Saku
OH1KH

PG4I
PG4I's picture
I think I know what is going

I think I know what is going on, see comment at the end!

QSO's in the broken log:

$ mysql --socket=/home/pg4i/.config/cqrlog/database/sock -Be "select count(id_cqrlog_main) from cqrlog_main" cqrlog001
count(id_cqrlog_main)
6396

Members of club1, only 2 months shown:
$ mysql --socket=/home/pg4i/.config/cqrlog/database/sock -Bse "select qsodate,time_on,callsign,club_nr1 from cqrlog_main where club_nr1<>'' " cqrlog001
2020-03-24 19:27 F6HKA 1088
2020-04-12 12:44 F6HKA 1088
2020-03-28 12:40 N4FP 1090
2020-03-23 15:47 FG8NY 1091
2020-03-29 05:45 ZL2AIM 1174
2020-04-08 06:25 ZS6RI 1236
2020-04-07 10:37 SE5L 1237
2020-03-26 19:33 K2MF 1253
2020-04-07 10:34 GU4CHY 1543
2020-03-28 19:35 DJ1YFK 1566
2020-03-28 17:42 K9QVB 159
2020-04-07 10:35 G3TXF 166
2020-04-07 10:39 DL6KVA 1678
2020-03-28 12:46 TZ4AM 1716
2020-03-29 06:42 TZ4AM 1716
2020-03-28 13:03 4Z4DX 175
2020-04-11 12:31 K3WW 178
2020-03-28 12:15 RM2D 1820
2020-04-07 18:05 GD0OUD 1829
2020-04-01 14:53 VK3CWB 1895
2020-03-08 19:37 GM0EPO 1974
2020-04-04 13:00 SV2BBK 1976
2020-03-30 17:41 N1FG 2012
2020-03-22 18:42 MI0WWB 2081
2020-04-02 19:40 MI0WWB 2081
2020-04-07 10:40 SD6F 2163
2020-03-10 16:00 YL3JD 2227
2020-03-13 18:37 YL3JD 2227
2020-03-19 06:03 YL3JD 2227
2020-03-22 19:54 YL3JD 2227
2020-03-26 13:10 YL3JD 2227
2020-03-31 17:45 YL3JD 2227
2020-04-05 18:07 YL3JD 2227
2020-03-24 19:40 W4FOA 229
2020-04-06 16:57 W5ZR 23
2020-03-28 18:09 NR3Z 2322
2020-04-07 12:04 MI0VKO 2445
2020-03-28 17:53 PA7RA 284
2020-03-28 12:48 N0AV 359
2020-03-03 15:22 E71A 484
2020-03-30 17:51 K3MD 750
2020-03-28 12:31 K4BAI 76
2020-03-30 17:33 N1GKE 929

So, in the beginning of march I switched from a laptop to a PC in the shack and transferred my logs by importing all of the ADIF backup files into my PC. This is where the award tracking stopped working. If I had known, I would have transferred the databases and not the ADIF files...

Thanks for your help so far, I now know a lot more about CQRLOG!

73 de Jo PG4I

oh1kh
Cloning cqrlog

HI Jo !

Okay!
Yes. If you want to clone cqrlog to other computer full ADIF export is not enough.

If you have used "save log data to local machine" cloning is very easy.
Just copy your ~/.config/cqrlog with all files and folders (command console: cp -a ) to another computer after you have installed cqrlog, but not started it yet.
If started already you must first delete newly created ~/.config/cqrlog and then copy one from old computer.

If you use external sql server for logs you can do the same to get settings copied, but your logs are on external server and if you cannot access them with new computer you have to do mysqldump from log databases to move it also to another place.

--
Saku
OH1KH