Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xournalpp freezes when changing following page size from A4 to A5 #1660

Closed
ethpi opened this issue Dec 11, 2019 · 4 comments · Fixed by #1907
Closed

Xournalpp freezes when changing following page size from A4 to A5 #1660

ethpi opened this issue Dec 11, 2019 · 4 comments · Fixed by #1907
Labels
bug confirmed Bug has been reproduced by at least one other person papercut User can get around easily... but can be annoying. priority::high regression This issue is about a regression from the previous release; or this PR fixes a regression. Zoom Every issue connected to zoom

Comments

@ethpi
Copy link

ethpi commented Dec 11, 2019

Affects versions :

  • OS: Kubuntu 18.04.3 LTS
  • KDE/PLASMA shipped with Kubuntu 18.04.3 LTS
  • libgtk 3.0 (3.22.30-1ubuntu4)
  • Version of Xournal++ 1.1.0+dev

Describe the bug
xournalpp window freezes, when changing the page size from a following page to a smaller format.

To Reproduce
Steps to reproduce the behavior:

  1. Open new document.
  2. Insert a second page.
  3. Change the second page size from e.g. A4 to A5.

Expected behavior
xournal++ window freezes, after about 30s it terminates with the console error message
"Speicherzugriffsfehler (Speicherabzug geschrieben)"

Shall I attach the core dump? It's a file of more than 5MB! There is no error log made by xournalpp.

Additional context
With the version 1.0.16 it's no problem to create a document with a second smaller page.
I have a few journals created with a 1.0.x version, that I can't open with 1.1.0+dev. When I try to open these old journals, the xournalpp window freezes.
When I unzipped these journals, changed all lines containing

<page width="611.99998270" height="791.99998270">

to

<page width="595.27000000" height="841.89000000">

then I can reopen these old journals with the 1.1.0+dev version. The freezing seems to belong to different page sizes.

@ethpi ethpi added the bug label Dec 11, 2019
@Technius Technius added priority::high confirmed Bug has been reproduced by at least one other person labels Dec 11, 2019
@Technius
Copy link
Member

Appears to be a stack overflow caused by ZoomControl: changing the paper size calls ZoomControl::pageSizeChanged, which leads to the zoom value getting updated, which triggers the scroll value getting updated, which then triggers a page selection, which then triggers the zoom value getting updated again, which triggers the scroll value getting updated...

I'm guessing this is a regression due to 6c2b7a7.

@Technius Technius added the Zoom Every issue connected to zoom label Dec 11, 2019
@Technius
Copy link
Member

Technius commented Jan 4, 2020

A temporary user workaround is to disable zoom fit mode (the icon with the square corner cutouts).

Edit: in other words, this bug only occurs when zoom fit is enabled.

@Technius Technius added the papercut User can get around easily... but can be annoying. label Jan 4, 2020
@Technius Technius added the PR available There is currently an implementation in review that fixes this issue label Jan 4, 2020
@Technius
Copy link
Member

Technius commented Jan 4, 2020

Very closely related to #1608.

@Technius
Copy link
Member

Instead of waiting for the viewport rewrite (e.g. the "perfect" solution), I'll see if I can get a hotfix for this out this week...

Technius added a commit to Technius/xournalpp that referenced this issue Apr 26, 2020
Technius added a commit to Technius/xournalpp that referenced this issue Apr 26, 2020
@Technius Technius added the regression This issue is about a regression from the previous release; or this PR fixes a regression. label Apr 26, 2020
@Technius Technius removed this from the v1.1.0 milestone Apr 26, 2020
@Technius Technius unpinned this issue May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed Bug has been reproduced by at least one other person papercut User can get around easily... but can be annoying. priority::high regression This issue is about a regression from the previous release; or this PR fixes a regression. Zoom Every issue connected to zoom
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants