"Mark all messages as read" causes critical error #1081

Closed
opened 2017-11-28 20:10:35 +01:00 by g1itch · 7 comments
g1itch commented 2017-11-28 20:10:35 +01:00 (Migrated from github.com)

Hello!

I have 346 messages in [chan] bitmessage shown as unread. When I select "Mark all messages as read" context menu this causes PyBitmessage crash with many unicode characters dumped into console and finally the following messages:

Here is the actual error message thrown by the sqlThread: too many SQL variables
CRITICAL - This program shall now abruptly exit!

So I probably have SQLITE_MAX_VARIABLE_NUMBER < 999 in my system, but it seams there is no easy way to check the exact value.

The source

Hello! I have 346 messages in `[chan] bitmessage` shown as unread. When I select "Mark all messages as read" context menu this causes PyBitmessage crash with many unicode characters dumped into console and finally the following messages: > Here is the actual error message thrown by the sqlThread: too many SQL variables CRITICAL - This program shall now abruptly exit! So I probably have [SQLITE_MAX_VARIABLE_NUMBER](https://www.sqlite.org/limits.html#max_variable_number) < 999 in my system, but it seams there is no easy way to check the exact value. [The source](../blob/v0.6/src/bitmessageqt/__init__.py#L2536)
PeterSurda commented 2017-11-28 20:48:46 +01:00 (Migrated from github.com)

Thanks. I thought I fixed that. I think I should create a new function over sqlExecute which would handle this limit.

Thanks. I thought I fixed that. I think I should create a new function over sqlExecute which would handle this limit.
reelsense commented 2017-11-28 21:05:50 +01:00 (Migrated from github.com)

What version are you using @g1itch ?

What version are you using @g1itch ?
g1itch commented 2017-11-28 21:08:22 +01:00 (Migrated from github.com)

Latest PyBitmessage commit, Python 2.7.12, sqlite 3.19.3

Latest PyBitmessage commit, Python 2.7.12, sqlite 3.19.3
g1itch commented 2017-11-29 23:57:30 +01:00 (Migrated from github.com)

Hmm, I don't understand this:
if i % 999 == 999:

It seems to be always False

Hmm, I don't understand this: `if i % 999 == 999:` It seems to be always False
PeterSurda commented 2017-11-30 02:16:13 +01:00 (Migrated from github.com)

good catch.

good catch.
PeterSurda commented 2017-11-30 20:01:24 +01:00 (Migrated from github.com)

So I wrote a helper for this type of query (column in (x, x, x, x.....)) but have to test it.

So I wrote a helper for this type of query (column in (x, x, x, x.....)) but have to test it.
PeterSurda commented 2018-01-30 17:49:12 +01:00 (Migrated from github.com)

Fixed in 80fdb08f03

Fixed in 80fdb08f0369a86e4e65b740c0457b467fdff416
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Bitmessage/PyBitmessage-2024-12-06#1081
No description provided.