[Libreoffice] Cannot save .ods and .odt files
Something has been bothering me for a while: ever since I succeeded in building a LibreOffice binary for DragonFly BSD, I haven't been able to save OpenDocument format files. The dialog box just closes itself and reopens half a second later. No file is written to disk. Saving .fods and .fodt files works fine. How can I know what exactly is going wrong ? -- Francois Tigeot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] Cannot save .ods and .odt files
At 3:11am -0500 Mon, 07 Mar 2011, Francois Tigeot wrote: Something has been bothering me for a while: ever since I succeeded in building a LibreOffice binary for DragonFly BSD, I haven't been able to save OpenDocument format files. The dialog box just closes itself and reopens half a second later. No file is written to disk. Saving .fods and .fodt files works fine. How can I know what exactly is going wrong ? Are you asking about inserting debugging statements? If so, then you may appreciate the OSL_TRACE macro, which has a signature exactly like printf. (And if not, please allow me to hijack this thread to explain what I recently figured out for anyone else who may find this useful.) OSL_TRACE( %d: %s = %s\n, __LINE__, myvar, myvar ); To enable that in a module output (for example sc), build with the debug flags: $ . LinuxX86-64Env.Set.sh $ cd sc $ build debug=true dbglevel=2 I haven't yet messed with other dbglevels, but you could start from 1 and see if any other levels better fit your needs. And clearly update the LinuxX... bit to whatever's pertinent for you. Then, the code-build cycle could be as simple as adding an OSL_TRACE and executing that build command again. *Note that for debugging like this, after you've run make dev-install in the root directory, you don't need to execute it again after building a follow-up. So, a build, code, and debug run on my machine might look like: $ make clean $ make # wait for 2+ hours on my machine $ make dev-install $ LODEV_PROG=$(pwd)/install/program/soffice $ . LinuxX86-64Env.Set.sh $ cd sc $ $LODEV_PROG # run the program # make a code change $ build debug=true dbglevel=2 $ $LODEV_PROG # run the program # make a code change $ build debug=true dbglevel=2 $ $LODEV_PROG # run the program # etc ... Hope this helps, Kevin ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] Cannot save .ods and .odt files
Hi there, On Mon, 2011-03-07 at 09:11 +0100, Francois Tigeot wrote: Something has been bothering me for a while: ever since I succeeded in building a LibreOffice binary for DragonFly BSD, I haven't been able to save OpenDocument format files. It sounds bothersome indeed. The dialog box just closes itself and reopens half a second later. No file is written to disk. What fun :-) you mentioned that your libc is missing a load of methods, I would suspect something like file-locking to be a problem here. Do you have an 'strace' equivalent you can use to see what syscalls fail ? you could try unsetting SAL_ENABLE_FILE_LOCKING in the soffice wrapper to see if that helps. Saving .fods and .fodt files works fine. Comic :-) How can I know what exactly is going wrong ? Good question; I would get a Linux and BSD system side by side, and put some break-points in ucb/source/ucp/file/filstr.cxx - or somewhere around there, and see how they behave on both sides of the equation. HTH, Michael. -- michael.me...@novell.com , Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] Cannot save .ods and .odt files
Hi Kevin, Thanks for the help. On Mon, Mar 07, 2011 at 07:02:30AM -0500, Kevin Hunter wrote: At 3:11am -0500 Mon, 07 Mar 2011, Francois Tigeot wrote: The dialog box just closes itself and reopens half a second later. No file is written to disk. Saving .fods and .fodt files works fine. How can I know what exactly is going wrong ? Are you asking about inserting debugging statements? I hoped to find some way to print more details at runtime. If I can't do it with an existing binary, I'll rebuild a new one with your debug suggestions. -- Francois Tigeot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] Cannot save .ods and .odt files
Hi Michael, On Mon, Mar 07, 2011 at 12:38:28PM +, Michael Meeks wrote: On Mon, 2011-03-07 at 09:11 +0100, Francois Tigeot wrote: The dialog box just closes itself and reopens half a second later. No file is written to disk. What fun :-) Yeah :-/ you mentioned that your libc is missing a load of methods, Not many; basically nobody bothered implementing correctly the __cxa_finalize C++ destructor stuff. So far, it seems LibO is the only application which needs it. I would suspect something like file-locking to be a problem here. Do you have an 'strace' equivalent you can use to see what syscalls fail ? truss is the strace equivalent but it stops printing anything after the initial LibO launch. There's nothing shown when I save a file. you could try unsetting SAL_ENABLE_FILE_LOCKING in the soffice wrapper to see if that helps. It doesn't change anything. Saving .fods and .fodt files works fine. Comic :-) In a sort of perverse way ;-) How can I know what exactly is going wrong ? Good question; I would get a Linux and BSD system side by side, and put some break-points in ucb/source/ucp/file/filstr.cxx - or somewhere around there, and see how they behave on both sides of the equation. The file locking stuff reminds me, at one time I ran an OpenOffice Linux binary on this machine (most BSD systems have some sort of kernel personality layer which allows them to run Linux binaries unmodified), and it kept crashing if the filesystem it was stored on was HAMMER [1]. I could only run OpenOffice if it was stored on a traditionnal UFS [2] volume. I never figured out what was really wrong at the time but couldn't help thinking OO was trying to access some low-level fs data it shouldn't have had to touch... [1]: HAMMER is the native DragonFly filesystem. It is quite different from most common *nix fs: it is constantly snapshoted, you can stream a volume to a remote read-only backup copy, etc... More information here: http://www.dragonflybsd.org/hammer/ [2]: Unix File System (fs from the eighties, similar to ext2) volume. http://en.wikipedia.org/wiki/Unix_File_System for details -- Francois Tigeot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] Cannot save .ods and .odt files
At 8:45am -0500 Mon, 07 Mar 2011, Francois Tigeot wrote: I would suspect something like file-locking to be a problem here. Do you have an 'strace' equivalent you can use to see what syscalls fail ? truss is the strace equivalent but it stops printing anything after the initial LibO launch. There's nothing shown when I save a file. Does truss have the ability to follow child processes? It's been awhile, but I believe strace has this capability via -ff and -o. You'll know your man page better than me of course, but I was able to find this from a few years ago in my Bash history: $ strace -ffo /tmp/$DEVNAME $DEVBIN Which I believe created a bunch of files in strace output files in /tmp. In other words, LO forks itself a number of times, which is why when you run it from the command line without backgrounding it, it returns control to the shell almost immediately. Cheers, Kevin ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] Cannot save .ods and .odt files
At 7:54am -0500 Mon, 07 Mar 2011, Francois Tigeot wrote: On Mon, Mar 07, 2011 at 07:02:30AM -0500, Kevin Hunter wrote: Are you asking about inserting debugging statements? I hoped to find some way to print more details at runtime. If I can't do it with an existing binary, I'll rebuild a new one with your debug suggestions. Ah, heh. Does that imply a debugger of sorts? I use debuggers, but generally try to use them as a *very* last resort. I'm much more fond of printf or equivalent. Or are you talking about something more programmatic? I've recently gone down the path of running LO as a server, and using UNO via Python (PyUNO) to talk to it. I have a working example that opens a file, saves it to another format, then closes it, if that would be of use to anyone. Or was the strace/truss talk more of what you were after? Cheers, Kevin ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] Cannot save .ods and .odt files
At 10:51am -0500 Mon, 07 Mar 2011, Francois Tigeot wrote: Well, I was also thinking about a printf-like solution. I just hoped to not have to rebuild a binary, it takes almost two hours and a half... That's just it: you don't have to rebuild the whole of LO. By using 'make dev-install', you can just build the module with which you're working. Depending on how fundamental the change, you can be up and running within 20 seconds of saving a file. That's the build step. From my earlier email: $ . LinuxX86-64Env.Set.sh $ cd sc # in this case, I'm working on the sc module $ build debug=true dbglevel=2 For a simple change in a file not referenced by other source files, that build command might take 20 seconds. Then just rerun the program and you'll see your changes enacted. No need to rebuild everything. Does that help? Kevin ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] Cannot save .ods and .odt files
On Mon, Mar 07, 2011 at 11:35:15AM -0500, Kevin Hunter wrote: At 10:51am -0500 Mon, 07 Mar 2011, Francois Tigeot wrote: Well, I was also thinking about a printf-like solution. I just hoped to not have to rebuild a binary, it takes almost two hours and a half... That's just it: you don't have to rebuild the whole of LO. By using [...] Does that help? Sorta. I have just upgraded my compiler and had to do a make clean to be sure everything was build with the right gcc version :/ -- Francois Tigeot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] Cannot save .ods and .odt files
On Mon, Mar 07, 2011 at 03:43:27PM +, Michael Meeks wrote: On Mon, 2011-03-07 at 15:34 +0100, Francois Tigeot wrote: The output is almost unreadable: it seems LO constantly runs poll() and gettimeofday(). That would be interacting with the X server ;-) try not to use the mouse when tracing eg. It's doing it even if I don't touch anything; it must be one of the issues draining battery life on laptops... LibO tries to access() the new file name 6 times: 3 without '.ods' and 3 with it. Well; the trace around where that filename is accessed is going to be where it fails I guess; you are certain that the save location is write-able ? :-) does it give you an error dialog ? or a silent failure ? The location is writeable, I have no problem saving .fods files in this directory. I'm not sure if this is related, but I also get many error messages like this when I open an existing document: Error: File /home/ftigeot/Projects/LibreOffice/bootstrap/clone/filters/filter/source/config/cache/filtercache.cxx, Line 1706: Fallback scenario for filter or type 'writer8' and locale 'en' failed. Please check your filter configuration. -- Francois Tigeot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice