elementary / elementary/photos

Crash when disk is full while importing

Open
#752 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Vala
Stars
104
Forks
40
Avg merge
2d 39m
Merged PRs (30d)
1

Description

### What Happened?

.

### Steps to Reproduce

0. have less storage free (e.g. 2GB) than the media to import (e.g. 13GB)
1. start photos
2. start import
3. crash

### Expected Behavior

A program should never crash!

Check if enough space is free before starting the import.

### OS Version

6.x (Odin/Jólnir)

### Software Version

Latest release (I have run all updates)

### Log Output

```shell
Terminal:

...
** Message: 17:44:27.299: ImportPage.vala:1723: Skipping import of DSCF6571.RAF: checksum detected in library
** Message: 17:44:27.299: ImportPage.vala:1723: Skipping import of DSCF6578.RAF: checksum detected in library
** Message: 17:44:27.299: ImportPage.vala:1723: Skipping import of DSCF6582.RAF: checksum detected in library

(io.elementary.photos:172599): Gtk-WARNING **: 17:44:27.817: drawing failure for widget 'LibraryWindow': cairo_restore() without matching cairo_save()

** (io.elementary.photos:172599): ERROR **: 17:45:25.090: DatabaseTable.vala:106: add_photo: [13] database or disk is full
Trace/breakpoint trap (core dumped)
```

### Hardware Info

elementary-photos-2.8.0

Contributor guide

Open the contributing guide

Research direction

Start with the import flow in ImportPage.vala and the failure reported at DatabaseTable.vala:106. Reproduce the import with less free storage than the media size, then trace how the disk-full error is handled. Done means the import fails gracefully without crashing when storage is exhausted.

Written by the indexing model from the issue text.

Assessment

Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.