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

[Attached feature] Crash when handling large images (beta) #24

Closed
dev-zzo opened this issue Nov 7, 2023 · 6 comments · Fixed by #25
Closed

[Attached feature] Crash when handling large images (beta) #24

dev-zzo opened this issue Nov 7, 2023 · 6 comments · Fixed by #25
Assignees
Labels
bug Something isn't working

Comments

@dev-zzo
Copy link

dev-zzo commented Nov 7, 2023

Describe the bug
Degate seems to be unable to handle large images in the latest version with the 'attached' project type.

To Reproduce
Steps to reproduce the behavior:

  1. Create a JPEG of 53675x24205 pixels
  2. Create a new 'attached' project
  3. Use that JPEG as one of the layers
  4. Zoom in on the image several times (I counted about 21 click on the + button), at some point the program hangs and crashes

I also tested the half-sized image with the same result.

Expected behavior
There should be no crashing.

Desktop (please complete the following information):

  • OS: Windows
  • Version: 2.1.0-1
@DorianBDev
Copy link
Member

Hi! Thanks for this bug report. I think the issue comes from thread count exhaustion since Degate will try to load image chunks around each position, and at each zoom level. With a big image this might lag behind since loading takes time, and thread count might just explode and make Degate hang/crash.

I'll try to address the issue by changing a bit the loading system, but that might take some time. A possible workaround before landing a fix could be to reduce some parameters to lower values in preferences. I'll try to add some status update soon.

@DorianBDev DorianBDev added the bug Something isn't working label Nov 7, 2023
@DorianBDev DorianBDev linked a pull request Nov 7, 2023 that will close this issue
7 tasks
@DorianBDev DorianBDev removed a link to a pull request Nov 7, 2023
7 tasks
@DorianBDev DorianBDev linked a pull request Nov 8, 2023 that will close this issue
7 tasks
@DorianBDev
Copy link
Member

@dev-zzo Could you confirm that Degate was initially loading the image (you were able to see it), but after zooming multiple time it freezes and crash?

@dev-zzo
Copy link
Author

dev-zzo commented Nov 12, 2023

With the 'attached' project type, that is the observed behaviour indeed.

@DorianBDev
Copy link
Member

A small update on the issue: I might have found an algorithm that'll fix the problem. However it might take some time to experiment and find the best variant. I'll also add a visual indicator when a tile is loading, and make sure even under heavy load Degate will not crash/freeze (in worse case loading will just be very slow). I'm really busy for the end of the year, but I hope I'll land a fix (and new beta version) before the new year.

@DorianBDev DorianBDev changed the title Crash when handling large images [Attached feature] Crash when handling large images (beta) Nov 19, 2023
@DorianBDev
Copy link
Member

I should have fixed the issue with 77631e1. I'll do more tests and a bit of cleanup before creating & merging a PR. I regret not having had more time before to tackle the issue (which did not take long to resolve).

@DorianBDev
Copy link
Member

A fix landed in the new 2.1.0-beta.2 pre-release. Pre-built binaries are available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants