Bug 100426 - Web wizard blocked when add two or more document
Summary: Web wizard blocked when add two or more document
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha1
Hardware: x86-64 (AMD64) Linux (All)
: high critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-16 13:00 UTC by manuel.defranceschi
Modified: 2016-08-13 07:08 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description manuel.defranceschi 2016-06-16 13:00:30 UTC
Description:
In Writer when I add two or more document in the Web Wizard LO remain blocked in the loading window forever and I have to kill the LO's process.

Steps:
-Open LO
-Go to File>Wizard>Web Page
-Click Next
-Click Add
-Select two or more document and click open

At this point LO shows the loading bar and remain blocked forever.

Affected version:

Version: 5.3.0.0.alpha0+
Build ID: a8bd44573b75d1399257d6f5d052611439607189
CPU Threads: 2;
UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-06-13_23:46:49
Locale: it-IT (it_IT.UTF-8)

Version: 5.2.0.0.beta2
Build ID: ae12e6f168ba39f137fc110174a37c482ce68fa4
CPU Threads: 2;
UI Render: default; 
Locale: it-IT (it_IT.UTF-8)
OS: openSUSE Leap 42.1 (x86_64)

Version: 5.2.0.0.alpha1
Build ID: 902b28a39528b6c92602e9b521a1d0861be1caf9
CPU Threads: 2;
UI Render: default; 
Locale: it-IT (it_IT.UTF-8)
OS: openSUSE Leap 42.1 (x86_64)

Not affected version:

Version: 5.1.3.2
Build ID: 644e4637d1d8544fd9f56425bd6cec110e49301b
CPU Threads: 2;
UI Render: default; 
Locale: it-IT (it_IT.UTF-8)
OS: openSUSE Leap 42.1 (x86_64)

Version: 5.0.6.3
Build ID: 490fc03b25318460cfc54456516ea2519c11d1aa
Locale: it-IT (it_IT.UTF-8)
OS: openSUSE Leap 42.1 (x86_64)

Version: 4.4.7.2
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Version locale: it_IT.UTF-8
OS: openSUSE Leap 42.1 (x86_64)

Version: 4.4.4.3
Build ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8
Locale: it_IT.UTF-8
OS: openSUSE Leap 42.1 (x86_64)

Version: 4.3.7.2
Build ID: 8a35821d8636a03b8bf4e15b48f59794652c68ba
OS:openSUSE Leap 42.1 (x86_64)

Version 3.6.7.2 (Build ID: e183d5b)
OS:openSUSE Leap 42.1 (x86_64)
Comment 1 Marco Filippozzi 2016-06-16 13:04:08 UTC
Crashes for me on:

Version: 4.4.0.1
Build ID: 1ba9640ddd424f1f535c75bf2b86703770b8cf6f
Locale: it_IT
OS:    openSUSE Leap 42.1 (x86_64)
Comment 2 Julien Nabet 2016-06-16 19:28:48 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

I noticed this on console logs:
Traceback (most recent call last):
  File "/home/julien/lo/libreoffice/instdir/program/wizards/web/WWD_Events.py", line 250, in addDocument
    oLoadDocs.loadDocuments()
  File "/home/julien/lo/libreoffice/instdir/program/wizards/web/WWD_Events.py", line 921, in loadDocuments
    if self.parent.checkDocument(doc, self.task, self.xC):
  File "/home/julien/lo/libreoffice/instdir/program/wizards/web/WWD_Startup.py", line 558, in checkDocument
    doc.validate(self.xMSF, task)
  File "/home/julien/lo/libreoffice/instdir/program/wizards/web/data/CGDocument.py", line 156, in validate
    exp = self.getSettings().getExporters(self.appType)
  File "/home/julien/lo/libreoffice/instdir/program/wizards/web/data/CGSettings.py", line 72, in getExporters
    exps = self.exportersMap.get(mime)
AttributeError: 'CGSettings' object has no attribute 'exportersMap'
Comment 3 Julien Nabet 2016-06-16 19:33:28 UTC
I'll give it a try.
Comment 4 Julien Nabet 2016-06-16 19:40:03 UTC
I had missed this part in console logs:
Traceback (most recent call last):
  File "/home/julien/lo/libreoffice/instdir/program/wizards/document/OfficeDocument.py", line 107, in createNewDocument
    sURL, "_self", 0, tuple(loadValues))
uno.com.sun.star.lang.IllegalArgumentException: Unsupported URL <private:factory/swriter>: "from LoadEnv::initializeLoading"
Traceback (most recent call last):
  File "/home/julien/lo/libreoffice/instdir/program/wizards/web/data/CGSettings.py", line 65, in __init__
    self.formatter = self.Formatter(self.xmsf, document, resources_)
  File "/home/julien/lo/libreoffice/instdir/program/wizards/web/data/CGSettings.py", line 149, in __init__
    self.dateUtils = self.DateUtils(xmsf, document)
  File "/home/julien/lo/libreoffice/instdir/program/wizards/web/data/CGSettings.py", line 124, in __init__
    formatSettings = self.formatSupplier.getNumberFormatSettings()
AttributeError: 'NoneType' object has no attribute 'getNumberFormatSettings'
Comment 5 Julien Nabet 2016-06-16 20:15:23 UTC
After investigating from uno.com.sun.star.lang.IllegalArgumentException: Unsupported URL <private:factory/swriter>: "from LoadEnv::initializeLoading", I found it's due to:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=5334ff287c65f028753171c7b38da7ffbcebc1cc

Stephan/Akash:
Web wizard works by using read-only docs, see:
http://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/web/WWD_Startup.py#131
    131         doc = OfficeDocument.createNewDocument(
    132             self.myFrame, "swriter", False, True)

+ http://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/document/OfficeDocument.py#86
     86     def createNewDocument(self, frame, sDocumentType, preview, readonly):
     87         loadValues = list(range(2))
     88         loadValues[0] = uno.createUnoStruct(
     89             'com.sun.star.beans.PropertyValue')
     90         loadValues[0].Name = "ReadOnly"
     91         if readonly:
     92             loadValues[0].Value = True
     93         else:
     94             loadValues[0].Value = False

Does the quoted patch needs some specific treatment for Web page (if yes I don't know what it should be) or should we just put False to read-only docs in Web Page? (because read-only could be not mandatory for Web page wizard after all)
Comment 6 akash96j 2016-06-17 05:09:28 UTC
> After investigating from uno.com.sun.star.lang.IllegalArgumentException:
> Unsupported URL <private:factory/swriter>: "from
> LoadEnv::initializeLoading", I found it's due to:
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=5334ff287c65f028753171c7b38da7ffbcebc1cc

I am afraid I don't have much knowledge about the working of Web Wizard.
I wrote that patch because if you open a new unsaved document in read-only mode, it doesn't actually open in read-only mode. It remains editable. Only the UI changes.

> Stephan/Akash:
> Web wizard works by using read-only docs, see:
> http://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/web/
> WWD_Startup.py#131
>     131         doc = OfficeDocument.createNewDocument(
>     132             self.myFrame, "swriter", False, True)
> 
> +
> http://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/
> document/OfficeDocument.py#86
>      86     def createNewDocument(self, frame, sDocumentType, preview,
> readonly):
>      87         loadValues = list(range(2))
>      88         loadValues[0] = uno.createUnoStruct(
>      89             'com.sun.star.beans.PropertyValue')
>      90         loadValues[0].Name = "ReadOnly"
>      91         if readonly:
>      92             loadValues[0].Value = True
>      93         else:
>      94             loadValues[0].Value = False
> 
> Does the quoted patch needs some specific treatment for Web page (if yes I
> don't know what it should be) or should we just put False to read-only docs
> in Web Page? (because read-only could be not mandatory for Web page wizard
> after all)

I think you can try making the read-only property as false. It shouldn't have any effects. Not quite sure about this but you can try.
Comment 7 Stephan Bergmann 2016-06-17 07:17:08 UTC
After bug 99827 this is the second known case where the fix for bug 98837 is causing a regression.  Forbidding opening fresh documents as read-only looked like an obvious thing ("who'd want to do that anyway?"), but in light of these regressions it might be better to fix bug 98837 in a different way.
Comment 8 Julien Nabet 2016-06-17 08:11:01 UTC
Thank you Akash/Stephan for your feedback.
However perhaps Web Wizard should be deprecated considering tdf#99967 (put in see also)
Comment 9 Julien Nabet 2016-06-18 10:43:23 UTC
Unassign myself if the fix is just reverting tdf#98837. However, I suppose we should wait for the right fix for this last one before reverting.
Comment 10 Heiko Tietze 2016-06-19 07:35:47 UTC
Would be interesting to here the OP's opinion on bug 99967. Do you really use the web wizard?
Comment 11 manuel.defranceschi 2016-06-20 08:55:41 UTC
(In reply to Heiko Tietze from comment #10)
> Would be interesting to here the OP's opinion on bug 99967. Do you really
> use the web wizard?

I don't use libre office very often, at the moment I'm doing a stage in a company and my duty is to find bug in LO, but i don't know how useful that feature is.
Comment 12 Heiko Tietze 2016-06-20 09:42:07 UTC
(In reply to manuel.defranceschi from comment #11)
> I don't use libre office very often, at the moment I'm doing a stage in a
> company and my duty is to find bug in LO, but i don't know how useful that
> feature is.

Happy to not read any objection for dropping the buggy, useless, and out-dated web wizard. RESOLVED > WONTFIX?
Comment 13 Julien Nabet 2016-06-22 20:01:36 UTC
What about "WONT FIX" once web wizard will be removed?