help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] gst-browser crashes when loading modified images.


From: Colton Lewis
Subject: Re: [Help-smalltalk] gst-browser crashes when loading modified images.
Date: Sat, 14 Sep 2019 00:24:03 +0000

I have built the software with debugging symbols and started using using
gdb to examine the crash point. Summary information is attached.

As best as I can tell, the problem occurs because loading the program
image resumes GTK's never-shut-down event loop and attempts to continue
processing events. The stale events from the last session cause
operations on nonexistent widgets, causing the crash. Interestingly, the
variables pointing to the nonexistent widgets seem to already be nil.

I don't yet have a good handle on the GTK code. The fix could be as
simple as clearing the event queue immediately before saving the
image. The question is if the existing code will recreate the GTK widgets by
resuming the same event loop with an empty queue. If not, things get tricky.

(gdb) stbt
(ip 16)CFunctionDescriptor(CCallable)>>#callInto:
(ip 6)GtkNotebook>>#setTabLabel:tabLabel:
(ip 18)GtkNotebookWidget>>#updateWidget:withLabel:
(ip 16)[] in GtkLauncher>>#subscribe
(ip 8)[] in StrongSubscription>>#value:
(ip 6)UndefinedObject>>#ifNil:
(ip 8)StrongSubscription>>#value:
(ip 6)[] in SubscriptionCollection>>#value:
(ip 24)SubscriptionCollection(OrderedCollection)>>#do:
(ip 10)SubscriptionCollection>>#value:
(ip 6)[] in SubscriptionRegistry>>#subscriptionsFor:announce:
(ip 18)IdentityDictionary(LookupTable)>>#at:ifPresent:
(ip 12)SubscriptionRegistry>>#subscriptionsFor:announce:
(ip 16)GtkAnnouncer(Announcer)>>#announce:
(ip 38)GtkClassBrowserWidget>>#onNamespaceChanged
(ip 0)<bottom>
(gdb) ststack
nil, nil

(gdb) stprocs
Active process: <Proc 0x7f78bc08d680 prio: 4 next 0x7f78bbe1e1d0 context 
0x7f78bbef7b30>
  Priority 4: First 0x7f78bc08d680 last 0x7f78bbdaa7e0 
    <Proc 0x7f78bc08d680 prio: 4 context 0x7f78bbef7b30> 
    <Proc 0x7f78bbe1e1d0 prio: 4 context 0x7f78bbe059d0> 
    <Proc 0x7f78bc090d80 prio: 4 context 0x7f78bbdda140> 
    <Proc 0x7f78bc08dfa0 prio: 4 context 0x7f78bbdede40> 
    <Proc 0x7f78bbdaa7e0 prio: 4 context 0x7f78bbdf9870> 
  Priority 1: First 0x7f78bba4b080 last 0x7f78bba4b080 
    <Proc 0x7f78bba4b080 prio: 1 context 0x7f78bba4b5a0> 

Colton Lewis <address@hidden> writes:

>> sorry for experiencing a crash. I don't remember if this part ever worked. I 
>> think
>> what happens is that after the image resumes pointers to the old GTK+ are 
>> dangling.
>
> That sort of issue is the first thing I would suspect. My confusion
> is that saving an image seems like a core feature that has
> to work every time for the browser to be useful. As it stands, the
> browser feels unpolished. This shows through in features with odd menu
> locations and the weak search facilities, but those are minor in
> comparison.
>
> Inability to recover an image means working around the issue by filing
> out any changes made with the browser and remembering to load them in
> later or giving up the browser entirely.
>
> Who originally developed the browser?
>
>> It would be great if you want to see what happens. The first item is to get 
>> debug
>> symbols installed to see where in GST it crashed.
>
> I have free time this month before I start a new position. I will do
> this and may be back for guidance.
>
> "Holger Freyther" <address@hidden> writes:
>
>>> On 3. Sep 2019, at 01:18, Colton via help-smalltalk <address@hidden> wrote:
>>>
>>
>> Hi,
>>
>> sorry for experiencing a crash. I don't remember if this part ever worked. I 
>> think
>> what happens is that after the image resumes pointers to the old GTK+ are 
>> dangling.
>>
>> It would be great if you want to see what happens. The first item is to get 
>> debug
>> symbols installed to see where in GST it crashed.
>>
>> To see which Smalltalk code was executed the best method is to use
>> _gst_show_backtrace(stdout) within gdb.
>>
>> If you take a look at .gdbinit of the smalltalk sourcecode you will find a 
>> macro
>> like this. If you load the file typing stbt will give you the Smalltalk 
>> backtrace
>>
>>
>> define stbt
>> set unwindonsignal on
>> call _gst_show_backtrace (stdout)
>> call (void)fflush(stdout)
>> set unwindonsignal off
>> end
>> document stbt
>> Print the backtrace of the currently running Smalltalk process.
>> end
>>
>>
>>> Hello,
>>>
>>> Yesterday I posted on #gnu-smalltalk and got no response, and since the
>>> issue tracker seems to only be open to registered users and registration
>>> is closed, I am reaching out any way I can.
>>>
>>> Here is more detailed problem information.
>>>
>>> OS: Arch Linux
>>> GST: GNU Smalltalk version 3.2.92-edb6bad6
>>>
>>> Problem description: gst-browser crashes when loading previously saved 
>>> images.
>>>
>>> Steps to reproduce:
>>> 1. Create new image with `gst-browser -iI test.im`.
>>> 2. Create new class or namespace.
>>> 3. Exit gst-browser, saving the image.
>>> 4. Attempt to load image with `gst-browser -I test.im`.
>>
>>
>>
>>
>>> Error output:
>>> a Smalltalk Stream:3: Aborted
>>> a Smalltalk Stream:3: Error occurred while not in byte code interpreter!!
>>> /usr/lib/libgst.so.7(+0x75b68)[0x7f5df95d8b68]
>>> /usr/lib/libc.so.6(+0x3a7e0)[0x7f5df93da7e0]
>>> /usr/lib/libc.so.6(gsignal+0x145)[0x7f5df93da755]
>>> /usr/lib/libc.so.6(abort+0x125)[0x7f5df93c5851]
>>> /usr/lib/libgst.so.7(+0x10042)[0x7f5df9573042]
>>> /usr/lib/libsigsegv.so.2(+0xd4c)[0x7f5df919cd4c]
>>> /usr/lib/libc.so.6(+0x3a7e0)[0x7f5df93da7e0]
>>> /usr/lib/libgtk-x11-2.0.so.0(gtk_notebook_set_tab_label+0x2f)[0x7f5df3a873ef]
>>> /usr/lib/libffi.so.6(ffi_call_unix64+0x4c)[0x7f5df91976d0]
>>> /usr/lib/libffi.so.6(ffi_call+0x230)[0x7f5df91970a0]
>>> aborted (core dumped)
>>>
>>> Full backtrace:
>>> #0  0x00007f5df93da755 in raise () at /usr/lib/libc.so.6
>>> #1  0x00007f5df93c5851 in abort () at /usr/lib/libc.so.6
>>> #2  0x00007f5df9573042 in  () at /usr/lib/libgst.so.7
>>> #3  0x00007f5df919cd4c in  () at /usr/lib/libsigsegv.so.2
>>> #4  0x00007f5df93da7e0 in <signal handler called> () at /usr/lib/libc.so.6
>>> #5  0x00007f5df3a873ef in gtk_notebook_set_tab_label () at 
>>> /usr/lib/libgtk-x11-2.0.so.0
>>> #6  0x00007f5df91976d0 in ffi_call_unix64 () at /usr/lib/libffi.so.6
>>> #7  0x00007f5df91970a0 in ffi_call () at /usr/lib/libffi.so.6
>>> #8  0x00007f5df95a7e59 in  () at /usr/lib/libgst.so.7
>>> #9  0x00007f5df95cb2b7 in  () at /usr/lib/libgst.so.7
>>> #10 0x00007f5df95c9af4 in  () at /usr/lib/libgst.so.7
>>> #11 0x00007f5df95d18e6 in  () at /usr/lib/libgst.so.7
>>> #12 0x00007f5df95d82c5 in  () at /usr/lib/libgst.so.7
>>> #13 0x00007f5df526c938 in  () at /usr/lib/libgst-gobject.so.1
>>> #14 0x00007f5df4959caa in g_closure_invoke () at 
>>> /usr/lib/libgobject-2.0.so.0
>>> #15 0x00007f5df4947706 in  () at /usr/lib/libgobject-2.0.so.0
>>> #16 0x00007f5df494b89a in g_signal_emit_valist () at 
>>> /usr/lib/libgobject-2.0.so.0
>>> #17 0x00007f5df494c700 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
>>> #18 0x00007f5df3b4c2e7 in gtk_tree_selection_select_path () at 
>>> /usr/lib/libgtk-x11-2.0.so.0
>>> #19 0x00007f5df3b4c3e6 in gtk_tree_selection_select_iter () at 
>>> /usr/lib/libgtk-x11-2.0.so.0
>>> #20 0x00007f5df91976d0 in ffi_call_unix64 () at /usr/lib/libffi.so.6
>>> #21 0x00007f5df91970a0 in ffi_call () at /usr/lib/libffi.so.6
>>> #22 0x00007f5df95a7e59 in  () at /usr/lib/libgst.so.7
>>> #23 0x00007f5df95cb2b7 in  () at /usr/lib/libgst.so.7
>>> #24 0x00007f5df95c9af4 in  () at /usr/lib/libgst.so.7
>>> #25 0x00007f5df95d18e6 in  () at /usr/lib/libgst.so.7
>>> #26 0x00007f5df95d82c5 in  () at /usr/lib/libgst.so.7
>>> #27 0x00007f5df95871b6 in  () at /usr/lib/libgst.so.7
>>> #28 0x00007f5df95778a9 in  () at /usr/lib/libgst.so.7
>>> #29 0x00007f5df9578c70 in  () at /usr/lib/libgst.so.7
>>> #30 0x00007f5df957a6f6 in  () at /usr/lib/libgst.so.7
>>> #31 0x00007f5df957ad38 in  () at /usr/lib/libgst.so.7
>>> #32 0x00007f5df957b268 in  () at /usr/lib/libgst.so.7
>>> #33 0x00007f5df957ce8f in  () at /usr/lib/libgst.so.7
>>> #34 0x00007f5df95cbabf in  () at /usr/lib/libgst.so.7
>>> #35 0x00007f5df95cbb9d in  () at /usr/lib/libgst.so.7
>>> #36 0x00007f5df95c9af4 in  () at /usr/lib/libgst.so.7
>>> #37 0x00007f5df95d1470 in  () at /usr/lib/libgst.so.7
>>> #38 0x00007f5df95d82c5 in  () at /usr/lib/libgst.so.7
>>> #39 0x00007f5df95871b6 in  () at /usr/lib/libgst.so.7
>>> #40 0x00007f5df95778a9 in  () at /usr/lib/libgst.so.7
>>> #41 0x00007f5df9578c70 in  () at /usr/lib/libgst.so.7
>>> #42 0x00007f5df957a6f6 in  () at /usr/lib/libgst.so.7
>>> #43 0x00007f5df957ad38 in  () at /usr/lib/libgst.so.7
>>> #44 0x00007f5df957b268 in  () at /usr/lib/libgst.so.7
>>> #45 0x00007f5df957ce8f in  () at /usr/lib/libgst.so.7
>>> #46 0x00007f5df95cbabf in  () at /usr/lib/libgst.so.7
>>> #47 0x00007f5df95cbb9d in  () at /usr/lib/libgst.so.7
>>> #48 0x00007f5df95c9af4 in  () at /usr/lib/libgst.so.7
>>> #49 0x00007f5df95d1470 in  () at /usr/lib/libgst.so.7
>>> #50 0x00007f5df95d82c5 in  () at /usr/lib/libgst.so.7
>>> #51 0x00007f5df95871b6 in  () at /usr/lib/libgst.so.7
>>> #52 0x00007f5df95778a9 in  () at /usr/lib/libgst.so.7
>>> #53 0x00007f5df957a1d2 in  () at /usr/lib/libgst.so.7
>>> #54 0x00007f5df957ad38 in  () at /usr/lib/libgst.so.7
>>> #55 0x00007f5df957b268 in  () at /usr/lib/libgst.so.7
>>> #56 0x00007f5df957ce8f in  () at /usr/lib/libgst.so.7
>>> #57 0x00007f5df95aa1b0 in  () at /usr/lib/libgst.so.7
>>> #58 0x000055ab9a0f92dd in main ()
>>>
>>> _______________________________________________
>>> help-smalltalk mailing list
>>> address@hidden
>>> https://lists.gnu.org/mailman/listinfo/help-smalltalk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]