What is a segmentation fault?

Questions specific to Megatunix - alternate tuning software that runs on unix and windows.
Note that Megatunix is obsolete.

Moderator: djandruczyk

Post Reply
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

What is a segmentation fault?

Post by 24c »

Ok, for my sins, I tried MegaTunix today, and it worked on the MacBook, but still not got serial comms with the iMac. After some more snooping with the MacBook, I wanted to rework the gauges, mainly to suit my motorcycle engine limits, and see if I could create a neat dash.
I tried to open dashdesigner, and it gives me a segmentation fault on both machines, and unexpected quitting/error reports to Apple dialogs. :?

I've seen the woza thread of the same name, but does anybody know what this means in plain English?
Yamaha GTS1000 v2 MicroSquirt, B&G 2.891
Yamaha GTS1000 v3 beta MicroSquirt, B&G3.760
Yamaha GTS1000 MSExtra 3.1, Dual VR Board
Yamaha YZF1000 MSExtra 3.1
jsmcortina
Site Admin
Posts: 39615
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: What is a segmentation fault?

Post by jsmcortina »

Try http://en.wikipedia.org/wiki/Segmentation_fault

It is a code bug basically, that caused an attempt to read or write some area of memory that is illegal.

A somewhat basic example might be this. Say you call a function that is supposed to return an address of a warning message. Next you print the message from that address. However, the function returns 0 or "NULL" instead of an address. Correct code will notice and think "oh, I got NULL, there isn't a message".
Buggy code won't check for errors and will try to use the bogus address anyway, that will either cause garbage or a segfault.

That kind of thing anyway.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
djandruczyk
MS/Extra Guru
Posts: 1210
Joined: Fri May 07, 2004 6:55 pm
Location: Rochester, NY, U.S.A.
Contact:

Re: What is a segmentation fault?

Post by djandruczyk »

24c wrote:Ok, for my sins, I tried MegaTunix today, and it worked on the MacBook, but still not got serial comms with the iMac. After some more snooping with the MacBook, I wanted to rework the gauges, mainly to suit my motorcycle engine limits, and see if I could create a neat dash.
I tried to open dashdesigner, and it gives me a segmentation fault on both machines, and unexpected quitting/error reports to Apple dialogs. :?

I've seen the woza thread of the same name, but does anybody know what this means in plain English?

A segmentation fault is typically when a program tries to dereference a NULL pointer. i.e. a location to nowhere. that's at leat one of the potential (loose) definitions of a segfault. There was a very very subtle bug in the dashdesigner/gaugedesigner up till about 2 hours ago, which i have since committed.

I also fixed the dash/gauge designers to work on Ubuntu 8.04 again.
Last edited by djandruczyk on Mon Jan 24, 2011 9:11 am, edited 1 time in total.
Reason: clarify info on segfaults
David J. Andruczyk
MegaTunix author. The only non-java cross platform tuning software for MS-I/II hardware.
Where to get and how to install:
http://msextra.com/viewtopic.php?t=23080
http://sourceforge.net/projects/megatunix
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: What is a segmentation fault?

Post by 24c »

djandruczyk wrote:...I also fixed the dash/gauge designers to work on Ubuntu 8.04 again.
So how do I update my MegaTunix file? Remove the old version and use git tree again, and the modular_0.4 branch, or can I self update? :?
Yamaha GTS1000 v2 MicroSquirt, B&G 2.891
Yamaha GTS1000 v3 beta MicroSquirt, B&G3.760
Yamaha GTS1000 MSExtra 3.1, Dual VR Board
Yamaha YZF1000 MSExtra 3.1
djandruczyk
MS/Extra Guru
Posts: 1210
Joined: Fri May 07, 2004 6:55 pm
Location: Rochester, NY, U.S.A.
Contact:

Re: What is a segmentation fault?

Post by djandruczyk »

24c wrote:
djandruczyk wrote:...I also fixed the dash/gauge designers to work on Ubuntu 8.04 again.
So how do I update my MegaTunix file? Remove the old version and use git tree again, and the modular_0.4 branch, or can I self update? :?
In your tree (i.e. /home/<username>git/Megatunix or similar) run the following

Code: Select all

sudo rm -rf /usr/local/share/MegaTunix
git checkout modular_0.4
./autogen.sh
make
sudo make install
David J. Andruczyk
MegaTunix author. The only non-java cross platform tuning software for MS-I/II hardware.
Where to get and how to install:
http://msextra.com/viewtopic.php?t=23080
http://sourceforge.net/projects/megatunix
djandruczyk
MS/Extra Guru
Posts: 1210
Joined: Fri May 07, 2004 6:55 pm
Location: Rochester, NY, U.S.A.
Contact:

Re: What is a segmentation fault?

Post by djandruczyk »

dashdesigner and hopefully gaugedesigner should now be more stable. Please test and report back.
David J. Andruczyk
MegaTunix author. The only non-java cross platform tuning software for MS-I/II hardware.
Where to get and how to install:
http://msextra.com/viewtopic.php?t=23080
http://sourceforge.net/projects/megatunix
Post Reply