Bug 449347 - export as image error message
Summary: export as image error message
Status: RESOLVED DUPLICATE of bug 449622
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.32.0 (KDE releases 20.08.0)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-29 22:46 UTC by Jessica
Modified: 2022-12-30 10:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
xmi file to export to an image (271.37 KB, application/xml)
2022-01-29 22:46 UTC, Jessica
Details
pacman.xmi manually fixed and then loaded/saved by recent Umbrello (219.66 KB, application/x-uml)
2022-12-30 02:30 UTC, Oliver Kellogg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jessica 2022-01-29 22:46:34 UTC
Created attachment 146057 [details]
xmi file to export to an image

When trying to export the attached xmi file to an image, I received an error message of Umbrello.
The program doesn't crash.

The xmi file is made by importing following Python code: https://pacmancode.com/
(click Pacman_Complete (zip )Download) and then dragging all classes into the window.


STEPS TO REPRODUCE
1.  Open xmi file
2.  Export it to an image
3.  Umbrello error message received

OBSERVED RESULT

Exporting to an image gives error message.

EXPECTED RESULT

Exporting to an image should give no error message.

SOFTWARE/OS VERSIONS

Windows: Microsoft Windows [Version 10.0.19044.1466]

KDE Development Platform 4.14.65
Comment 1 Jessica 2022-02-05 17:18:11 UTC
I think this bug is caused by the current one: https://bugs.kde.org/show_bug.cgi?id=449661
Comment 2 Jessica 2022-02-18 18:23:37 UTC
*** Removed by KDE Sysadmin for violation of the KDE Community Code of Conduct ***
Comment 3 Oliver Kellogg 2022-12-30 02:30:57 UTC
Created attachment 154891 [details]
pacman.xmi manually fixed and then loaded/saved by recent Umbrello

Your pacman.xmi attachment was created using an Umbrello version that did not include the fix for bug 449662.
The XMI has a similar problem as the one at bug 449662 and therefore an automatic repair by Umbrello is not possible.
I manually deleted the line 1895:

--- pacman.xmi        2022-12-30 02:20:36.793181827 +0100
+++ bug449347-pacman-manuallyfixed.xmi  2022-12-30 03:17:20.419500687 +0100
@@ -1892,7 +1892,6 @@
            <startpoint startx="-95367" starty="-36474.6"/>
            <endpoint endx="-95166.4" endy="-36474.6"/>
           </linepath>
-          <floatingtext linecolor="#ff0000" usesdiagramfillcolor="1" linewidth="0" textcolor="none" usesdiagramusefillcolor="1" x="-4.29496e+09" showstereotype="1" y="-4.295e+09" text="sprites" font="MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0" localid="uvZ9yjorX7yeA" pretext="+" role="710" width="48" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="ue8vgCptWUQFL" autoresize="1" height="17"/>
          </assocwidget>
          <assocwidget linecolor="#ff0000" indexa="1" usesdiagramfillcolor="1" widgetbid="usqXSBLQbJKto" indexb="1" linewidth="0" seqnum="" textcolor="none" usesdiagramusefillcolor="1" totalcounta="2" totalcountb="2" widgetaid="u4G0r3VlSWV5Y" font="Sans Serif,9,-1,0,50,0,0,0,0,0" visibilityA="0" visibilityB="0" localid="urZwoh37DbF2C" usefillcolor="1" fillcolor="none" changeabilityA="900" xmi.id="uA7Wqwr0CVVcU" changeabilityB="900" autoresize="1" type="510">
           <linepath layout="Direct">

because  that floatingtext has illegal x and y values.
After this deletion, loading the file into Umbrello was possible.
The attachment bug449347-pacman-fixed-savedByUmbrello.xmi is the version after saving within Umbrello.
With this file, it was also possible to export the diagram as image.
Comment 4 Oliver Kellogg 2022-12-30 02:33:37 UTC
In my comment #3 I referenced the wrong bug number, the correct reference is bug 449622.

*** This bug has been marked as a duplicate of bug 449622 ***
Comment 5 Oliver Kellogg 2022-12-30 10:05:42 UTC
(In reply to Oliver Kellogg from comment #3)
> [...]
> The XMI has a similar problem as the one at bug 449662 and therefore an
> automatic repair by Umbrello is not possible.

On git master I improved the coordinate error handling so that the manual step is no longer needed, i.e. Umbrello now makes a minimal repair of bogus values and does not abort the load, see
https://bugs.kde.org/show_bug.cgi?id=449622#c10
"Minimal" means that those widgets are placed at a fixed location near (0,0).
Of course, manual correction within Umbrello is then still required.