FreeEMS Issues - Tunix
View Issue Details
0000529TunixGeneral Featurespublic2012-02-22 14:392012-04-06 23:56
0000529: Crash On Exit
App bails while trying to exit just before the second and third annoying popups. With debugger you can see the middle of the three popups come up then freeze, but without you never see that, you click Yes i'm sure and then it dies.
Open MTX
Click close box in corner of window
click yes
attached to firmware
At git hash @ 765d15864dca998915cb8bc1d23629cb7ebe95b9
How I ran it [^]
Backtrace [^]
No tags attached.

2012-02-22 16:02   
I am able to reproduce this crash.
I run megatunix and after I select either Find my ECU or Work Offline and see the main MegaTunix window appear with both the ECU Status and Runtime Vars windows open, then if I click the Close button the "Quit MegaTunix yes/no" dialog box appears and if I click Yes it immediately exits without prompting me to save the ECU configuration or the datalog of the session.
Here is the termial session output:

andy@freeems:~/git/djandruczyk/MegaTunix/src$ megatunix

** (megatunix:20011): CRITICAL **: bind_data: assertion `ecu_widgets' failed

** (megatunix:20011): CRITICAL **: update_ecu_controls_pf: assertion `ecu_widgets' failed

** (megatunix:20011): CRITICAL **: update_ecu_controls_pf: assertion `ecu_widgets' failed

** (megatunix:20011): CRITICAL **: deregister_packet_queue: assertion `queue' failed
2012-02-22 17:08   
(gdb) backtrace
#0 0xb7fe2424 in __kernel_vsyscall ()
0000001 0xb712b751 in raise () from /lib/i686/cmov/
0000002 0xb712eb82 in abort () from /lib/i686/cmov/
#3 0xb716218d in ?? () from /lib/i686/cmov/
0000004 0xb716c281 in ?? () from /lib/i686/cmov/
0000005 0xb716dad8 in ?? () from /lib/i686/cmov/
0000006 0xb7170bbd in free () from /lib/i686/cmov/
0000007 0xb740ac56 in g_free () from /lib/
0000008 0x0807ddef in dealloc_message (message=0xb7242ff4) at init.c:1058
0000009 0x08076040 in gui_dispatcher (data=0x0) at dispatcher.c:216
0000010 0xb7402a7c in ?? () from /lib/
0000011 0xb7402305 in g_main_context_dispatch () from /lib/
0000012 0xb7405fe8 in ?? () from /lib/
0000013 0xb7406527 in g_main_loop_run () from /lib/
0000014 0xb79b466f in gtk_dialog_run () from /usr/lib/
0000015 0x08078991 in prompt_to_save () at gui_handlers.c:1647
0000016 0x0807c661 in leave (widget=0x81e9e80, data=0x8300b38)
    at gui_handlers.c:122
0000017 0xb7a40e74 in ?? () from /usr/lib/
#18 0xb74ad13a in g_closure_invoke () from /usr/lib/
#19 0xb74c361d in ?? () from /usr/lib/
0000020 0xb74c4a7b in g_signal_emit_valist () from /usr/lib/
#21 0xb74c5076 in g_signal_emit () from /usr/lib/
---Type <return> to continue, or q <return> to quit---
#22 0xb7b6d156 in ?? () from /usr/lib/
0000023 0xb7a3ab40 in gtk_main_do_event () from /usr/lib/
#24 0xb7798dda in ?? () from /usr/lib/
0000025 0xb7402305 in g_main_context_dispatch () from /lib/
#26 0xb7405fe8 in ?? () from /lib/
0000027 0xb7406527 in g_main_loop_run () from /lib/
0000028 0xb7a3ae19 in gtk_main () from /usr/lib/
0000029 0x0808a153 in main (argc=1, argv=0xbffff504) at main.c:156
2012-02-23 13:27   
DeuceEFI run ./contrib/update-debug and follow the instructions.

It'll cause mtx to stop at the first GTK/Glib issue, i.e. "** (megatunix:20011): CRITICAL **: bind_data: assertion `ecu_widgets' failed"

NOTE: DO NOT ATTEMPT TO USE OFFLINE MODE for FreeEMS. It is NOT POSSIBLE to use freeems in offline mode right now due to technical reasons (chicken and egg problem).
2012-02-24 02:39   
Here is the result after it connects to my FreeEMS board and I clicked on the X in the upper right corner of the MegaTunix window and it crashed: [^]
2012-02-24 02:56   
Try again.. start mtx. Wait 2 minutes then click exit. See if it still crashes. I bet you are going so fast that its still downloading pages from the ecu when u quit.
2012-02-24 04:56   
fixed in hash 00aeb700d13616edaca840571e1ad40428d73af9
2012-02-24 09:52   
Andy, please test and close if good.
2012-02-24 12:21   
MTX closes properly, however, I'm still seeing the kernel driver crash after MTX closes.
Here is the kernel driver crash info: [^]
2012-02-24 13:20   
Kernel driver issue is beyond mtx and should not hold this bug open. The crash in mtx was caused by mis-used of a datastructure and has been remedied.
2012-02-24 13:29   
fixed in 00aeb700d13616edaca840571e1ad40428d73af9
2012-02-24 13:29   
MTX has been fixed for the Exit crash as of hash 00aeb700d13616edaca840571e1ad40428d73af9

Closing this issue.
2012-04-06 23:56   
Looks like this was fixed and tested some time ago, closing.