Bug 73349 - EDITING - Embedded Firebird - Fieldtype BLOB allows to select MOV but fails to display in form and causes heavy performance hit
Summary: EDITING - Embedded Firebird - Fieldtype BLOB allows to select MOV but fails t...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks: Base-Images
  Show dependency treegraph
 
Reported: 2014-01-07 09:28 UTC by Alex Thurgood
Modified: 2019-12-05 11:04 UTC (History)
7 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 Alex Thurgood 2014-01-07 09:28:46 UTC
Testing Firbird BLOB support. 
Although MOV files are listed as acceptable input data streams in the dialog (using a form with an image control bound to a BLOB defined field), these files are not inserted, but LO attempts nonetheless to do so, and when these files are large, say more than a couple of Mb, causes LO Base to stop responding.

I'm not sure how this could be resolved, perhaps by excluding video formats from the list of supported file types for that particular dialog ?

Alex
Comment 1 Alex Thurgood 2014-01-07 09:33:14 UTC
The hang appears to last for as long as it takes LO to completely parse the file stream then reject it. If you have a large MOV file this will cause the app hang mechanism to kick in, killing the app.
Comment 2 Alex Thurgood 2014-01-07 09:37:56 UTC
How to reproduce :

1) Create a new embedded Firebird db with the wizard

2) Create a table with two fields :
ID : integer, primary key
IMG : blob

3) Create a form based on the table

4) Double-click on the saved form to open it and double-click on the image control to choose a media. Note that in the media choice dialog, MOV files are allowed.

5) Choose a large MOV file.

6) Wait, wait some more, listen to disk activity whirring while LO attempts to process the file - during this time LO is unresponsive.


Alex
Comment 3 Alex Thurgood 2014-01-07 09:38:56 UTC
Console output :
	

    warn:legacy.tools:29208:1:vcl/source/gdi/bmpacc.cxx:58: Forbidden Access to empty bitmap!
    warn:legacy.tools:29208:1:vcl/source/gdi/bmpacc.cxx:58: Forbidden Access to empty bitmap!
    warn:sfx.control:29208:1:sfx2/source/control/dispatch.cxx:1530: Childwindow slot missing: 10365
    warn:sfx.control:29208:1:sfx2/source/control/dispatch.cxx:1530: Childwindow slot missing: 10365
    warn:legacy.tools:29208:1:vcl/source/gdi/bmpacc.cxx:58: Forbidden Access to empty bitmap!
    warn:legacy.tools:29208:1:vcl/source/gdi/bmpacc.cxx:58: Forbidden Access to empty bitmap!
    warn:legacy.osl:29208:1:xmloff/source/forms/propertyexport.cxx:595: OPropertyExport::implConvertAny: unsupported value type!
    warn:legacy.osl:29208:1:xmloff/source/forms/propertyexport.cxx:595: OPropertyExport::implConvertAny: unsupported value type!
    warn:legacy.osl:29208:1:xmloff/source/forms/propertyexport.cxx:595: OPropertyExport::implConvertAny: unsupported value type!
    warn:legacy.osl:29208:1:xmloff/source/forms/propertyexport.cxx:595: OPropertyExport::implConvertAny: unsupported value type!
    warn:xmloff:29208:1:xmloff/source/draw/shapeexport.cxx:556: com.sun.star.drawing.GroupShape
    warn:xmloff:29208:1:xmloff/source/draw/shapeexport.cxx:556: com.sun.star.drawing.ControlShape
    warn:xmloff:29208:1:xmloff/source/draw/shapeexport.cxx:556: com.sun.star.drawing.ControlShape
    warn:xmloff:29208:1:xmloff/source/draw/shapeexport.cxx:556: com.sun.star.drawing.GroupShape
    warn:xmloff:29208:1:xmloff/source/draw/shapeexport.cxx:556: com.sun.star.drawing.ControlShape
    warn:xmloff:29208:1:xmloff/source/draw/shapeexport.cxx:556: com.sun.star.drawing.ControlShape
    warn:xmloff:29208:1:xmloff/source/draw/shapeexport.cxx:556: com.sun.star.drawing.GroupShape
    warn:xmloff:29208:1:xmloff/source/draw/shapeexport.cxx:556: com.sun.star.drawing.ControlShape
    warn:xmloff:29208:1:xmloff/source/draw/shapeexport.cxx:556: com.sun.star.drawing.ControlShape
    warn:xmloff:29208:1:xmloff/source/draw/shapeexport.cxx:556: com.sun.star.drawing.GroupShape
    warn:xmloff:29208:1:xmloff/source/draw/shapeexport.cxx:556: com.sun.star.drawing.ControlShape
    warn:xmloff:29208:1:xmloff/source/draw/shapeexport.cxx:556: com.sun.star.drawing.ControlShape
Comment 4 Lionel Elie Mamane 2014-01-07 09:48:21 UTC
We should probably use some async interface for BLOB/CLOB... Or maybe offload the loading work to another thread.
Comment 5 Alex Thurgood 2014-01-07 10:02:16 UTC
As an example, I tested insertion of a 39.8 Mb MOV video file. I started timing from the moment I clicked on the "Previous Record" arrow in the toolbar at the bottom of the form.

It took LO 1 minute 50 s to respond and display the previous record.


Alex
Comment 6 Alex Thurgood 2014-01-07 10:06:34 UTC
Hmm, are there two separate things here then :

- incorrect recognition of MOV video files as image media types for the BLOB stream ?

- performance of writing BLOBs to disk ?


Alex
Comment 7 Alex Thurgood 2014-01-07 10:25:51 UTC
With an 81 Mb MOV file, it takes 3 min 48 s to switch to the previous record.

Alex
Comment 8 Alex Thurgood 2014-01-07 10:30:30 UTC
After insertion of such a file, attempting to display the table view from the form via the bottom data navigation toolbar caused LO to crash and trash both the new table and form I had created in an existing FDB embedded ODB file.

terminate called after throwing an instance of 'com::sun::star::sdbc::SQLException'
sh: 1: /home/Development/libo/core/instdir/program/../program/crashrep: not found

will investigate further.


Alex
Comment 9 ribotb 2014-02-05 15:19:29 UTC
Hi Alex,

In the list of formats that can be imported into a BLOB field, there is no video format except MOV, there are only image formats. The presence of the MOV format in the list seems incongruous and might be an error?

I tried to import MOV video, but nothing appears in the control associated  in my form.

I verified in my Firebird SQL Server 2.5, the video formats accepted are only AVI and MPEG.

Bernard
Comment 10 Alex Thurgood 2014-03-14 16:33:53 UTC
With gdb running, I see :

warn:legacy.tools:25906:1:vcl/source/gdi/bmpacc.cxx:58: Forbidden Access to empty bitmap!

but the blob data still gets inserted into the db (just nothing is shown in the UI on the form). In turn, this makes the db very unresponsive.

Alex
Comment 11 Alex Thurgood 2014-03-14 16:53:37 UTC
Tried swapping the MOV file for a 59 Mb TIFF file - same performance hit.

I've also noticed this warning crops up regularly in the console:
warn:sfx.control:25906:1:sfx2/source/control/dispatch.cxx:1518: Childwindow slot missing: 10365


The TIFF file at least displays what seems to be a preview in the form when LO finally comes to its senses, but during the time it takes to move from one record to the next, load the stream and display it, you may as well go and have a game of chess ;-)

Alex
Comment 12 Alex Thurgood 2014-03-14 17:12:54 UTC
So I inserted two TIFF files into my db, one was 59 Mb, and the second 39 Mb. Both are displayed in the form, after navigating backwards and forwards again with the record navigation toolbar.

If I close the form, the save the state of the ODB file, and then close down LO, I see this output in gdb :

warn:sfx.control:25906:1:sfx2/source/control/dispatch.cxx:1518: Childwindow slot missing: 10365
[New Thread 0x7fff7462e700 (LWP 26324)]
warn:sfx.control:25906:1:sfx2/source/control/dispatch.cxx:1518: Childwindow slot missing: 10365
[Thread 0x7fff7462e700 (LWP 26324) exited]
[Thread 0x7fffa5b45700 (LWP 26323) exited]
warn:sfx.control:25906:1:sfx2/source/control/dispatch.cxx:1518: Childwindow slot missing: 10365
[New Thread 0x7fffa5b45700 (LWP 26341)]
[Thread 0x7fffa5b45700 (LWP 26341) exited]
[New Thread 0x7fffa5b45700 (LWP 26342)]
[Thread 0x7fffa5b45700 (LWP 26342) exited]
[New Thread 0x7fffa5b45700 (LWP 26344)]
[Thread 0x7fffa5b45700 (LWP 26344) exited]
warn:legacy.osl:25906:1:xmloff/source/forms/propertyexport.cxx:595: OPropertyExport::implConvertAny: unsupported value type!
warn:legacy.osl:25906:1:xmloff/source/forms/propertyexport.cxx:595: OPropertyExport::implConvertAny: unsupported value type!
warn:legacy.osl:25906:1:xmloff/source/forms/propertyexport.cxx:595: OPropertyExport::implConvertAny: unsupported value type!
warn:legacy.osl:25906:1:xmloff/source/forms/propertyexport.cxx:595: OPropertyExport::implConvertAny: unsupported value type!
warn:xmloff:25906:1:xmloff/source/draw/shapeexport.cxx:555: com.sun.star.drawing.GroupShape
warn:xmloff:25906:1:xmloff/source/draw/shapeexport.cxx:555: com.sun.star.drawing.ControlShape
warn:xmloff:25906:1:xmloff/source/draw/shapeexport.cxx:555: com.sun.star.drawing.ControlShape
warn:xmloff:25906:1:xmloff/source/draw/shapeexport.cxx:555: com.sun.star.drawing.GroupShape
warn:xmloff:25906:1:xmloff/source/draw/shapeexport.cxx:555: com.sun.star.drawing.ControlShape
warn:xmloff:25906:1:xmloff/source/draw/shapeexport.cxx:555: com.sun.star.drawing.ControlShape
warn:xmloff:25906:1:xmloff/source/draw/shapeexport.cxx:555: com.sun.star.drawing.GroupShape
warn:xmloff:25906:1:xmloff/source/draw/shapeexport.cxx:555: com.sun.star.drawing.ControlShape
warn:xmloff:25906:1:xmloff/source/draw/shapeexport.cxx:555: com.sun.star.drawing.ControlShape
warn:xmloff:25906:1:xmloff/source/draw/shapeexport.cxx:555: com.sun.star.drawing.GroupShape
warn:xmloff:25906:1:xmloff/source/draw/shapeexport.cxx:555: com.sun.star.drawing.ControlShape
warn:xmloff:25906:1:xmloff/source/draw/shapeexport.cxx:555: com.sun.star.drawing.ControlShape
[New Thread 0x7fffa5b45700 (LWP 26345)]
[Thread 0x7fffa5b45700 (LWP 26345) exited]
warn:sfx.control:25906:1:sfx2/source/control/dispatch.cxx:1518: Childwindow slot missing: 10365
[New Thread 0x7fffa5b45700 (LWP 26365)]
[Thread 0x7fffa5b45700 (LWP 26365) exited]
warn:legacy.osl:25906:1:unotools/source/config/moduleoptions.cxx:635: unknown factory
[New Thread 0x7fffa5b45700 (LWP 26367)]
[Thread 0x7fffa5b45700 (LWP 26367) exited]
[New Thread 0x7fffa5b45700 (LWP 26368)]
[Thread 0x7fffa5b45700 (LWP 26368) exited]
[New Thread 0x7fffa5b45700 (LWP 26369)]
[Thread 0x7fffa5b45700 (LWP 26369) exited]
[Thread 0x7fff8ffff700 (LWP 25970) exited]
[New Thread 0x7fff8ffff700 (LWP 26370)]
[Thread 0x7fffd282b700 (LWP 25943) exited]
[New Thread 0x7fffd282b700 (LWP 26371)]
[Thread 0x7fffd1dee700 (LWP 25931) exited]
warn:legacy.osl:25906:1:package/source/zippackage/ZipPackageStream.cxx:486: Exception is thrown during stream wrapping!

