Bug 117491 - EDITING: Libo crashes deleting text inside the query designer SQL editor
Summary: EDITING: Libo crashes deleting text inside the query designer SQL editor
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: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-05-07 21:28 UTC by Drew Jensen
Modified: 2018-05-08 18:17 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
test file with a query def (11.96 KB, application/vnd.oasis.opendocument.database)
2018-05-07 21:30 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-05-07 21:28:48 UTC
Description:
The tab key inside a query designer SQL text control crashes 6.1 alpha 1 daily build on 64 bit Linux.

Tested with:
Version: 6.1.0.0.alpha1+
Build ID: f1579d3d6c5f5f3a651825e035b93bee7a4f43c6
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-05-03_10:04:51
Locale: en-US (en_US.UTF-8); Calc: group

stdout (last two lines, of many) 

(soffice:18867): GLib-GObject-WARNING **: 17:14:00.703: ../../../../gobject/gsignal.c:3492: signal name 'selection_changed' is invalid for instance '0x2db1610' of type 'OOoAtkObjCompTxt'

(soffice:18867): GLib-GObject-WARNING **: 17:14:01.272: ../../../../gobject/gsignal.c:3492: signal name 'selection_changed' is invalid for instance '0x7fa714006820' of type 'OOoAtkObjCompTxt'
double free or corruption (fasttop)

Crash reports: One was during editing of firebird ODB (first) and hsql ODB (second)

crashreport.libreoffice.org/stats/crash_details/ab48c394-1166-4f7a-acf6-259ff22df388

crashreport.libreoffice.org/stats/crash_details/7a62dfa7-b98b-4e8c-81f5-13b866224a33


Steps to Reproduce:
1. open any ODB file (download attached if needs be)
2. go to the query section in the Base window
3. open for editing in SQL view a query def, or create a new one (sql view)
4. enter the cursor in the text, or enter a space key - hit the tab key

Actual Results:  
Libreoffice crashes

Expected Results:
the focus in the query designer window changes


Reproducible: Always


User Profile Reset: No



Additional Info:


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-05-07 21:30:46 UTC
Created attachment 141962 [details]
test file with a query def

a file to use
Comment 2 Xisco Faulí 2018-05-07 22:09:16 UTC
> Steps to Reproduce:
> 1. open any ODB file (download attached if needs be)
> 2. go to the query section in the Base window
> 3. open for editing in SQL view a query def, or create a new one (sql view)
> 4. enter the cursor in the text, or enter a space key - hit the tab key

So you go to Edit in SQL view and you get a crash when placing the cursor on the text ?
Comment 3 Drew Jensen 2018-05-07 22:14:34 UTC
This is triggered by not just the TAB key, but also DELETE and BACKSPACE inside the SQL editor. 

You need to change the existing text in the editor with one of those keys.

Also, checked with 6.0.3.2 (Ubuntu 18.04 repo) and could not reproduce the crash, it seems to just be 6.1.
Comment 4 Xisco Faulí 2018-05-07 23:42:28 UTC
Regression introduced by:

author	Noel Grandin <noel.grandin@collabora.co.uk>	2018-04-23 09:51:55 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2018-04-24 08:21:47 +0200
commit	148b84160667ed3ec74c8767f6e62567479488f9 (patch)
tree	e4b3348ad2bf894d6719c938c4503f53627f5204
parent	447d4e1366cf176c6ff2c6eebf3cf8a65745a7dc (diff)
loplugin:useuniqueptr in TETextPortionList

Bisected with: bibisect-linux64-6.1

Adding Cc: to Noel Grandin
Comment 5 Commit Notification 2018-05-08 10:02:20 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#117491 Base crash when editing text in SQL query editor

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 6 Xisco Faulí 2018-05-08 18:17:08 UTC
Verified in

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

@Noel, thanks for the quick fix!