Bug 117300 - Base hangs with memory allocation error when trying to open a table with a column type of REAL and data.
Summary: Base hangs with memory allocation error when trying to open a table with a co...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha1+
Hardware: All All
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0
Keywords:
Depends on:
Blocks: Database-Firebird-Migration
  Show dependency treegraph
 
Reported: 2018-04-27 19:17 UTC by Drew Jensen
Modified: 2018-05-03 20:27 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
test ODB single table, two columns (4.63 KB, application/vnd.oasis.opendocument.database)
2018-04-27 19:18 UTC, Drew Jensen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Drew Jensen 2018-04-27 19:17:28 UTC
Description:
The test file was created and populated with LiboO 5.4.6.2 (Linux)

test system:
Version: 6.1.0.0.alpha1
Build ID: cb47f0d320994e001bc38dc2ee9b7d957b15e6ab
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group

Steps to Reproduce:
1. Download attached ODB file
2. Open File and go to Tables section 
3. Open table tbl_real

Actual Results:  
error box displayed with error
std::bad alloc
LibO becomes non responsive and the process must be forced to quit.

Expected Results:
table opens


Reproducible: Always


User Profile Reset: No



Additional Info:
Open the file and starting a migration to firebird generates the same error and becomes non responsive. 


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/65.0.3325.181 Chrome/65.0.3325.181 Safari/537.36
Comment 1 Drew Jensen 2018-04-27 19:18:28 UTC
Created attachment 141726 [details]
test ODB single table, two columns

test file created with 5.4.6.2 (ubuntu repo)
Comment 2 Drew Jensen 2018-04-27 19:36:26 UTC
added regression and request bibisect

Since the problem in 6.1 Alpha1 is the same for hsql or firebird engine and it was created with 5.4.6.2 (hsql engine)
Comment 3 Xisco Faulí 2018-04-27 22:00:02 UTC
The crash started after https://cgit.freedesktop.org/libreoffice/core/commit/?id=159dd28651788a19848eae56693ad06ed947414d

Reproduced in

Version: 6.1.0.0.alpha1+
Build ID: 42494bfdd029c69cca7f0979a0ed3ab920efe45e
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 4 Commit Notification 2018-04-29 16:20:25 UTC
Tamas Bunth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=cd65f098382c14439f6502bbe72e1d78d23a92c5

tdf#117300 dbahsql: Add REAL type

It will be available in 6.1.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 5 Drew Jensen 2018-05-01 00:27:45 UTC
Verified fix with:
Version: 6.1.0.0.alpha1+
Build ID: 5f2073fbc995fb619f398a55187413813578b62e
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-04-29_23:58:54
Locale: en-US (en_US.UTF-8); Calc: group

Table migrates with data as expected.
Comment 6 Drew Jensen 2018-05-01 00:36:28 UTC
For completeness.

Also checked that this fixed HSQLdb also. All good.
Comment 7 Xisco Faulí 2018-05-03 14:21:26 UTC
Verified in

Version: 6.1.0.0.alpha1+
Build ID: f1579d3d6c5f5f3a651825e035b93bee7a4f43c6
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

@Tamas, thanks for fixing this!
Comment 8 Drew Jensen 2018-05-03 20:27:10 UTC
I've put the 21 single data type test files in a shared location at the tdf nextcloud https://nextcloud.documentfoundation.org/s/Q3oCKdNQ45AcNWH 

just now ran all 21, no crashes or hands, only 3 generate any type of sql error.
all in tracker already.