juzzlin / Heimer

Heimer is a simple cross-platform mind map, diagram, and note-taking tool written in Qt.
GNU General Public License v3.0
887 stars 112 forks source link

Attached node background images not loading #226

Closed scallyob closed 1 year ago

scallyob commented 1 year ago

I created a *.alz file using version 3.0.0, then tried to open it later. Images do not display. and when I click on an object that should have an image in it the app crashes giving the messages below.

I tried opening in 3.6.1 and got same results.

$ ./Heimer-3.6.1-x86_64.AppImage 
Mon Oct 31 00:09:48 2022 [I] Heimer version 3.6.1
Mon Oct 31 00:09:48 2022 [I] Copyright (c) 2018-2022 Jussi Lind
Mon Oct 31 00:09:48 2022 [I] Compiled against Qt version 5.9.5
Mon Oct 31 00:09:48 2022 [I] Trying Qt translations for 'en-US'
Mon Oct 31 00:09:48 2022 [W] Failed to load Qt translations for 'en-US'
Mon Oct 31 00:09:48 2022 [I] Trying application translations for 'en-US'
Mon Oct 31 00:09:48 2022 [W] Failed to load application translations for 'en-US'
Mon Oct 31 00:09:49 2022 [I] 'Single arrow' set as active default
Mon Oct 31 00:09:55 2022 [I] Extracting embedded image id=3 to '/tmp/Heimer-iITG7f/w.jpeg'
Mon Oct 31 00:09:55 2022 [I] Bytes written: 2813, OK
Mon Oct 31 00:09:55 2022 [I] Extracting embedded image id=4 to '/tmp/Heimer-3oPuxi/h.jpeg'
Mon Oct 31 00:09:55 2022 [I] Bytes written: 13476, OK
Mon Oct 31 00:09:55 2022 [I] Extracting embedded image id=1 to '/tmp/Heimer-1IqGFf/m.jpeg'
Mon Oct 31 00:09:55 2022 [I] Bytes written: 5600, OK
Mon Oct 31 00:09:55 2022 [I] Extracting embedded image id=2 to '/tmp/Heimer-nntEDi/h.jpeg'
Mon Oct 31 00:09:55 2022 [I] Bytes written: 13476, OK
Mon Oct 31 00:09:55 2022 [I] Extracting embedded image id=5 to '/tmp/Heimer-GEHgig/h.jpeg'
Mon Oct 31 00:09:55 2022 [I] Bytes written: 13476, OK
Mon Oct 31 00:09:55 2022 [I] Extracting embedded image id=6 to '/tmp/Heimer-IERp5h/m.jpeg'
Mon Oct 31 00:09:55 2022 [I] Bytes written: 5600, OK
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt.
You must not let any exception whatsoever propagate through Qt code.
If that is not possible, in Qt 5 you must at least reimplement
QCoreApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'std::runtime_error'
  what():  Cannot open file: '/tmp/Heimer-RkfgWi/m.jpeg'
Aborted (core dumped)
scallyob commented 1 year ago

I edited the *.alz and removed the image info. Then I could open it and edit in 3.6.1. But if I tried adding an image again, saved, closed and re-opened, same problem is created.

juzzlin commented 1 year ago

Thanks for reporting! I'll check this.

juzzlin commented 1 year ago

I'm not sure what happens there. There might be some unintentional incompatibility between 3.0.0 and 3.6.1 when in comes to embedded images. At least it's not fundamentally broken as I'm not able to reproduce anything like this when creating and opening with 3.6.1.

Would it be possible for you to send me your problematic mind map file?

scallyob commented 1 year ago

sure, don't want to post it here, how can i send?

juzzlin commented 1 year ago

sure, don't want to post it here, how can i send?

You can send it to jussi.lind@iki.fi

juzzlin commented 1 year ago

Fixed in f462662dec891adec1618edabc4552ed083b7df8