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 687230 - Segmentation fault on HexTextBuffer.vala with valac 0.14
Segmentation fault on HexTextBuffer.vala with valac 0.14
Status: RESOLVED FIXED
Product: moserial
Classification: Other
Component: general
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: moserial-maint
moserial-maint
: 703219 707714 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-10-30 22:14 UTC by Jordi
Modified: 2013-09-08 12:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes segmentation fault on HexTextBuffer with valac 0.14 (6.98 KB, text/x-vala)
2012-10-30 22:14 UTC, Jordi
Details

Description Jordi 2012-10-30 22:14:07 UTC
Created attachment 227692 [details]
Fixes segmentation fault on HexTextBuffer with valac 0.14

On Ubuntu 12.04 with valac HexTextBuffer segs. fault due to invalidation on TexIter objects.

It seems that after insert or delete operations TexIter objects are lots.

I have found a solution by recovering these objects (see attached file).

As I'm not an expert on Vala or GTK programming I don't know if this solution is optimal or not, but at least it works.
Comment 1 Michael Chudobiak 2012-12-18 15:31:42 UTC
Thanks for your patch, and sorry for the delay in replying!

Can you test the version in git master to see if it works on your system now?

- Mike
Comment 2 Jordi 2012-12-18 16:38:17 UTC
(In reply to comment #1)
> Thanks for your patch, and sorry for the delay in replying!
> 
> Can you test the version in git master to see if it works on your system now?
> 
> - Mike

Hi.

I've downloaded the master but there is no 'gnome-autogen.sh':

$ ./autogen.sh

it fails with: $ ./autogen.sh: 9: .: gnome-autogen.sh: not found
Comment 3 Michael Chudobiak 2012-12-18 16:45:51 UTC
I'm not sure which package provides that in Ubuntu (I run Fedora).

Try:

sudo apt-get install gnome-common
Comment 4 Jordi 2012-12-18 18:14:45 UTC
Oops. Sorry about that, I didn't know gnome-autogen.sh was included in standard packages. You were right, it was in gnome-common.

Anyway, after installing the script moserial compiles and works nicely. Good work! Thanks for committing the patch.

Best Regards.

(In reply to comment #3)
> I'm not sure which package provides that in Ubuntu (I run Fedora).
> 
> Try:
> 
> sudo apt-get install gnome-common
Comment 5 Michael Chudobiak 2012-12-18 18:17:48 UTC
Thanks for testing!

I'll probably modify it a bit... it doesn't work well if you click inside the text box. Some of the insertion points are referenced to the cursor position, which the user can change.

- Mike
Comment 6 Michael Chudobiak 2012-12-18 19:52:45 UTC
I made changes like this:

- this.get_iter_at_offset(out nextCharIter, this.cursor_position);
+ this.get_end_iter (out nextCharIter);

It should be OK now.
Comment 7 Jordi 2012-12-19 11:28:47 UTC
That's undoubtedly a better way to do it. I've compiled it and works ok.


(In reply to comment #6)
> I made changes like this:
> 
> - this.get_iter_at_offset(out nextCharIter, this.cursor_position);
> + this.get_end_iter (out nextCharIter);
> 
> It should be OK now.
Comment 8 Michael Chudobiak 2013-06-28 18:07:10 UTC
*** Bug 703219 has been marked as a duplicate of this bug. ***
Comment 9 Michael Chudobiak 2013-09-08 12:55:31 UTC
*** Bug 707714 has been marked as a duplicate of this bug. ***