Bug 137016 - Crash in: libatk-bridge-2.0.so.0.0.0, when EDITING Relationships
Summary: Crash in: libatk-bridge-2.0.so.0.0.0, when EDITING Relationships
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.0.1.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.1.0 target:7.0.3
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-25 07:42 UTC by Richard Demattio
Modified: 2020-10-01 07:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["libatk-bridge-2.0.so.0.0.0"]


Attachments
Error reproduction and database (120.13 KB, application/zip)
2020-09-26 08:15 UTC, Richard Demattio
Details
System Information (3.77 KB, text/plain)
2020-09-26 11:50 UTC, Richard Demattio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Demattio 2020-09-25 07:42:12 UTC
This bug was filed from the crash reporting server and is br-171bea4d-6542-42bf-a0bd-68f6f3591b0a.
=========================================
Comment 1 Julien Nabet 2020-09-25 18:56:32 UTC
Could you provide minimal step by step process to reproduce this?
Comment 2 Richard Demattio 2020-09-26 08:15:02 UTC
Created attachment 165861 [details]
Error reproduction and database

for details - see attachment
Comment 3 Julien Nabet 2020-09-26 08:53:57 UTC
IdidITmyWay: I saw you assigned yourself this bug, do you want to fix this yourself?
BTW, on pc Debian x86-64 with master sources updated today with gen rendering, I don't reproduce the crash.

Caolán: I don't know if it's related or if it's another pb but with gtk3, I can't even see the list of the columns of the table in relationship dialog. It blinks a lot and I got a lot of these in console:
** (soffice:36996): WARNING **: 10:49:16.257: Focused object has invalid index in parent

(remark: for odt, I got a lot of:
warn:vcl:37168:37168:vcl/source/gdi/bitmapex.cxx:133: BitmapEx: forced mask to monochrome)
Comment 4 Richard Demattio 2020-09-26 11:50:31 UTC
Created attachment 165864 [details]
System Information

Sorry, I am not able to fix the problem by myself.

You wrote: WARNING: "Focused object has invalid index in parent"
This could be a good hint!
Initially I did accidentally define the - now - foreign field as VARCHAR and assigned PRIMARY KEY to it.
I also had a unique constraint over (GbNr, EZ, Parzelle), which I had to remove to be allowed,  changing the type.
Si I removed the unique constraint and changed the field type to integer.
Maybe, there is a remaining trace (not completely cleaned) from that activities before.
Your remark about ODT:
I took the screenshot with "Gnome-Screenshot". Maybe there is a bug in screenshot producing erroneous bitmaps.
You recognized, that I am using the youngest release of Libreoffice?
I am sure, you saw it already: I am using Firebird as the internal database.
Comment 5 Julien Nabet 2020-09-26 11:58:34 UTC
(In reply to IdidITmyWay from comment #4)
> Created attachment 165864 [details]
> System Information
> 
> Sorry, I am not able to fix the problem by myself.
No problem of course :-)

> You wrote: WARNING: "Focused object has invalid index in parent"
> This could be a good hint!
Perhaps

> Initially I did accidentally define the - now - foreign field as VARCHAR and
> assigned PRIMARY KEY to it.
> I also had a unique constraint over (GbNr, EZ, Parzelle), which I had to
> remove to be allowed,  changing the type.
> Si I removed the unique constraint and changed the field type to integer.
> Maybe, there is a remaining trace (not completely cleaned) from that
> activities before.
I don't know

> Your remark about ODT:
> I took the screenshot with "Gnome-Screenshot". Maybe there is a bug in
> screenshot producing erroneous bitmaps.
> You recognized, that I am using the youngest release of Libreoffice?
> I am sure, you saw it already: I am using Firebird as the internal database.
Firebird support in LO has been put back experimental several months ago.
Also, there's almost no more fixes in Base part because dev experts are on other subjects so don't expect this to be fixed soon.
Comment 6 Julien Nabet 2020-09-26 12:00:22 UTC
BTW, you can try this workaround:
- launch console
- type
export SAL_USE_VCLPLUGIN=gen
(so you'll use "gen" rendering instead of "gtk3")
- launch LO
and give a new try.
Comment 7 Richard Demattio 2020-09-26 14:15:03 UTC
Thank you for the workaround hint!

My understandig is: the old database HSQL implementation is near end of life.
This is, why I decided for my project to take the Firebird variant.
You said, Firebird support in LO is put back experimental.
~~~~~~~~~~~~~~~~~~~~~
Is this because of being not stable enough, or is there a decision process that LO will also move away from Firebird to a third database implementation?
~~~~~~~~~~~~~~~~~~~~~~~~~~~++
I am going to comtinue my way with Firebird for my project and it looks like I may find a lot of more issues. 
Does it make sense to raise tickets or is there a major LO rework in progress and my tickets do not bring additional clarifications. 
~~~~~~~~~~~~~~~~~~~~
If you like, you can cancel or close the ticket. The pure SQL interface is a good door for successful workarounds.
Comment 8 Richard Demattio 2020-09-26 14:22:42 UTC
I tried your hint with
"export SAL_USE_VCLPLUGIN=gen"

and I SUCCEEDED!
Well- problem solved for me.
Thank you
Comment 9 Julien Nabet 2020-09-26 14:47:23 UTC
(In reply to IdidITmyWay from comment #7)
> Thank you for the workaround hint!
> 
> My understandig is: the old database HSQL implementation is near end of life.
> This is, why I decided for my project to take the Firebird variant.
> You said, Firebird support in LO is put back experimental.
> ~~~~~~~~~~~~~~~~~~~~~
> Is this because of being not stable enough, or is there a decision process
> that LO will also move away from Firebird to a third database implementation?
LO uses HSQLDB 1.8 (so quite old). The goal was first to get rid of Java and Firebird was the only candidate which:
- has license compatibility
- allows to call it:
  - client/server (client is LO Base, Firebird is the server)
  - embedded Firebird (no external Firebird server)
  - has C/C++ connector
- mature enough

There've a lot of work from different people then it slowed down until almost a stop because people moved on other things.
So now we're in the middle of the bridge:
- Firebird implementation in LO isn't stable enough (just consider the number of bugs)
- the old HSQLDB version remained
See http://document-foundation-mail-archive.969070.n3.nabble.com/About-putting-back-Firebird-experimental-tt4265392.html#a4266137

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~++
> I am going to comtinue my way with Firebird for my project and it looks like
> I may find a lot of more issues. 
> Does it make sense to raise tickets or is there a major LO rework in
> progress and my tickets do not bring additional clarifications.
I think there's no need to submit new tickets but it's only my opinion.
To put it clearly, I think Base part is (almost?) dead.

> ~~~~~~~~~~~~~~~~~~~~
> If you like, you can cancel or close the ticket. The pure SQL interface is a
> good door for successful workarounds.
I'll let other decide, I'm neither a TDF member nor an expert.

If you don't need embedded, I'd move towards MariaDB.
If you need embedded, I think that badfully, I'd stick on HSQLDB.
Again, just my opinion.
Comment 10 Caolán McNamara 2020-09-27 19:30:47 UTC
re comment #3: I think https://gerrit.libreoffice.org/c/core/+/103523 will solve that problem

I couldn't reproduce the crash in 7-0 locally, but the problem in master of comment #3 appears to also exist, but not as severely, in 7-0 and I have to try a few times to get the combobox to dropdown so its plausible that the backport of the master fix, which is need focus related, to 7-0 of https://gerrit.libreoffice.org/c/core/+/103524 has a bearing on this
Comment 11 Commit Notification 2020-09-28 11:13:22 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/70866d4663e7e7414539a5e8664385d8b13ba034

Related: tdf#137016 check if subcontrol has the focus

It will be available in 7.1.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 12 Julien Nabet 2020-09-28 19:46:28 UTC
Thank you Caolán, I confirm I don't reproduce the behavior I had.

I can't reproduce the crash anyway. Should we put this to WFM since the fix is useful of course but not related to the bugtracker?
Comment 13 Caolán McNamara 2020-09-29 12:19:57 UTC
I feel its likely the source problem. I'll tentatively call it fixed. There is a backport of the relevant bit to 7-0 in gerrit. Maybe the original reporter could give a daily a try and see if it is still reproducible after my change.
Comment 14 Richard Demattio 2020-09-29 13:55:30 UTC
Sorry for actually not being able to test your patch, because of loosing my test environment. I don't want to use my production environment for that.
Comment 15 Commit Notification 2020-10-01 07:56:53 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/9d30d3bb93171a12655dc89066fe065e2c2af658

Related: tdf#137016 check if subcontrol has the focus

It will be available in 7.0.3.

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.