Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on repeat errors in program #47

Open
ceneblock opened this issue May 7, 2020 · 3 comments · May be fixed by #48
Open

Crash on repeat errors in program #47

ceneblock opened this issue May 7, 2020 · 3 comments · May be fixed by #48
Assignees
Labels
Milestone

Comments

@ceneblock
Copy link

Hello, GNUSim8085 seems to be crashing when trying to assemble and run a program twice with the same error.

When using the below program, it complains about an incomplete opcode when selecting "assemble and run". Selecting assemble and run again causes the below stack trace.

Here is the code I'm trying to run:

;<Program title>

jmp start

;data


;code
start: nop
MVI A, 05
STA 100f
MVI A, 06
ADD 100f
STA 101f

hlt

I understand that it should be MVI B, 05 on line 10 and ADD B on line 13 to add 5 and 6 together, but the program should continue to throw errors instead of crashing.

Here is the stack trace:

#0  0x00007ffff6ec5ea1 in raise () at /lib64/libc.so.6
#1  0x00007ffff6eaf53d in abort () at /lib64/libc.so.6
#2  0x00007ffff7118de3 in g_assertion_message (domain=<optimized out>, file=<optimized out>, line=<optimized out>, func=0x420578 <__func__.66235> "cb_clicked", message=<optimized out>) at ../glib/gtestutils.c:2914
#3  0x00007ffff7174b8b in g_assertion_message_expr
    (domain=domain@entry=0x0, file=file@entry=0x42049a "gui-list-message.c", line=line@entry=63, func=func@entry=0x420578 <__func__.66235> "cb_clicked", expr=expr@entry=0x4204f8 "gtk_tree_selection_get_selected (selection, (GtkTreeModel **)&store, &iter)")
    at ../glib/gtestutils.c:2940
#4  0x00000000004186b4 in cb_clicked (listview=<optimized out>, user_data=<optimized out>) at gui-list-message.c:63
#8  0x00007ffff725628f in <emit signal ??? on instance 0xa623e0 [GtkTreeView]> (instance=instance@entry=0xa623e0, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3554
    #5  0x00007ffff7236fd2 in g_closure_invoke (closure=0x9a0520, return_value=0x0, n_param_values=1, param_values=0x7fffffffc7a0, invocation_hint=0x7fffffffc720) at ../gobject/gclosure.c:810
    #6  0x00007ffff724ab34 in signal_emit_unlocked_R (node=node@entry=0x56de70, detail=detail@entry=0, instance=instance@entry=0xa623e0, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffc7a0) at ../gobject/gsignal.c:3742
    #7  0x00007ffff7255f0f in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffc960) at ../gobject/gsignal.c:3498
#9  0x00007ffff7919193 in gtk_tree_view_real_set_cursor (tree_view=0xa623e0 [GtkTreeView], path=0xccc930, flags=<optimized out>) at gtktreeview.c:13361
#10 0x00007ffff7929c70 in gtk_tree_view_multipress_gesture_pressed (gesture=0x96a6d0 [GtkGestureMultiPress], n_press=1, x=<optimized out>, y=<optimized out>, tree_view=0xa623e0 [GtkTreeView]) at gtktreeview.c:3386
#11 0x00007ffff78af86d in _gtk_marshal_VOID__INT_DOUBLE_DOUBLEv (closure=<optimized out>, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x5d18e0) at gtkmarshalers.c:4803
#12 0x00007ffff7237206 in _g_closure_invoke_va (closure=0xa7eb60, return_value=0x0, instance=0x96a6d0, args=0x7fffffffcdf0, n_params=3, param_types=0x5d18e0) at ../gobject/gclosure.c:873
#13 0x00007ffff7255910 in g_signal_emit_valist (instance=0x96a6d0, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffcdf0) at ../gobject/gsignal.c:3407
#14 0x00007ffff725628f in g_signal_emit (instance=instance@entry=0x96a6d0, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3554
#15 0x00007ffff7a8e848 in gtk_gesture_multi_press_begin (gesture=gesture@entry=0x96a6d0 [GtkGestureMultiPress], sequence=sequence@entry=0x0) at gtkgesturemultipress.c:242
#16 0x00007ffff723a302 in g_cclosure_marshal_VOID__BOXEDv (closure=0x6351d0, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x626140) at ../gobject/gmarshal.c:1686
#17 0x00007ffff7237206 in _g_closure_invoke_va (closure=0x6351d0, return_value=0x0, instance=0x96a6d0, args=0x7fffffffd1b0, n_params=1, param_types=0x626140) at ../gobject/gclosure.c:873
#18 0x00007ffff7255910 in g_signal_emit_valist (instance=0x96a6d0, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffd1b0) at ../gobject/gsignal.c:3407
#19 0x00007ffff725628f in g_signal_emit (instance=instance@entry=0x96a6d0, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3554
#20 0x00007ffff7a8c22e in _gtk_gesture_set_recognized (recognized=<optimized out>, sequence=0x0, gesture=0x96a6d0 [GtkGestureMultiPress]) at gtkgesture.c:344
#21 0x00007ffff7a8c22e in _gtk_gesture_set_recognized (sequence=0x0, recognized=1, gesture=0x96a6d0 [GtkGestureMultiPress]) at gtkgesture.c:330
#22 0x00007ffff7a8c22e in _gtk_gesture_check_recognized (gesture=gesture@entry=0x96a6d0 [GtkGestureMultiPress], sequence=sequence@entry=0x0) at gtkgesture.c:390
#23 0x00007ffff7a8fc6b in gtk_gesture_handle_event (event=0xf20540, controller=0x96a6d0 [GtkGestureMultiPress]) at gtkgesture.c:748
#24 0x00007ffff7a8fc6b in gtk_gesture_handle_event (controller=0x96a6d0 [GtkGestureMultiPress], event=0xf20540) at gtkgesture.c:713
#25 0x00007ffff7a8b2de in gtk_gesture_single_handle_event (controller=0x96a6d0 [GtkGestureMultiPress], event=0xf20540) at gtkgesturesingle.c:222
#26 0x00007ffff7abf4ec in gtk_event_controller_handle_event (controller=0x96a6d0 [GtkGestureMultiPress], event=0xf20540) at gtkeventcontroller.c:230
#27 0x00007ffff7904b8d in _gtk_widget_run_controllers (widget=0xa623e0 [GtkTreeView], event=0xf20540, phase=GTK_PHASE_BUBBLE) at gtkwidget.c:7443
#28 0x00007ffff78b9a5b in _gtk_marshal_BOOLEAN__BOXEDv (closure=0x52eef0, return_value=0x7fffffffd560, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x52ef20) at gtkmarshalers.c:129
#29 0x00007ffff7237206 in _g_closure_invoke_va (closure=0x52eef0, return_value=0x7fffffffd560, instance=0xa623e0, args=0x7fffffffd630, n_params=1, param_types=0x52ef20) at ../gobject/gclosure.c:873
#30 0x00007ffff725503a in g_signal_emit_valist (instance=0xa623e0, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffd630) at ../gobject/gsignal.c:3407
#31 0x00007ffff725628f in g_signal_emit (instance=instance@entry=0xa623e0, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3554
#32 0x00007ffff7904ce2 in gtk_widget_event_internal (event=0xf20540, widget=0xa623e0 [GtkTreeView]) at gtkwidget.c:7808
#33 0x00007ffff7904ce2 in gtk_widget_event_internal (widget=0xa623e0 [GtkTreeView], event=0xf20540) at gtkwidget.c:7677
#34 0x00007ffff7a421d8 in propagate_event_up (topmost=<optimized out>, event=<optimized out>, widget=0xa623e0 [GtkTreeView]) at gtkmain.c:2587
#35 0x00007ffff7a421d8 in propagate_event (widget=widget@entry=0xa623e0 [GtkTreeView], event=event@entry=0xf20540, captured=captured@entry=0, topmost=topmost@entry=0x0) at gtkmain.c:2690
#36 0x00007ffff7a422ff in gtk_propagate_event (widget=widget@entry=0xa623e0 [GtkTreeView], event=event@entry=0xf20540) at gtkmain.c:2724
#37 0x00007ffff7a4558b in gtk_main_do_event (event=0xf20540) at gtkmain.c:1920
#38 0x00007ffff7a4558b in gtk_main_do_event (event=<optimized out>) at gtkmain.c:1690
#39 0x00007ffff77b19f4 in _gdk_event_emit (event=0xf20540) at gdkevents.c:73
#40 0x00007ffff77b19f4 in _gdk_event_emit (event=0xf20540) at gdkevents.c:67
#41 0x00007ffff7780672 in gdk_event_source_dispatch (source=source@entry=0x50dfe0, callback=<optimized out>, user_data=<optimized out>) at gdkeventsource.c:367
#42 0x00007ffff714c6e8 in g_main_dispatch (context=0x50d4b0) at ../glib/gmain.c:3309
#43 0x00007ffff714c6e8 in g_main_context_dispatch (context=context@entry=0x50d4b0) at ../glib/gmain.c:3974
#44 0x00007ffff714ca70 in g_main_context_iterate (context=0x50d4b0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4047
#45 0x00007ffff714cd43 in g_main_loop_run (loop=0xc27610) at ../glib/gmain.c:4241
#46 0x00007ffff7a3ef05 in gtk_main () at gtkmain.c:1328
#47 0x000000000040854a in main (argc=<optimized out>, argv=<optimized out>) at main.c:91

helpful info:
commit c1b8618

If there is any additional information that I can provide, then please let me know!

@ceneblock
Copy link
Author

Did some additional debugging and got the following:

ERROR:gui-list-message.c:63:cb_clicked: assertion failed: (gtk_tree_selection_get_selected (selection, (GtkTreeModel **)&store, &iter))                                                                                                                                         
Bail out! ERROR:gui-list-message.c:63:cb_clicked: assertion failed: (gtk_tree_selection_get_selected (selection, (GtkTreeModel **)&store, &iter))

I've commented out the assertion in question and seems to be working. Will test some more before making a PR.

@ceneblock
Copy link
Author

PR #48 made

@onkarshinde
Copy link
Contributor

Interesting. The crash is not reproducible if you just repeatedly try to run the program. But it is reproducible if you select the error message in the list of messages (which highlights the line where the error is) and the try to run program again.

@onkarshinde onkarshinde self-assigned this May 16, 2020
@onkarshinde onkarshinde added this to the 1.4.5 milestone May 16, 2020
@onkarshinde onkarshinde linked a pull request May 16, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants