Bug 260235 - kword:msoffice2007:While doing scrolling,kword is closing suddenly
Summary: kword:msoffice2007:While doing scrolling,kword is closing suddenly
Status: VERIFIED FIXED
Alias: None
Product: calligrawords
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-07 13:20 UTC by swathi
Modified: 2011-06-06 14:49 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Faure 2010-12-16 00:29:44 UTC


---- Reported by swathi.vegesna@wipro.com 2010-12-07 13:20:37 ----

Version:           svn (Rev: Essen revision 1202759) (using KDE 4.4.3) 
OS:                Kubuntu 10.04
Attached test data is in MS Word 2007 document.It has 23 pages in it.
When I opened the same document in Kword, while doing scrolling kword is closing suddenly.

Expected outcome:
Kword should not be closed.



--- Bug imported by faure@kde.org 2010-12-16 00:32  ---

This bug was previously known as bug 259108.

Comment 1 Inge Wallin 2010-12-16 15:09:06 UTC
Swathi: This bug lacks the attachment.
Comment 2 Sebastian Sauer 2011-01-12 02:02:07 UTC
waiting for the document :)
Comment 3 swathi 2011-03-01 08:30:24 UTC
I am not able to attach the test data since it is more than 3 MB.
Comment 4 swathi 2011-05-26 10:13:47 UTC
Verified in a1891d19b515a8aead2d39f482546eaf22fbc037.
Comment 5 swathi 2011-05-30 07:59:58 UTC
By mistake,this bug was marked as Verified.So reopening.
Tested  in 70e1b6e65bcc89bffdd1ba4c9903469827c2c213,still issue is observed.
Comment 6 swathi 2011-05-30 08:00:20 UTC
Another test data with same issue 
http://people.wku.edu/michael.mcdonald/Classes/SEC473/PLVS%20DOK%20Part%20II.docx
Comment 7 T Zachmann 2011-05-30 09:04:43 UTC
The problem happens when there are different sized pages and you are in zoom mode fit to page.

Problem is that the the position is changed due to the fact we reach a page that have a different size. Due to this we come back to a different page again and then this goes on until the stack overflows.

Here is part of the backtrace:

#0  0x00007ffff1af3893 in _IO_vfprintf_internal (s=0x7fffff801470, format=0x7ffff279cfc3 "%s\n", ap=0x7fffff801c50) at vfprintf.c:245
#1  0x00007ffff1af8c94 in buffered_vfprintf (s=0x7ffff1e3b9c0, format=<value optimized out>, args=<value optimized out>) at vfprintf.c:2260
#2  0x00007ffff1af3a7e in _IO_vfprintf_internal (s=0x7ffff1e3b9c0, format=0x7ffff279cfc3 "%s\n", ap=0x7fffff801c50) at vfprintf.c:1306
#3  0x00007ffff1baaac8 in ___fprintf_chk (fp=0x7ffff1e3b9c0, flag=1, format=<value optimized out>) at fprintf_chk.c:37
#4  0x00007ffff264dac1 in fprintf (msgType=QtWarningMsg, buf=<value optimized out>) at /usr/include/bits/stdio2.h:99
#5  qt_message_output (msgType=QtWarningMsg, buf=<value optimized out>) at global/qglobal.cpp:2248
#6  0x00007ffff264dc8f in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtWarningMsg, msg=0x7ffff27ce218 "QString::arg: Argument missing: %s, %s", 
    ap=0x7fffff801de0) at global/qglobal.cpp:2328
#7  0x00007ffff264e3f1 in qWarning (msg=<value optimized out>) at global/qglobal.cpp:2410
#8  0x00007ffff269c4ee in QString::arg (this=0x7fffff802010, a=<value optimized out>, fieldWidth=0, fillChar=...) at tools/qstring.cpp:6484
#9  0x00007fffe166834f in KWStatusBar::updatePageSize (this=0x1e96250) at /home/tz/develop/kde/git/calligra/words/part/KWStatusBar.cpp:201
#10 0x00007fffe16686dd in KWStatusBar::resourceChanged (this=0x1e96250, key=5, value=...) at /home/tz/develop/kde/git/calligra/words/part/KWStatusBar.cpp:231
#11 0x00007fffe16309d3 in KWStatusBar::qt_metacall (this=0x1e96250, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7fffff8021e0)
    at /home/ko2/calligra-build/words/part/moc_KWStatusBar.cpp:107
#12 0x00007ffff27535f8 in QMetaObject::activate (sender=0x15ae4b0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffff8021e0) at kernel/qobject.cpp:3287
#13 0x00007ffff6ee61ee in KoResourceManager::resourceChanged (this=0x15ae4b0, _t1=5, _t2=...) at /home/ko2/calligra-build/libs/flake/KoResourceManager.moc:85
#14 0x00007ffff6ee5446 in KoResourceManager::setResource (this=0x15ae4b0, key=5, value=...) at /home/tz/develop/kde/git/calligra/libs/flake/KoResourceManager.cpp:57
#15 0x00007fffe16543ed in KWView::setCurrentPage (this=0x1383b40, currentPage=...) at /home/tz/develop/kde/git/calligra/words/part/KWView.cpp:1445
#16 0x00007fffe1654b6c in KWView::offsetInDocumentMoved (this=0x1383b40, yOffset=-2362) at /home/tz/develop/kde/git/calligra/words/part/KWView.cpp:1518
#17 0x00007fffe16312af in KWView::qt_metacall (this=0x1383b40, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffff8024a0) at /home/ko2/calligra-build/words/part/moc_KWView.cpp:139
#18 0x00007ffff27535f8 in QMetaObject::activate (sender=0x15fcc80, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffff8024a0) at kernel/qobject.cpp:3287
#19 0x00007ffff6f312d8 in KoCanvasControllerProxyObject::canvasOffsetYChanged (this=0x15fcc80, _t1=-2362) at /home/ko2/calligra-build/libs/flake/KoCanvasController.moc:138
#20 0x00007ffff6f34b00 in KoCanvasControllerProxyObject::emitCanvasOffsetYChanged (this=0x15fcc80, offset=-2362) at /home/tz/develop/kde/git/calligra/libs/flake/KoCanvasController.h:339
#21 0x00007ffff6f32b0b in KoCanvasControllerWidget::updateCanvasOffsetY (this=0x15aeac0) at /home/tz/develop/kde/git/calligra/libs/flake/KoCanvasControllerWidget.cpp:397
#22 0x00007ffff6f33bbb in KoCanvasControllerWidget::updateDocumentSize (this=0x15aeac0, sz=..., recalculateCenter=true)
    at /home/tz/develop/kde/git/calligra/libs/flake/KoCanvasControllerWidget.cpp:552
#23 0x00007ffff75d146b in KoZoomController::setZoom (this=0x1e63c60, mode=KoZoomMode::ZOOM_PAGE, zoom=0.57575657832323079)
    at /home/tz/develop/kde/git/calligra/libs/widgets/KoZoomController.cpp:174
#24 0x00007ffff75d0e9e in KoZoomController::setPageSize (this=0x1e63c60, pageSize=...) at /home/tz/develop/kde/git/calligra/libs/widgets/KoZoomController.cpp:123
#25 0x00007fffe1654453 in KWView::setCurrentPage (this=0x1383b40, currentPage=...) at /home/tz/develop/kde/git/calligra/words/part/KWView.cpp:1446
#26 0x00007fffe1654b6c in KWView::offsetInDocumentMoved (this=0x1383b40, yOffset=-2362) at /home/tz/develop/kde/git/calligra/words/part/KWView.cpp:1518
#27 0x00007fffe16312af in KWView::qt_metacall (this=0x1383b40, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffff802920) at /home/ko2/calligra-build/words/part/moc_KWView.cpp:139
#28 0x00007ffff27535f8 in QMetaObject::activate (sender=0x15fcc80, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffff802920) at kernel/qobject.cpp:3287
#29 0x00007ffff6f312d8 in KoCanvasControllerProxyObject::canvasOffsetYChanged (this=0x15fcc80, _t1=-2362) at /home/ko2/calligra-build/libs/flake/KoCanvasController.moc:138
#30 0x00007ffff6f34b00 in KoCanvasControllerProxyObject::emitCanvasOffsetYChanged (this=0x15fcc80, offset=-2362) at /home/tz/develop/kde/git/calligra/libs/flake/KoCanvasController.h:339
#31 0x00007ffff6f32b0b in KoCanvasControllerWidget::updateCanvasOffsetY (this=0x15aeac0) at /home/tz/develop/kde/git/calligra/libs/flake/KoCanvasControllerWidget.cpp:397
#32 0x00007ffff6f33bbb in KoCanvasControllerWidget::updateDocumentSize (this=0x15aeac0, sz=..., recalculateCenter=true)
    at /home/tz/develop/kde/git/calligra/libs/flake/KoCanvasControllerWidget.cpp:552
#33 0x00007ffff75d146b in KoZoomController::setZoom (this=0x1e63c60, mode=KoZoomMode::ZOOM_PAGE, zoom=0.74509674841829865)
    at /home/tz/develop/kde/git/calligra/libs/widgets/KoZoomController.cpp:174
#34 0x00007ffff75d0e9e in KoZoomController::setPageSize (this=0x1e63c60, pageSize=...) at /home/tz/develop/kde/git/calligra/libs/widgets/KoZoomController.cpp:123
#35 0x00007fffe1654453 in KWView::setCurrentPage (this=0x1383b40, currentPage=...) at /home/tz/develop/kde/git/calligra/words/part/KWView.cpp:1446
#36 0x00007fffe1654b6c in KWView::offsetInDocumentMoved (this=0x1383b40, yOffset=-2362) at /home/tz/develop/kde/git/calligra/words/part/KWView.cpp:1518
#37 0x00007fffe16312af in KWView::qt_metacall (this=0x1383b40, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffff802da0) at /home/ko2/calligra-build/words/part/moc_KWView.cpp:139
#38 0x00007ffff27535f8 in QMetaObject::activate (sender=0x15fcc80, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffff802da0) at kernel/qobject.cpp:3287
#39 0x00007ffff6f312d8 in KoCanvasControllerProxyObject::canvasOffsetYChanged (this=0x15fcc80, _t1=-2362) at /home/ko2/calligra-build/libs/flake/KoCanvasController.moc:138
#40 0x00007ffff6f34b00 in KoCanvasControllerProxyObject::emitCanvasOffsetYChanged (this=0x15fcc80, offset=-2362) at /home/tz/develop/kde/git/calligra/libs/flake/KoCanvasController.h:339
#41 0x00007ffff6f32b0b in KoCanvasControllerWidget::updateCanvasOffsetY (this=0x15aeac0) at /home/tz/develop/kde/git/calligra/libs/flake/KoCanvasControllerWidget.cpp:397
#42 0x00007ffff6f33bbb in KoCanvasControllerWidget::updateDocumentSize (this=0x15aeac0, sz=..., recalculateCenter=true)
....

and this goes on for a very long time
Comment 8 Sebastian Sauer 2011-05-31 19:01:34 UTC
I would say that within KoCanvasControllerWidget::updateDocumentSize our calculation to keep the x/y center if zoom changed is wrong. That is we need to somehow adjust the preferredCenterFractionX+preferredCenterFractionY for the case recalculateCenter==true so we don't change the x/y-offset just because the zoom changes.
Comment 9 Halla Rempt 2011-06-03 20:41:46 UTC
Git commit 238f4d3a19df3f3ebc33d7b8b24c452a656dcaf4 by Boudewijn Rempt.
Committed on 03/06/2011 at 20:31.
Pushed by rempt into branch 'master'.

Make Words handle documents with variable page sizes sensibly

When in zoom-to-page or zoom-to-page-width mode we want to see all pages
fully or to their full width. So cache the largest pagesize we've encountered
and use that to set the zoomcontroller's page size.

This also fixes the existential uncertainty of words what its page size
is for zooming purposes when it needs to show two differently sized pages
at the same time.
BUG:260235

M  +9    -1    words/part/KWView.cpp     
M  +3    -0    words/part/KWView.h     

http://commits.kde.org/calligra/238f4d3a19df3f3ebc33d7b8b24c452a656dcaf4
Comment 10 swathi 2011-06-06 14:49:46 UTC
Verified in 9a54655da37b07ee9e670d9f537a8922afc26030.