Opened 12 months ago

Closed 12 months ago

#13370 closed Patch - Bug Fix (fixed)

DVB channelscan gives DB Error (MSqlQuery)

Reported by: Klaas de Waal Owned by: Stuart Auchterlonie
Priority: minor Milestone: 30.0
Component: MythTV - General Version: Master Head
Severity: low Keywords: DVB channelscan
Cc: Stuart Auchterlonie, gigem Ticket locked: no

Description

A channelscan with mythtv-setup of my DVB-C signal gives a "DB Error (MSqlQuery):" for each channel found.
A complete error message for one channel:

DB Error (MSqlQuery):
Query was:
INSERT INTO channelscan_channel  (  scanid,             transportid,                                mplex_id,           source_id,          channel_id,             callsign,           service_name,       chan_num,               service_id,         atsc_major_channel, atsc_minor_channel,     use_on_air_guide,   hidden,             hidden_in_guide,        freqid,             icon,               tvformat,               xmltvid,            pat_tsid,           vct_tsid,               vct_chan_tsid,      sdt_tsid,           orig_netid,             netid,              si_standard,        in_channels_conf,       in_pat,             in_pmt,             in_vct,                 in_nit,             in_sdt,             is_encrypted,           is_data_service,    is_audio_service,   is_opencable,           could_be_opencable, decryption_status,  default_authority    )  VALUES  ( ?,            ?,                               ?,          ?,         ?,            ?,          ?,      ?,              ?,        ?,?,    ?,  ?,            ?,       ?,            ?,              ?,              ?,           ?,          ?,              ?,     ?,          ?,            ?,             ?,       ?,      ?,            ?,            ?,                ?,            ?,            ?,          ?,   ?,  ?,          ?,?, ?    );
Bindings were:
:ATSC_MAJOR_CHANNEL=0, :ATSC_MINOR_CHANNEL=0, :CALLSIGN="Nicktoons",
:CHANNEL_ID=0, :CHAN_NUM="303", :COULD_BE_OPENCABLE=false, :DECRYPTION_STATUS=2,
:DEFAULT_AUTHORITY="", :FREQID=NULL, :HIDDEN=false, :HIDDEN_IN_GUIDE=false,
:ICON="", :IN_CHANNELS_CONF=false, :IN_NIT=true, :IN_PAT=true, :IN_PMT=true,
:IN_SDT=true, :IN_VCT=false, :IS_AUDIO_SERVICE=false, :IS_DATA_SERVICE=false,
:IS_ENCRYPTED=true, :IS_OPEBCABLE=false, :MPLEX_ID=66, :NETID=5555,
:ORIG_NETID=1536, :PAT_TSID=
2019-01-02 22:00:12.171720 E  Original query failed, but resend with empty strings in place of NULL strings worked.

The last line of the message indicates that a NULL value is the problem; the message also shows that FREQID is NULL.
A fair bit of research shows that the null value for freqid originates in channelscan_sm.cpp, line 1210.
The solution is to change the value for freqid from QString() to QString(""). This is attached as a patch.
Test done with today's master, on Fedora 29, DVB-C signal from Ziggo.

Attachments (1)

20190102-freqid-not-null.patch (695 bytes) - added by Klaas de Waal 12 months ago.

Download all attachments as: .zip

Change History (3)

Changed 12 months ago by Klaas de Waal

comment:1 Changed 12 months ago by Stuart Auchterlonie

Milestone: needs_triage30.0
Owner: set to Stuart Auchterlonie
Status: newaccepted

comment:2 Changed 12 months ago by Klaas de Waal <klaas.de.waal@…>

Resolution: fixed
Status: acceptedclosed

In 8a4b97897/mythtv:

Fixes #13370 - Use an empty string rather than a NULL string

Signed-off-by: Stuart Auchterlonie <stuarta@…>

Note: See TracTickets for help on using tickets.