NextPVR Forums

Full Version: No device listed -- error saving capture source: SQLite Error 1: 'no such column: −1'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
Thanks for the explanation.

Here's the new logs
Are you allowing UDP that is required for SAT>IP as it is taking a long time to fail.

Martin
Afraid I don't know what "SAT>IP" is. Where should I allow UDP? I'm honestly not aware that I'm trying to do any network bound operations (or when I'm doing it) nor where this potential communication is bound, so I don't know what is reasonable to do in that regard.
Originally you said you weren't assigning an IP so I thought you might be limiting networking on your laptop with firewalls or VPN etc. I am grasping for a reason for this.

Martin
I'm not really limiting anything on it. Sometimes it has wifi disabled (which the ubuntu designers can't seem to differentiate from "airplane mode" for some reason...) other times enabled. Internet access is sporadic, whenever I decide to share the connection from my phone. An ordinary laptop.

I've never associated local device discovery with network access, and I'm still not sure what significance this would have for my use case though.

Sometimes network calls might take some time to fail, because there's an assigned default route that isn't reachable. Disabling wifi gets rid of that problem without having to reconfigure the local DHCP server every time I want to share/stop sharing internet to the local network...
There are 2 discovery threads overlapping I am thinking one might be locking the database. I am not thinking that Internet access is required, LAN only so if the route is an issue that could be it.

Martin
I don't think it's related to that.

I wonder if it's picking up a different version of the sqlite library or something
Here is the bit of code that is failing, somewhere inside the SQLite .ExecuteNonQuery() call.

Code:
// insert or update
                if (oid == 0)
                {
                    DbCommand command = databaseHelper.CreateCommand(connection, "insert into CAPTURE_SOURCE (name, recorder_plugin_class, present, enabled, priority) values (@name, '" + recorderClass + "', 'Y', 'Y', " + priority + ")");
                    command.Parameters.Add(databaseHelper.GetDatabaseParameter("@name", System.Data.DbType.String));
                    command.Parameters[0].Value = name;
                    command.Parameters[0].DbType = System.Data.DbType.String;
                    command.ExecuteNonQuery();

                    // find newly allocated oid
                    oid = Convert.ToInt32(databaseHelper.GetNewIdentity(connection));
                }
                else
                {
                    string presentText = "N";
                    if (present)
                        presentText = "Y";

                    string enabledText = "N";
                    if (enabled)
                        enabledText = "Y";

                    DbCommand command = databaseHelper.CreateCommand(connection, "update CAPTURE_SOURCE set name=@name, recorder_plugin_class='" + recorderClass + "', enabled='" + enabledText + "', present='" + presentText + "', priority=" + priority + " where oid = " + oid);
                    command.Parameters.Add(databaseHelper.GetDatabaseParameter("@name", System.Data.DbType.String));
                    command.Parameters[0].Value = name;
                    command.Parameters[0].DbType = System.Data.DbType.String;
                    command.ExecuteNonQuery();
                }
It's had LAN and internet access practically every test I've done in this thread, since I read and copy instructions beforehand, and reply and upload logs on the machine itself immediately afterwards.

> I am not thinking that Internet access is required, LAN only so if the route is an issue that could be it.

I'll have to take your word for it. To me the default route is only relevant for arbitrary internet access, so either both the default route and internet access matter or they both don't. I also cannot imagine what it would be insisting on connecting to on an unknown LAN to the extent that it would sacrifice the use of its own db.

Anyway, no amount of lan/internet access has made any difference so far.
While the query building code looks straightforward, even if I dusted off my sql knowledge to the extent where I wouldn't embarass myself (why is recorderClass quoted but not priority?), and read up on c# and the libraries used, I think I'd still be lost without knowing the types of the variables ("databaseHelper", "oid", "priority") and how the values were generated.

If in fact GetOrdinal is generating the offending column index that's being used (that's what I gathered from your description), then shouldn't the calls to it be a critical part of the code to be examined? I can't spot any calls to it at least.

As you can see I'm not of much use. I'll leave it to those with more c# experience and code access. And even then it usually turns out to be something trivial... I'm guessing that since the server starts that at least my .net is working.
Pages: 1 2 3 4 5