Segmentation Fault (FIXED)

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

Moderator: djandruczyk

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

Re: Segmentation Fault

Post by 24c »

Right, I started again, but it couldn't see the connection. It has done before with the same adapter. I replaced the port name in the Communications tab, /dev/tty.USB0? with /dev/tty.PL2303-000014FD, and only after MegaTunix had detected theses tty & cu versions, and afterwards then Terminal started spooling as shown, and "crashed" "unexpectedly quit".
debug19012011.png
PS I can see the reworked interface/dialog boxes, the choices look clearer less cluttered, compared to 9.22 8)
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
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: Segmentation Fault

Post by 24c »

OK so I updated Megatunix on the the MacBook Pro, an old Santa Rosa running 10.6.6, and I did so after checking comms was OK in TunerStudio.

Result: It saw the port but couldn't get comms. I clicked on the network access area within the comms tab, and it caused Terminal to start writing to screen, and Megatunix crashed. OK, it recognised the port number and the correct one was in the dialog box, but it couldn't find the ECU.
I restarted Megatunix again, and told it to Find ECU, and bingo, the dashboard came up and all was good in the comms status box.

Conclusion, Megatunix didn't see the MicroSquirt first time... :?
I'll have a play some more, opening a few tables etc and see what happens.
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
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: Segmentation Fault

Post by 24c »

Sorry woza, I can open my Spark Table, Fuel Tables, VE1 & VE2 in my case and it all seems to work. This is on the MacBook Pro running in 32bit.

Like I posted earlier it took two attempts to connect, even though it detected the firmware, as you can see by the Terminal session from the last post.
success_2nd_time.png
However, I did notice my comms cycling on & off, the USB Serial LED is not flashing rapidly like it does usually when connected say in TunerStudio. It actually goes off and lights up every few seconds. I also do get the following errors in Terminal after exiting MegaTunix, but the logfiles, and ECU snapshots do exist, which are shown below, FYI Dave.
megatunix_68554.png
Last edited by 24c on Wed Jan 19, 2011 4:59 am, edited 1 time in total.
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
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: Segmentation Fault

Post by 24c »

OK, I still can't get it to work on the iMac yet, and it's probably because it is running in 64bit mode.
I don't seem to be able to communicate with the MicroSquirt, yet I can in TunerStudio.
I wonder whether it is a driver issue for MegaTunix?
Anyway, I did try and open a Spark Table, and it was all zeros, and get data from ECU understandably would work, but upon trying to look at a fuel table, Megatunix unexpectably quit, and Terminal was displaying this...
segmentation_fault.png
Hope this helps, I can repeat and grab the logs if need be.
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: Segmentation Fault

Post by djandruczyk »

24c wrote:OK, I still can't get it to work on the iMac yet, and it's probably because it is running in 64bit mode.
I don't seem to be able to communicate with the MicroSquirt, yet I can in TunerStudio.
I wonder whether it is a driver issue for MegaTunix?
Anyway, I did try and open a Spark Table, and it was all zeros, and get data from ECU understandably would work, but upon trying to look at a fuel table, Megatunix unexpectably quit, and Terminal was displaying this...
segmentation_fault.png
Hope this helps, I can repeat and grab the logs if need be.

I wonder if its a 32/64 bit issue. I know macports can be installed either way. The mac I have is NOT capable of 64 bit mode so I have no way to test/check against the various combinations. The "monitor" error is harmless and specific to OS-X/GTK+. As for the malloc error, it would be good if I had information on if this is a build from git, are you on modular_0.4 branch, and did you compile it with debugging enabled (./configure --enable-debug ; make), and if so try and catch that in GDB, so i can see where that issue may be.
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: Segmentation Fault

Post by 24c »

djandruczyk wrote:... As for the malloc error, it would be good if I had information on if this is a build from git, are you on modular_0.4 branch, and did you compile it with debugging enabled (./configure --enable-debug ; make), and if so try and catch that in GDB, so i can see where that issue may be.
OK, yes from git and as per your instructions from a few posts back, so I did use modular_0.4, because I cut and pasted your code, but I didn't enable debug using your line above, only debug element was the line within bold brackets.

Code: Select all

cd ~/
mkdir git
cd git
git clone git://github.com/djandruczyk/MegaTunix.git
cd Megatunix
git checkout modular_0.4
[b]./autogen.sh --enable-debug [/b]
make
sudo rm -rf /usr/local/share/MegaTunix  ## REMOVE the old/existing version as lots of filenames changed and we don't want cruft laying around
sudo make install
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: Segmentation Fault

Post by djandruczyk »

24c wrote:
djandruczyk wrote:... As for the malloc error, it would be good if I had information on if this is a build from git, are you on modular_0.4 branch, and did you compile it with debugging enabled (./configure --enable-debug ; make), and if so try and catch that in GDB, so i can see where that issue may be.
OK, yes from git and as per your instructions from a few posts back, so I did use modular_0.4, because I cut and pasted your code, but I didn't enable debug using your line above, only debug element was the line within bold brackets.

Code: Select all

cd ~/
mkdir git
cd git
git clone git://github.com/djandruczyk/MegaTunix.git
cd Megatunix
git checkout modular_0.4
[b]./autogen.sh --enable-debug [/b]
make
sudo rm -rf /usr/local/share/MegaTunix  ## REMOVE the old/existing version as lots of filenames changed and we don't want cruft laying around
sudo make install
autogen.sh --enable debug calls configure with that same flag, so that's good. If I remember th thread, there was a message OS-X spit out that said how to catch the error. something along the lines of setting a breakpoint.
To do so, run "gdb src/.libs/megatunix"
type "break <function name>" replacing <function name> with what OS-X told you to break on (see previous posts on this thread), then type "run" run megatunix and do what you need to trigger that fault, and when it happens, type" backtrace" and copy the output to here.
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: Segmentation Fault

Post by 24c »

Dave, it works OK on the 64bit iMac now :?
I punched "megatunix" into Terminal, which kicked X11 into life.
Screen shot 2011-01-20 at 21.44.08.png
Clicked on "Find My ECU" after selecting the MSExtra option @ 115200, nothing appeared to happen , so I unplugged & plugged the USB/serial connector quickly, which I think created the red response at line 2.
Screen shot 2011-01-20 at 21.44.41.png
These are my comms settings
Screen shot 2011-01-20 at 21.46.39.png
Conclusion, I think it is a driver issue. Now I have comms all the VETables etc are opening etc. The only difference from yesterday is I had the machine lock up on an attempted restart about 8 hours ago, so I forced it to shutdown and then rebooted. Sorry, I can't be more helpful.

PS Tried to enable debug using gdb ...it was beyond me. :D
(BTW, I had previously checked I had successful comms with my cased MicroSquirt using TunerStudio on the same USB port but obviously quit TunerStudio)
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
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: Segmentation Fault

Post by 24c »

UPDATE Quit MegaTunix went to save the file as per dialogs, and "segmentation fault". Went to restart megatunix, and no comms again. Ports are seen, but not connecting... very odd. Must debug somehow.
apple_crash_report.zip
Terminal session
Screen shot 2011-01-20 at 22.19.35.png
All I did to induce this was put the /dev/cu.PL2303-000014FD identifier in the comms port box.
MTXlog.txt
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: Segmentation Fault

Post by djandruczyk »

24c wrote:UPDATE Quit MegaTunix went to save the file as per dialogs, and "segmentation fault". Went to restart megatunix, and no comms again. Ports are seen, but not connecting... very odd. Must debug somehow.
apple_crash_report.zip
Terminal session
Screen shot 2011-01-20 at 22.19.35.png
All I did to induce this was put the /dev/cu.PL2303-000014FD identifier in the comms port box.
MTXlog.txt
I fixed this, it was a duplicate free() problem, however theres a nasty memory leak someplace that is causing general instability and i have NOT fixed that yet. I don't recommend pulling from git for at least a day or two until i get this sorted, as a lot of debug code is enabled right now which dumps a lot of extraneous junk to the console...
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
woza
Helpful MS/Extra'er
Posts: 59
Joined: Tue Oct 23, 2007 11:13 am

Re: Segmentation Fault

