Bug 125953 - FIREBIRD: Form wizard fails to create correct layout when CLOB[BLOB] field present
Summary: FIREBIRD: Form wizard fails to create correct layout when CLOB[BLOB] field pr...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:6.4.0 target:6.3.0.1 target:6.2.6
Keywords: bibisected, bisected
: 125954 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-06-16 14:00 UTC by Robert Großkopf
Modified: 2019-07-05 09:12 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Database to test - see funny result of finished test ... (13.46 KB, application/vnd.oasis.opendocument.database)
2019-06-16 14:00 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2019-06-16 14:00:28 UTC
Created attachment 152229 [details]
Database to test - see funny result of finished test ...

Start the attached database.
Start the form wizard.
In step 5 you could arrange controls.
Default here: As Data Sheet.
Try other possibilities.
Try to finish.
Won't work.

This is the first bug. The second is a silly effect when trying to go back: If you choose "As Data Sheet" after you have choosen "Columnar ..." or "In Blocks ..." you could finish the wizard. The wizard will set the standalone controls inside a tablecontrol. Will submit this as second bug

All tested with LO 6.3.0.0.beta1 on OpenSUSE 15 64bit rpm Linux.
Comment 1 Robert Großkopf 2019-06-16 15:41:32 UTC
Have tested a little bit more:
The table "Tabelle1" contains all field types of Firebird.
If I don't choose the field CLOB[BLOB] for the form it will create every arrangement in the wizard. The wizard doesn't know which field should be created for this kind of field type. So it hangs when leaving step 5 and couldn't change, for example, the appearance of the controls from 3-D to flat.

Tablecontrols don't support any BLOB-fields, so this construction will create a form without all BLOB-fields - also the CLOB[BLOB] for long text.
Comment 2 Alex Thurgood 2019-06-18 07:14:59 UTC
Confirming with 

Version: 6.4.0.0.alpha0+
Build ID: eda0568ec550a10b962c2427edfe05ea3197f107
CPU threads: 4; OS: Mac OS X 10.14.5; UI render: default; VCL: osx; 
Locale: fr-FR (fr_FR.UTF-8); UI-Language: en-US
Calc: threaded

I can confirm both behaviours :

(a) choosing other than default data sheet doesn't allow the user to create the form, the wizard jumps to the Cancel button ;

(b) switching form layout type to other than data sheet, then moving back through wizard steps causes both layout types to be inserted in the form document.
Looks pretty ugly when you see the end result.

Regression.
Comment 3 Xisco Faulí 2019-06-20 13:14:14 UTC
I can reproduce it in

Version: 6.0.0.0.alpha1+
Build ID: 6eeac3539ea4cac32d126c5e24141f262eb5a4d9
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

as well, not sure if it's a regression.
Do you reproduce with HSQLDB ddbb ?
Comment 4 Xisco Faulí 2019-06-20 13:41:21 UTC
it works if Bild_Blob, Blob and Clob are not selected, thus we just need support for CLOB Variables after https://cgit.freedesktop.org/libreoffice/core/commit/?id=0217031a98508731f15df9d361a6e5b584db5716
Comment 5 Xisco Faulí 2019-06-20 13:43:26 UTC
*** Bug 125954 has been marked as a duplicate of this bug. ***
Comment 6 Alex Thurgood 2019-06-20 15:16:57 UTC
I can't be bothered to argue with whether it is a regression or not. 

We had support for Firebird 2.5 files as external datasources previously, and this behaviour was not reported against that version, despite SUBTYPE 0 support already being in FB2.5 files, so...similarly, binary image support worked without messing up layout in HSQLDB, so again...


In the commit above, shouldn't :

+ aSql.append("SUB_TYPE ");

actually indicate that we want SUB_TYPE 0 ?

Or, have I misunderstood something ?
Comment 7 Julien Nabet 2019-06-30 10:26:35 UTC
On pc Debian x86-64 with master sources updated today, only when I put "Clob" in fields for forms, I got this trace when going to step 5:
java.lang.NullPointerException
	at com.sun.star.wizards.document.DatabaseControl.createGridColumn(DatabaseControl.java:70)
	at com.sun.star.wizards.document.DatabaseControl.<init>(DatabaseControl.java:45)
	at com.sun.star.wizards.document.GridControl.<init>(GridControl.java:80)
	at com.sun.star.wizards.form.FormDocument$ControlForm.insertGridControl(FormDocument.java:516)
	at com.sun.star.wizards.form.FormDocument$ControlForm.initialize(FormDocument.java:389)
	at com.sun.star.wizards.form.FormDocument.initialize(FormDocument.java:152)
	at com.sun.star.wizards.form.FormWizard.enterStep(FormWizard.java:103)
	at com.sun.star.wizards.ui.WizardDialog.switchToStep(WizardDialog.java:314)
	at com.sun.star.wizards.ui.WizardDialog.gotoNextAvailableStep(WizardDialog.java:563)
	at com.sun.star.wizards.ui.WizardDialog.access$500(WizardDialog.java:46)
	at com.sun.star.wizards.ui.WizardDialog$4.actionPerformed(WizardDialog.java:405)
	at com.sun.star.bridges.jni_uno.JNI_proxy.dispatch_call(Native Method)
	at com.sun.star.bridges.jni_uno.JNI_proxy.invoke(JNI_proxy.java:185)
	at com.sun.proxy.$Proxy71.execute(Unknown Source)
	at com.sun.star.wizards.ui.UnoDialog.executeDialog(UnoDialog.java:541)
	at com.sun.star.wizards.ui.UnoDialog.executeDialog(UnoDialog.java:555)
	at com.sun.star.wizards.form.FormWizard.start(FormWizard.java:349)
	at com.sun.star.wizards.form.CallFormWizard$FormWizardImplementation.trigger(CallFormWizard.java:75)
Comment 8 Julien Nabet 2019-06-30 11:14:08 UTC
I submitted a patch to gerrit review here:
https://gerrit.libreoffice.org/#/c/74927/

I don't know if it's ok but at least the form creation doesn't hang/cancel even when using other possibilities than Data Sheet.
Comment 9 Commit Notification 2019-07-03 15:39:43 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/b59f4fe03a7843cde70a56a282b3a5d7a304f39d%5E%21

tdf#125953: take CLOB into account in form wizard

It will be available in 6.4.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 10 Julien Nabet 2019-07-03 15:42:09 UTC
Patch is on gerrit review for 6.3 branch here:
https://gerrit.libreoffice.org/#/c/75056/

Robert: don't hesitate to test when a dev daily build will include the patch from master and tell me if it's ok to you. Indeed, I didn't receive feedback so perhaps my patch is wrong (eg: bring some regression)
Comment 11 Xisco Faulí 2019-07-04 09:03:51 UTC
it works in

Version: 6.4.0.0.alpha0+
Build ID: d62f6b7d40284b2e41831376e5388711ab6250f3
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Julien Nabet, thanks for fixing this issue!!
Comment 12 Commit Notification 2019-07-04 09:05:16 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/96d1b176f02f0396544e6c13c170f895b13fdfde%5E%21

tdf#125953: take CLOB into account in form wizard

It will be available in 6.3.0.1.

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 13 Commit Notification 2019-07-05 09:12:05 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/d726d525924a1869fd0f0e65504de6596eb40e35%5E%21

tdf#125953: take CLOB into account in form wizard

It will be available in 6.2.6.

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.