After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780316 - Simple scaling make dia crash (python plug-in)
Simple scaling make dia crash (python plug-in)
Status: RESOLVED OBSOLETE
Product: dia
Classification: Other
Component: python
0.97.x
Other Linux
: Normal major
: ---
Assigned To: Hans Breuer
Hans Breuer
Depends on:
Blocks:
 
 
Reported: 2017-03-20 16:21 UTC by Rodolphe Peccatte
Modified: 2019-03-20 12:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A patch that tries to fix this bug by setting a free attribute of an ObjectChange (1.14 KB, patch)
2017-04-25 17:01 UTC, Rodolphe Peccatte
none Details | Review

Description Rodolphe Peccatte 2017-03-20 16:21:52 UTC
While manipulating Dia, we found a bug when trying to apply a simple scaling on objects.

We discovered that the simple scaling some objects make it crash and we get the following error:
line 24: 6670 Segmentation fault "$DIA_APP_PATH/dia" "$@"

This happens when choosing objects from the list below the toolbox. It repeats systematically.

Steps to reproduce:
- Create any object
- Apply the simple scaling on this object

Note:
The same error appears when trying to apply a simple rotation.

This happens both when compiling the sources and downloading the binaries (

Here are some details. For the precompiled version:

cat /etc/debian-version
stretch/sid

dia --version
Dia version 0.97+git, compilé à 17:31:00 le Dec  6 2016

For the source code version, we downloaded the code from the repository 
git rev-parse HEAD
761c2a7aeb61eb5f79b87ae13a8bfd86167cb061

For the record, we are a group of students and we need to find/correct a bug in order to validate a class. Thus we are interested in any hints that would help us correct this issue.

Thanks in advance.

--
Comment 1 Rodolphe Peccatte 2017-03-22 08:39:57 UTC
We investigated a bit and found the following call stack:

element_move_handle    (/lib/element.c)
box_move_handle        (/objects/flowchart/box.c)
PyDiaObject_MoveHandle (/plug-ins/python/pydia-object.c)

The PyDiaObject_MoveHandle function tries to call a free function:
l.236: change->free(change);

But this attribute seems to be NULL as the box_move_handle function returns the result of element_change_new (defined in /lib/element.c). This last function explicitly set the free attribute to NULL:
l. 506: ec->object_change.free = NULL;

--
Comment 2 Rodolphe Peccatte 2017-04-25 17:01:42 UTC
Created attachment 350421 [details] [review]
A patch that tries to fix this bug by setting a free attribute of an ObjectChange
Comment 3 GNOME Infrastructure Team 2019-03-20 12:11:43 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/dia/issues/389.