Post by woza »

Just to add to this - still getting the segfault on ve tables, spark tables and rotary trailing tabs. Also got this segfault on trying to backup ecu to file. Happens as soon as I click save button. ECU doesn't get backed up to a file. I am running 64bit also.

Code: Select all

(megatunix:45004): Gtk-WARNING **: Unable to find default local directory monitor type

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x000000010039d3c9 in cfg_find_section (cfg=0x0, name=0x1000525c3 "API") at configfile.c:471
471		list = cfg->sections;
(gdb) backtrace
#0  0x000000010039d3c9 in cfg_find_section (cfg=0x0, name=0x1000525c3 "API") at configfile.c:471
#1  0x000000010039cf3d in cfg_write_string (cfg=0x0, section=0x1000525c3 "API", key=0x1000525bd "major", value=0x104be7970 "1") at configfile.c:274
#2  0x000000010039d016 in cfg_write_int (cfg=0x0, section=0x1000525c3 "API", key=0x1000525bd "major", value=1) at configfile.c:302
#3  0x000000010000c9a0 in set_file_api (cfg=0x0, major=1, minor=0) at apicheck.c:30
#4  0x000000010216b6a6 in backup_all_ecu_settings (filename=0x1032a9a40 "/Users/alex/MTX_ecu_snapshots/MegaSquirtnSpark-Extra_Highres_010x-2011_01_26-1145.ecu") at fileio.c:138
#5  0x000000010216b3f9 in select_file_for_ecu_backup (widget=0x0, data=0x0) at fileio.c:76
#6  0x000000010003011a in settings_transfer (widget=0x1018ab9d0, data=0x0) at menu_handlers.c:159
#7  0x00000001010d48d2 in g_closure_invoke ()
#8  0x00000001010ea23b in signal_emit_unlocked_R ()
#9  0x00000001010ebc64 in g_signal_emit_valist ()
#10 0x00000001010ec034 in g_signal_emit ()
#11 0x000000010071c770 in gtk_widget_activate ()
#12 0x000000010060fe90 in gtk_menu_shell_activate_item ()
#13 0x000000010061189d in gtk_menu_shell_button_release ()
#14 0x0000000100601b1f in _gtk_marshal_BOOLEAN__BOXED ()
#15 0x00000001010d48d2 in g_closure_invoke ()
#16 0x00000001010ea3bc in signal_emit_unlocked_R ()
#17 0x00000001010eb936 in g_signal_emit_valist ()
#18 0x00000001010ec034 in g_signal_emit ()
#19 0x000000010071919e in gtk_widget_event_internal ()
#20 0x00000001005fa637 in gtk_propagate_event ()
#21 0x00000001005fb906 in gtk_main_do_event ()
#22 0x0000000100a13594 in gdk_event_dispatch ()
#23 0x00000001011578f9 in g_main_context_dispatch ()
#24 0x000000010115af91 in g_main_context_iterate ()
#25 0x000000010115b483 in g_main_context_iteration ()
#26 0x00000001005fbb71 in gtk_main_iteration ()
#27 0x000000010001c28e in pf_dispatcher (data=0x0) at dispatcher.c:132
#28 0x000000010115806d in g_timeout_dispatch ()
#29 0x00000001011578f9 in g_main_context_dispatch ()
#30 0x000000010115af91 in g_main_context_iterate ()
#31 0x000000010115b2a5 in g_main_loop_run ()
#32 0x00000001005fbce0 in gtk_main ()
#33 0x000000010002fb38 in main (argc=1, argv=0x7fff5fbff888) at main.c:162
djandruczyk
MS/Extra Guru
Posts: 1210
Joined: Fri May 07, 2004 6:55 pm
Location: Rochester, NY, U.S.A.
Contact:

Re: Segmentation Fault

Post by djandruczyk »

woza wrote:Just to add to this - still getting the segfault on ve tables, spark tables and rotary trailing tabs. Also got this segfault on trying to backup ecu to file. Happens as soon as I click save button. ECU doesn't get backed up to a file. I am running 64bit also.

Code: Select all

