resucutie / localbooru

Cross platform local booru collection that exclusively works on local storage, without selfhosting
GNU General Public License v3.0
26 stars 1 forks source link

Bug: Errors on editing metadata to an image #14

Open admbeck opened 1 month ago

admbeck commented 1 month ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Open an imported image and edit tags
  2. Click Done to save changes
  3. Various errors appear on the screen and in the terminal
  4. After several repeated clicks metadata saves successfully

Expected behavior For metadata to be written on first click without errors

Screenshots Error 1

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
#0      State.context (package:flutter/src/widgets/framework.dart:958)
#1      _ImageManagerViewState._submit (package:localbooru/views/image_manager/index.dart:111)
<asynchronous suspension>

Error 2

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Unexpected end of input (at character 1)

^

#0      _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1380)
#1      _ChunkedJsonParser.close (dart:convert-patch/convert_patch.dart:498)
#2      _parseJson (dart:convert-patch/convert_patch.dart:36)
#3      JsonDecoder.convert (dart:convert/json.dart:610)
#4      JsonCodec.decode (dart:convert/json.dart:216)
#5      jsonDecode (dart:convert/json.dart:155)
#6      Booru.getRawInfo (package:localbooru/api/readable.dart:15)
<asynchronous suspension>
#7      Booru.getImage (package:localbooru/api/readable.dart:25)
<asynchronous suspension>
#8      Booru.getImagesFromRange (package:localbooru/api/readable.dart:66)
<asynchronous suspension>
#9      Booru.getImagesFromIndex (package:localbooru/api/readable.dart:80)
<asynchronous suspension>
#10     Booru.searchByTags (package:localbooru/api/readable.dart:96)
<asynchronous suspension>
#11     _GalleryViewerState._obtainResults (package:localbooru/views/navigation/tag_browse.dart:110)
<asynchronous suspension>

Error 3

flutter: Another exception was thrown: Instance of 'DiagnosticsProperty<void>'

System information: Device 1

Device 2

Additional context Errors appear on both windows and linux versions of the application

admbeck commented 4 weeks ago

Error 3 occurs when an extra space is present in one of the tag fields. If there are spaces in multiple tag types then image won't be saved and there are no error messages.

admbeck commented 3 weeks ago

image

resucutie commented 3 weeks ago

Some things:

So I am hoping all of it is already fixed, tho I've personally saw issues related to flashing errors when editing images, but my memory is foggy when it comes to "when"

resucutie commented 1 week ago

May you test if images get edited on 1.6.0-prerelease1?