Bug 120129 - EDITING: LIST function in query creates additional characters in Windows10
Summary: EDITING: LIST function in query creates additional characters in Windows10
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.1.1.2 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:7.3.0 target:7.2.2 target:7.1.7
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-26 11:46 UTC by Szilárd Vezér
Modified: 2021-09-10 07:50 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
test file with list query (2.96 KB, application/vnd.oasis.opendocument.database)
2018-09-26 13:20 UTC, Drew Jensen
Details
A sample with LIST generating BLOB with zero bytes (12.06 KB, application/vnd.sun.xml.base)
2021-09-08 21:26 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Szilárd Vezér 2018-09-26 11:46:29 UTC
Description:
Using the (Firebird) LIST function in LibreOffice Base, the result contains various number of white square (like ⬜) characters.

Steps to Reproduce:
1. Creating a table (Table)
  ID INTEGER
  Data INTEGER
2. Filling with some data
  ID Data
  1  11
  1  12
  1  13
  2  201
  2  202
  2  203
  3  3001
  3  3002
  3  3003
3. Making a query with the following sql command:
SELECT "ID", LIST( "Data", ' / ' ) FROM "Table" GROUP BY "ID"

Actual Results:
 ID LIST
 1  11⬜ / 12⬜ / 13⬜
 2  201 / 202 / 203
 3  3001 / ⬜3002 / ⬜3003

Expected Results:
 ID LIST
 1  11 / 12 / 13
 2  201 / 202 / 203
 3  3001 / 3002 / 3003


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
LibreOffice Base 6.1.1.2 (x64) / JavaSE 10.0.2 (x64) / Windows 10

Same behavior occur with different
- different data types (of "Data" column),
- java versions,
- language settings.
This "bug" is not exist in Windows7, Ubuntu 18.04, maybe only in Windows10.
Comment 1 Drew Jensen 2018-09-26 13:20:16 UTC
Created attachment 145186 [details]
test file with list query

I can't confirm because as the reporter states it works for under Ubuntu 18.04

But for anyone with Windows 10, here is an example file with a query.
Comment 2 Alex Thurgood 2018-09-26 14:07:22 UTC
No repro either with:

Version: 6.1.1.2
Build ID: 5d19a1bfa650b796764388cd8b33a5af1f5baa1b
Threads CPU : 4; OS : Mac OS X 10.13.6; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group threaded
Comment 3 Szilárd Vezér 2018-09-27 08:46:27 UTC
A conversion of the BLOB data of LIST to VARCHAR removes the ⬜ characters...
Comment 4 ribotb 2018-10-15 10:17:54 UTC
I reproduce with :

Version: 6.1.0.3 (x64)
Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1
Threads CPU : 4; OS : Windows 10.0; UI Render : par défaut; 
Locale : fr-FR (fr_FR); Calc: group threaded

Version: 6.2.0.0.alpha0+ (x64)
Build ID: c8481c8a43ce2544275b2d70ef29a8b0cb157732
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-10-11_00:41:23
Locale: fr-FR (fr_FR); Calc: threaded

Microsoft Windows 10 Version 1803
Comment 5 Xisco Faulí 2018-11-15 12:39:42 UTC
Dear Szilárd Vezér,
Could you please try to reproduce it with a master build from http://dev-builds.libreoffice.org/daily/master/ ?
You can install it alongside the standard version.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the master build
Comment 6 Julien Nabet 2019-03-06 15:58:32 UTC
On Win10 with master sources updated today, I could reproduce this.
Comment 7 Julien Nabet 2019-03-06 16:16:51 UTC
I tried to install Firebird 3.0.4 Win to give a try on Firebird directly but know too few Firebird to give it a try.
Indeed, I tested isqltool with https://firebirdsql.org/manual/isql-invoke.html
but it doesn't work.
Comment 8 QA Administrators 2021-03-06 03:45:26 UTC Comment hidden (obsolete)
Comment 9 Julien Nabet 2021-09-08 19:41:53 UTC
It may be already be fixed with tdf#144230 (put in see also).

You can give a try to a daily build from https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb77-TDF/current/ (of course, it's just for the test since it's a dev version).
Comment 10 Mike Kaganski 2021-09-08 19:44:41 UTC
(In reply to Julien Nabet from comment #9)
> It may be already be fixed with tdf#144230 (put in see also).

No, I also saw *zero bytes* added to LIST output; and given that I don't know much about how it should work, I thought it's how the BLOB should look like. Looks like I need to take a look at it deep :-)
Comment 11 Julien Nabet 2021-09-08 19:56:42 UTC
(In reply to Mike Kaganski from comment #10)
> (In reply to Julien Nabet from comment #9)
> > It may be already be fixed with tdf#144230 (put in see also).
> 
> No, I also saw *zero bytes* added to LIST output; and given that I don't
> know much about how it should work, I thought it's how the BLOB should look
> like. Looks like I need to take a look at it deep :-)

Hehe, I noticed your recent great work on Firebird, knowing that there are very few commits about Base part, thank you a lot!
Comment 12 Mike Kaganski 2021-09-08 21:26:13 UTC
Created attachment 174905 [details]
A sample with LIST generating BLOB with zero bytes

Hum. Maybe my issue is different after all.

I couldn't repro with the attachment here. But this file gives me a "sluggish" experience (using my dbgutil build, I get tens of seconds until the query shows; trying to resize the column gives another delay; UI is unresponsive up to the point of requiring to kill it).

Putting a breakpoint to OutputDevice::GetTextBreak shows that the rStr looks like

> rStr = L"100х100х2,0;\0\0\0\0\0\0\0\0\0\0\0\0100х100х2,5;\0\0\0\0\0\0\0\0\0\0\0\0100х100х2,8;\0\0\0\0\0\0\0\0\0\0\0\0100х100х3,0;\0\0\0\0\0\0\0\0\0\0\0\0100х100х3,5;\0\0\0\0\0\0\0\0\0\0\0\0100х100х4,0;\0\0\0\0\0\0\0\0\0\0\0\0100х100х4,5;\0\0\0\0\0\0\0\0\0\0\0\0100...
Comment 13 Mike Kaganski 2021-09-08 22:14:40 UTC
(In reply to Mike Kaganski from comment #12)
> I couldn't repro with the attachment here.

I meant, I couldn't repro with attachment 145186 [details] from comment 1.
Comment 14 Mike Kaganski 2021-09-09 23:13:25 UTC
https://gerrit.libreoffice.org/c/core/+/121872
Comment 15 Commit Notification 2021-09-10 04:23:24 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/541ddf4580cac8c3f9590be26a487f5fc8e2553c

tdf#120129: don't forget to update buffer size to actual length

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2021-09-10 07:49:13 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/c3cdc29900574fefe4dc8b90e2941f2d3371d89c

tdf#120129: don't forget to update buffer size to actual length

It will be available in 7.2.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2021-09-10 07:50:28 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/e7e38c23d0a91e80535893ee88e3f0062b7d522c

tdf#120129: don't forget to update buffer size to actual length

It will be available in 7.1.7.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.