(megatunix:45004): Gtk-WARNING **: Unable to find default local directory monitor type

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x000000010039d3c9 in cfg_find_section (cfg=0x0, name=0x1000525c3 "API") at configfile.c:471
471		list = cfg->sections;
(gdb) backtrace
#0  0x000000010039d3c9 in cfg_find_section (cfg=0x0, name=0x1000525c3 "API") at configfile.c:471
#1  0x000000010039cf3d in cfg_write_string (cfg=0x0, section=0x1000525c3 "API", key=0x1000525bd "major", value=0x104be7970 "1") at configfile.c:274
#2  0x000000010039d016 in cfg_write_int (cfg=0x0, section=0x1000525c3 "API", key=0x1000525bd "major", value=1) at configfile.c:302
#3  0x000000010000c9a0 in set_file_api (cfg=0x0, major=1, minor=0) at apicheck.c:30
#4  0x000000010216b6a6 in backup_all_ecu_settings (filename=0x1032a9a40 "/Users/alex/MTX_ecu_snapshots/MegaSquirtnSpark-Extra_Highres_010x-2011_01_26-1145.ecu") at fileio.c:138
#5  0x000000010216b3f9 in select_file_for_ecu_backup (widget=0x0, data=0x0) at fileio.c:76
#6  0x000000010003011a in settings_transfer (widget=0x1018ab9d0, data=0x0) at menu_handlers.c:159
#7  0x00000001010d48d2 in g_closure_invoke ()
#8  0x00000001010ea23b in signal_emit_unlocked_R ()
#9  0x00000001010ebc64 in g_signal_emit_valist ()
#10 0x00000001010ec034 in g_signal_emit ()
#11 0x000000010071c770 in gtk_widget_activate ()
#12 0x000000010060fe90 in gtk_menu_shell_activate_item ()
#13 0x000000010061189d in gtk_menu_shell_button_release ()
#14 0x0000000100601b1f in _gtk_marshal_BOOLEAN__BOXED ()
#15 0x00000001010d48d2 in g_closure_invoke ()
#16 0x00000001010ea3bc in signal_emit_unlocked_R ()
#17 0x00000001010eb936 in g_signal_emit_valist ()
#18 0x00000001010ec034 in g_signal_emit ()
#19 0x000000010071919e in gtk_widget_event_internal ()
#20 0x00000001005fa637 in gtk_propagate_event ()
#21 0x00000001005fb906 in gtk_main_do_event ()
#22 0x0000000100a13594 in gdk_event_dispatch ()
#23 0x00000001011578f9 in g_main_context_dispatch ()
#24 0x000000010115af91 in g_main_context_iterate ()
#25 0x000000010115b483 in g_main_context_iteration ()
#26 0x00000001005fbb71 in gtk_main_iteration ()
#27 0x000000010001c28e in pf_dispatcher (data=0x0) at dispatcher.c:132
#28 0x000000010115806d in g_timeout_dispatch ()
#29 0x00000001011578f9 in g_main_context_dispatch ()
#30 0x000000010115af91 in g_main_context_iterate ()
#31 0x000000010115b2a5 in g_main_loop_run ()
#32 0x00000001005fbce0 in gtk_main ()
#33 0x000000010002fb38 in main (argc=1, argv=0x7fff5fbff888) at main.c:162
thx for the input, I found and (hopefully) fixed them and committed/pushed...
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
woza
Helpful MS/Extra'er
Posts: 59
Joined: Tue Oct 23, 2007 11:13 am

Re: Segmentation Fault

Post by woza »

Fixed the backup ecu issue...
djandruczyk
MS/Extra Guru
Posts: 1210
Joined: Fri May 07, 2004 6:55 pm
Location: Rochester, NY, U.S.A.
Contact:

Re: Segmentation Fault

Post by djandruczyk »

woza wrote:Fixed the backup ecu issue...

Other fixes also went in regarding the dashdesigner today. If possible can you try and get another trace of the segfault on the fuel/spark/whatever tables? So far I haven't been able to duplicate that, but that means little.
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
woza
Helpful MS/Extra'er
Posts: 59
Joined: Tue Oct 23, 2007 11:13 am