warn:legacy.osl:25906:1:package/source/zippackage/ZipPackageFolder.cxx:392: ZipPackageStream didn't have a stream associated with it, skipping!
warn:legacy.osl:25906:1:dbaccess/source/core/dataaccess/ModelImpl.cxx:895: caught an exception!
in function:static bool dbaccess::ODatabaseModelImpl::commitStorageIfWriteable_ignoreErrors(const com::sun::star::uno::Reference<com::sun::star::embed::XStorage>&)
type: com.sun.star.embed.StorageWrappedTargetException
message: /opt/Development/libo/core/package/source/xstor/xstorage.cxx:4044: Problems on commit!
context: 8OStorage

warn:legacy.osl:25906:1:dbaccess/source/core/dataaccess/ModelImpl.cxx:804: ODatabaseModelImpl::commitRootStorage: could commit the storage!
warn:legacy.osl:25906:1:dbaccess/source/core/dataaccess/databasecontext.cxx:495: ODatabaseContext::storeTransientProperties: a non-empty data source which I do not know?!
[Thread 0x7fffd3fff700 (LWP 25917) exited]
[Thread 0x7fff8ffff700 (LWP 26370) exited]
[New Thread 0x7fff8ffff700 (LWP 26372)]
[Thread 0x7fff8ffff700 (LWP 26372) exited]
warn:tools.debug:25906:1:tools/source/debug/debug.cxx:1121: no DbgTestSolarMutex function set
warn:tools.debug:25906:1:tools/source/debug/debug.cxx:1121: no DbgTestSolarMutex function set
warn:tools.debug:25906:1:tools/source/debug/debug.cxx:1121: no DbgTestSolarMutex function set
warn:tools.debug:25906:1:tools/source/debug/debug.cxx:1121: no DbgTestSolarMutex function set
[Thread 0x7fff8cff9700 (LWP 26261) exited]
[Thread 0x7fffdb7c3700 (LWP 25915) exited]
[Thread 0x7fffd302c700 (LWP 25920) exited]
[Thread 0x7fffba151700 (LWP 25942) exited]

Program received signal SIGABRT, Aborted.
0x00007ffff74bdf77 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56	../nptl/sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier de ce type.


I've opened bug 76179 for the DbgTestSolarMutex message. However, I don't like the look of the SIGABRT and the failed storage commit.
Comment 13 Alex Thurgood 2014-03-14 17:18:01 UTC
(gdb) bt full
#0  0x00007ffff74bdf77 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
        resultvar = 0
        pid = 25906
        selftid = 25906
#1  0x00007ffff74c15e8 in __GI_abort () at abort.c:90
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, 
          sa_mask = {__val = {0, 140737488345520, 140737351945333, 5, 0, 
              140737332566208, 140737342135528, 0, 140737488345520, 1, 
              140737351972645, 335544382, 27530000, 0, 140737488345360, 
              27529952}}, sa_flags = -10416, 
          sa_restorer = 0x7ffff75d0000 <__memcpy_ssse3+6784>}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007fffb2ad8e58 in (anonymous namespace)::cleanError (e=0x1a412e0)
    at ../src/common/classes/init.cpp:50
        status = {1, 335544382, 2, 140736818580664, 0, 0, 140736197224416, 
          140737332566208, 0, 140737488345568, 1, 140737351972645, 27529920, 
          140737488345528, 1, 140736191107416, 27529920, 140737488344912, 
          140737332869900, 140737332869433}
#3  0x00007fffb2ad917e in Firebird::InstanceControl::InstanceList::destructors
    () at ../src/common/classes/init.cpp:201
        e = @0x1a412e0: {_vptr.Exception = 0x7fffb2fe86b0 <vtable for Firebird::status_exception+16>}
        i = 0x7fffd8141ce8
        currentPriority = Firebird::InstanceControl::PRIORITY_REGULAR
        nextPriority = Firebird::InstanceControl::PRIORITY_REGULAR
#4  0x00007fffb2ad9025 in Firebird::InstanceControl::destructors ()
    at ../src/common/classes/init.cpp:178
No locals.
#5  0x00007fffb2ad8e61 in (anonymous namespace)::allClean ()
    at ../src/common/classes/init.cpp:61
No locals.
#6  0x00007fffb2ad8eb1 in (anonymous namespace)::Cleanup::~Cleanup (
    this=0x7fffb30ae7a9 <(anonymous namespace)::global>, 
    __in_chrg=<optimized out>) at ../src/common/classes/init.cpp:89
No locals.
#7  0x00007ffff74c3071 in __run_exit_handlers (status=0, 
    listp=0x7ffff78486a8 <__exit_funcs>, 
    run_list_atexit=run_list_atexit@entry=true) at exit.c:77
        atfct = <optimized out>
        onfct = <optimized out>
        cxafct = <optimized out>
        f = <optimized out>
#8  0x00007ffff74c30f5 in __GI_exit (status=<optimized out>) at exit.c:99
No locals.
#9  0x00007ffff74a8dec in __libc_start_main (main=0x400925 <main>, argc=1, 
    ubp_av=0x7fffffffdb58, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffdb48) at libc-start.c:294
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -158779015703497496, 
                4196352, 140737488345936, 0, 0, 158779014519256296, 
                158762635155666152}, mask_was_saved = 0}}, priv = {pad = {0x0, 
              0x0, 0x400980 <__libc_csu_init>, 0x7fffffffdb58}, data = {
              prev = 0x0, cleanup = 0x0, canceltype = 4196736}}}
        not_first_call = <optimized out>
#10 0x0000000000400829 in _start ()
No symbol table info available.
Comment 14 Alex Thurgood 2015-01-03 17:39:27 UTC Comment hidden (no-value)
Comment 15 QA Administrators 2016-01-17 20:04:47 UTC Comment hidden (obsolete)
Comment 16 ribotb 2016-01-18 18:22:21 UTC
(In reply to ribotb from comment #9)
> Hi Alex,
> 
> In the list of formats that can be imported into a BLOB field, there is no
> video format except MOV, there are only image formats. The presence of the
> MOV format in the list seems incongruous and might be an error?
> 
> I tried to import MOV video, but nothing appears in the control associated 
> in my form.
> 
> I verified in my Firebird SQL Server 2.5, the video formats accepted are
> only AVI and MPEG.
> 
> Bernard

Same thing with :
Version: 5.1.0.2
Build ID: ecd3574d51754b043f865cf5bafee286d24db7cc
CPU Threads: 2; OS Version: Windows 6.1; UI Render: default; 
Locale : fr-FR (fr_FR)
on Win7/x86

I agree with Alex : 
"... excluding video formats from the list of supported file types for that particular dialog ?"

This format is not in Firebird SQL Server 2.5 and it is the only video format in the list in this Base dialog.

Bernard
Comment 17 QA Administrators 2018-02-08 03:35:21 UTC Comment hidden (obsolete)
Comment 18 Alex Thurgood 2018-05-29 07:59:48 UTC
Testing with

Version: 6.2.0.0.alpha0+
Build ID: 7f3c2ee6c135773c98ded063bdf10ec8900bf00f
CPU threads: 4; OS: Mac OS X 10.13.4; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group threaded

still allows MOV files to be considered as an image and inserted into the database in a BLOB(Image) field, although nothing is displayed via the form control.

Other video formats are greyed out and can not be inserted via the Finder/File Manager in this way.

At least LO doesn't hang anymore, but the MOV mimetype can still be inserted, which is clearly wrong with regard to other video formats.
Comment 19 QA Administrators 2019-12-05 04:26:32 UTC Comment hidden (obsolete)
Comment 20 Alex Thurgood 2019-12-05 11:03:03 UTC
With the change to the BLOB management code, this now WFM
Comment 21 Alex Thurgood 2019-12-05 11:04:49 UTC
By WFM, I mean that I don't see any noticeable slowdown in navigating from one record to the next, and video file format inserts are permitted and stored in the database (although not visible or playable, but that wasn't the object of the original report)