Forum > General

TSQLQuery: ServerFilter causes Access Violation

(1/2) > >>

Milsa:
I have database application for work organization.

I set filter to (this show Lazarus during debugging):

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Filter = ANSISTRING($0C0E5F44)^: 'tor.partner_id = 10 AND done = 0'
It is ok, filter works.

But I add to filter new condition:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Filter = ANSISTRING($0C07C23C)^: 'tor.partner_id = 10 AND tor.product_id = 114 AND done = 0'
It doesn't matter in which order I add the conditions, it always crashes if there are 3.

Order is set to:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---SELECT  tor.*,  tpr.name AS partner_name,  tp.name AS product_name,  SUM(tpw.hours) AS tpw_sum_hoursFROM [order] torINNER JOIN [partner] tpr ON tpr.id = tor.partner_id AND tpr.hide = 0INNER JOIN [product] tp ON tp.id = tor.product_id AND tp.hide = 0LEFT JOIN [product_work] tpw ON tpw.product_id = tp.id AND tpw.hide = 0WHERE tor.hide = 0 AND tor.done = 0 AND tor.burden = 1GROUP BY tor.idORDER BY serial;
Today I try newest version of Lazarus (3.4). The problem persists.

Milsa:
Application crashes in line 2441.

Milsa:
This is structure of my tables:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---CREATE TABLE [order] (    id            INTEGER   PRIMARY KEY AUTOINCREMENT                            NOT NULL,    serial        TEXT (20) NOT NULL                            UNIQUE,    partner_id    INTEGER   NOT NULL                            REFERENCES partner (id),    product_id    INTEGER   NOT NULL                            REFERENCES product (id),    description   TEXT,    priority      INTEGER   NOT NULL,    date_finished DATE,    color         INTEGER   DEFAULT (0)                             NOT NULL,    done          INTEGER   DEFAULT (0)                             NOT NULL,    overtime      INTEGER   DEFAULT (0)                             NOT NULL,    noinsert      INTEGER   NOT NULL                            DEFAULT (0),    burden        INTEGER   DEFAULT (0)                             NOT NULL,    hide          INTEGER   DEFAULT (0)                             NOT NULL); 
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---CREATE TABLE partner (    id   INTEGER PRIMARY KEY AUTOINCREMENT                 NOT NULL,    name TEXT    NOT NULL                 UNIQUE,    hide INTEGER NOT NULL                 DEFAULT (0) ); 
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---CREATE TABLE product (    id   INTEGER PRIMARY KEY AUTOINCREMENT                 NOT NULL,    name TEXT    NOT NULL                 UNIQUE,    hide INTEGER NOT NULL                 DEFAULT (0) ); 

Milsa:
The problem started appearing around Lazarus 2. I didn't notice this problem until then. Maybe it's a bug in the Lazarus code. But I can't confirm this for sure. I would have to try all the older versions of Lazarus one by one

af0815:
Have you tuned on all debugging capabilities of Lazarus ?

Access violation like this are often dangling pointers. You can only go though the code there step by step and look in the watches to find out if the used variables and their content (and pointers) are the same you want to see.

Navigation

[0] Message Index

[#] Next page

Go to full version