Re: Segmentation Fault

Post by woza »

Code: Select all

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x000000000554f500
0x00000001010f1e82 in g_type_instance_get_private ()
(gdb) backtrace
#0  0x00000001010f1e82 in g_type_instance_get_private ()
#1  0x00000001009ddf14 in gdk_gc_set_subwindow ()
#2  0x0000000102191bfe in common_draw_ve_marker () at vetable_gui.c:444
#3  0x000000010004688e in draw_ve_marker () at vetable_gui.c:161
#4  0x000000010003c6dd in update_ve3ds (data=0x0) at runtime_gui.c:541
#5  0x000000010115806d in g_timeout_dispatch ()
#6  0x00000001011578f9 in g_main_context_dispatch ()
#7  0x000000010115af91 in g_main_context_iterate ()
#8  0x000000010115b483 in g_main_context_iteration ()
#9  0x00000001005fbb71 in gtk_main_iteration ()
#10 0x000000010001c28e in pf_dispatcher (data=0x0) at dispatcher.c:132
#11 0x000000010115806d in g_timeout_dispatch ()
#12 0x00000001011578f9 in g_main_context_dispatch ()
#13 0x000000010115af91 in g_main_context_iterate ()
#14 0x000000010115b2a5 in g_main_loop_run ()
#15 0x00000001005fbce0 in gtk_main ()
#16 0x000000010002fb38 in main (argc=1, argv=0x7fff5fbff888) at main.c:162
djandruczyk
MS/Extra Guru
Posts: 1210
Joined: Fri May 07, 2004 6:55 pm
Location: Rochester, NY, U.S.A.
Contact:

Re: Segmentation Fault

Post by djandruczyk »

woza wrote:

Code: Select all

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x000000000554f500
0x00000001010f1e82 in g_type_instance_get_private ()
(gdb) backtrace
#0  0x00000001010f1e82 in g_type_instance_get_private ()
#1  0x00000001009ddf14 in gdk_gc_set_subwindow ()
#2  0x0000000102191bfe in common_draw_ve_marker () at vetable_gui.c:444
#3  0x000000010004688e in draw_ve_marker () at vetable_gui.c:161
#4  0x000000010003c6dd in update_ve3ds (data=0x0) at runtime_gui.c:541
#5  0x000000010115806d in g_timeout_dispatch ()
#6  0x00000001011578f9 in g_main_context_dispatch ()
#7  0x000000010115af91 in g_main_context_iterate ()
#8  0x000000010115b483 in g_main_context_iteration ()
#9  0x00000001005fbb71 in gtk_main_iteration ()
#10 0x000000010001c28e in pf_dispatcher (data=0x0) at dispatcher.c:132
#11 0x000000010115806d in g_timeout_dispatch ()
#12 0x00000001011578f9 in g_main_context_dispatch ()
#13 0x000000010115af91 in g_main_context_iterate ()
#14 0x000000010115b2a5 in g_main_loop_run ()
#15 0x00000001005fbce0 in gtk_main ()
#16 0x000000010002fb38 in main (argc=1, argv=0x7fff5fbff888) at main.c:162

Try commenting out line 444 in src/plugins/mscommon/vetable_gui.c, running make ; sudo make install and see if it runs without faulting. (the window highlighting may not work, but it may stop the crashes..)
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
woza
Helpful MS/Extra'er
Posts: 59
Joined: Tue Oct 23, 2007 11:13 am

Re: Segmentation Fault

Post by woza »

With line 444 commented out. Segfault on same tabs with below backtrace.

Code: Select all

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000005328020
0x00000001009decfb in gdk_gc_set_rgb_fg_color ()
(gdb) backtrace
#0  0x00000001009decfb in gdk_gc_set_rgb_fg_color ()
#1  0x0000000102191c14 in common_draw_ve_marker () at vetable_gui.c:447
#2  0x000000010004688e in draw_ve_marker () at vetable_gui.c:161
#3  0x000000010003c6dd in update_ve3ds (data=0x0) at runtime_gui.c:541
#4  0x000000010115806d in g_timeout_dispatch ()
#5  0x00000001011578f9 in g_main_context_dispatch ()
#6  0x000000010115af91 in g_main_context_iterate ()
#7  0x000000010115b483 in g_main_context_iteration ()
#8  0x00000001005fbb71 in gtk_main_iteration ()
#9  0x000000010001c28e in pf_dispatcher (data=0x0) at dispatcher.c:132
#10 0x000000010115806d in g_timeout_dispatch ()
#11 0x00000001011578f9 in g_main_context_dispatch ()
#12 0x000000010115af91 in g_main_context_iterate ()
#13 0x000000010115b2a5 in g_main_loop_run ()
#14 0x00000001005fbce0 in gtk_main ()
#15 0x000000010002fb38 in main (argc=1, argv=0x7fff5fbff888) at main.c:162
So I commented out lines 447 to 455 also and the spark table, ve table & rotary trailing tabs now load. As soon as I turn the rpm up on the stim it segfaults with the folowing.

Code: Select all

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000005a6d000
0x00000001009decfb in gdk_gc_set_rgb_fg_color ()
(gdb) backtrace
#0  0x00000001009decfb in gdk_gc_set_rgb_fg_color ()
#1  0x00000001021917bb in common_draw_ve_marker () at vetable_gui.c:367
#2  0x000000010004688e in draw_ve_marker () at vetable_gui.c:161
#3  0x000000010003c6dd in update_ve3ds (data=0x0) at runtime_gui.c:541
#4  0x000000010115806d in g_timeout_dispatch ()
#5  0x00000001011578f9 in g_main_context_dispatch ()
#6  0x000000010115af91 in g_main_context_iterate ()
#7  0x000000010115b483 in g_main_context_iteration ()
#8  0x00000001005fbb71 in gtk_main_iteration ()
#9  0x000000010001c28e in pf_dispatcher (data=0x0) at dispatcher.c:132
#10 0x000000010115806d in g_timeout_dispatch ()
#11 0x00000001011578f9 in g_main_context_dispatch ()
#12 0x000000010115af91 in g_main_context_iterate ()
#13 0x000000010115b2a5 in g_main_loop_run ()
#14 0x00000001005fbce0 in gtk_main ()
#15 0x000000010002fb38 in main (argc=1, argv=0x7fff5fbff888) at main.c:162
djandruczyk
MS/Extra Guru
Posts: 1210
Joined: Fri May 07, 2004 6:55 pm
Location: Rochester, NY, U.S.A.
Contact:

Re: Segmentation Fault

Post by djandruczyk »

Hmm thats interesting. I think I may know part of the issue. Give me a few days to look into that. I'm currently traveling so computer/dev access is limited.
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: Segmentation Fault

Post by djandruczyk »

Woza: excellent report. I had a few minutes and revamped that routine to use "current" GTK/GDK calls, as GTK+ has been gradually transitioning to cairo for the backend rendering, and there's still places wihin Mtx that use the legacy api's which have started to become deprecated with the latests GTK+ editions available on macports/fink.

It SHOULD work now for at least that section, but I suspect it either may not render anything or may flicker badly, I have my mac with me, but no MS hardware, so I can't test it for a while, but would appreaciate your detailed results on if it works or not, how it renders (if it does), its general behavior and so on, and I'l try to tweak it as needed..

Thanks again!
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
woza
Helpful MS/Extra'er
Posts: 59
Joined: Tue Oct 23, 2007 11:13 am

Re: Segmentation Fault

Post by woza »

djandruczyk wrote:Woza: excellent report. I had a few minutes and revamped that routine to use "current" GTK/GDK calls, as GTK+ has been gradually transitioning to cairo for the backend rendering, and there's still places wihin Mtx that use the legacy api's which have started to become deprecated with the latests GTK+ editions available on macports/fink.

It SHOULD work now for at least that section, but I suspect it either may not render anything or may flicker badly, I have my mac with me, but no MS hardware, so I can't test it for a while, but would appreaciate your detailed results on if it works or not, how it renders (if it does), its general behavior and so on, and I'l try to tweak it as needed..

Thanks again!

Code: Select all

git pull

Code: Select all

Already up-to-date
Post Reply