Discussion:
[Iup-users] segfault using Lua iup.list dropdown on ubuntu 16.10
reyalp
2016-12-26 20:15:39 UTC
Permalink
Hi,

A user of an Lua IUP application I maintain (chdkptp) reported crashes
on several recent Linux distros, including ubuntu 16.10, Fedora 25 and
Manjaro.

The crash appears to be triggered when a iup.list with dropdown set is
mapped, and can be reproduced using just the list.lua example included
with IUP.

This happens on ubuntu 16.10, and not on 16.04 (both x64, default
installs with unity desktop). I used the pre-built libraries from
sourceforge, but the user reported IUP built from source on the
affected distros has the same problem.

I reproduced the crash with the following:

Download iup-3.20-Lua52_Linux44_64_bin.tar.gz

Download http://webserver2.tecgraf.puc-rio.br/iup/examples/Lua/list.lua

Run
LD_LIBRARY_PATH=`pwd` ./lua52 list.lua

If the definition of list_dropdown is commented out, or list_dropdown
is not included in frm_prize it does not crash.

The crash gives a stack trace like:

LD_LIBRARY_PATH=. gdb --args ./lua52 list.lua
GNU gdb (Ubuntu 7.11.90.20161005-0ubuntu1) 7.11.90.20161005-git
...

Thread 1 "lua52" received signal SIGSEGV, Segmentation fault.
0x00007ffff53d7946 in g_type_check_instance_cast ()
from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
(gdb) bt
#0 0x00007ffff53d7946 in g_type_check_instance_cast ()
from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#1 0x00007ffff6bcda1b in gtkListMapMethod () from ./libiup.so
#2 0x00007ffff6b81854 in IupMap () from ./libiup.so
#3 0x00007ffff6b818a8 in IupMap () from ./libiup.so
#4 0x00007ffff6b818a8 in IupMap () from ./libiup.so
#5 0x00007ffff6b818a8 in IupMap () from ./libiup.so
#6 0x00007ffff6b819e7 in IupShowXY () from ./libiup.so
#7 0x00007ffff6e784a8 in ShowXY () from ./libiuplua52.so
#8 0x00000000004085ad in luaD_precall ()
#9 0x0000000000412dbc in luaV_execute ()
#10 0x00000000004088ee in luaD_call ()
#11 0x0000000000407f2f in luaD_rawrunprotected ()
#12 0x0000000000408b31 in luaD_pcall ()
#13 0x0000000000406521 in lua_pcallk ()
#14 0x0000000000404216 in docall ()
#15 0x0000000000404e08 in pmain ()
#16 0x00000000004085ad in luaD_precall ()
#17 0x00000000004088e2 in luaD_call ()
#18 0x0000000000407f2f in luaD_rawrunprotected ()
#19 0x0000000000408b31 in luaD_pcall ()
#20 0x0000000000406521 in lua_pcallk ()
#21 0x0000000000403fbb in main ()

Best regards, and thanks for IUP
Antonio Scuri
2016-12-27 01:01:48 UTC
Permalink
ok. I'll take a look and get back to you in a few days.

Best,
Scuri
Post by reyalp
Hi,
A user of an Lua IUP application I maintain (chdkptp) reported crashes
on several recent Linux distros, including ubuntu 16.10, Fedora 25 and
Manjaro.
The crash appears to be triggered when a iup.list with dropdown set is
mapped, and can be reproduced using just the list.lua example included
with IUP.
This happens on ubuntu 16.10, and not on 16.04 (both x64, default
installs with unity desktop). I used the pre-built libraries from
sourceforge, but the user reported IUP built from source on the
affected distros has the same problem.
Download iup-3.20-Lua52_Linux44_64_bin.tar.gz
Download http://webserver2.tecgraf.puc-rio.br/iup/examples/Lua/list.lua
Run
LD_LIBRARY_PATH=`pwd` ./lua52 list.lua
If the definition of list_dropdown is commented out, or list_dropdown
is not included in frm_prize it does not crash.
LD_LIBRARY_PATH=. gdb --args ./lua52 list.lua
GNU gdb (Ubuntu 7.11.90.20161005-0ubuntu1) 7.11.90.20161005-git
...
Thread 1 "lua52" received signal SIGSEGV, Segmentation fault.
0x00007ffff53d7946 in g_type_check_instance_cast ()
from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
(gdb) bt
#0 0x00007ffff53d7946 in g_type_check_instance_cast ()
from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#1 0x00007ffff6bcda1b in gtkListMapMethod () from ./libiup.so
#2 0x00007ffff6b81854 in IupMap () from ./libiup.so
#3 0x00007ffff6b818a8 in IupMap () from ./libiup.so
#4 0x00007ffff6b818a8 in IupMap () from ./libiup.so
#5 0x00007ffff6b818a8 in IupMap () from ./libiup.so
#6 0x00007ffff6b819e7 in IupShowXY () from ./libiup.so
#7 0x00007ffff6e784a8 in ShowXY () from ./libiuplua52.so
#8 0x00000000004085ad in luaD_precall ()
#9 0x0000000000412dbc in luaV_execute ()
#10 0x00000000004088ee in luaD_call ()
#11 0x0000000000407f2f in luaD_rawrunprotected ()
#12 0x0000000000408b31 in luaD_pcall ()
#13 0x0000000000406521 in lua_pcallk ()
#14 0x0000000000404216 in docall ()
#15 0x0000000000404e08 in pmain ()
#16 0x00000000004085ad in luaD_precall ()
#17 0x00000000004088e2 in luaD_call ()
#18 0x0000000000407f2f in luaD_rawrunprotected ()
#19 0x0000000000408b31 in luaD_pcall ()
#20 0x0000000000406521 in lua_pcallk ()
#21 0x0000000000403fbb in main ()
Best regards, and thanks for IUP
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
https://lists.sourceforge.net/lists/listinfo/iup-users
Antonio Scuri
2017-01-03 18:12:05 UTC
Permalink
Hi,

I only have Ubuntu 16.04 installed. But I think the problem should be
with the GTK version. It is using GTK 3.18 and as you mention it is
working. I installed all updates and it is still working. It used to be
simple to update to .10 version but I'm missing the path...

Can you check which is the GTK version where the problem is occurring?

Best,
Scuri
Post by Antonio Scuri
ok. I'll take a look and get back to you in a few days.
Best,
Scuri
Post by reyalp
Hi,
A user of an Lua IUP application I maintain (chdkptp) reported crashes
on several recent Linux distros, including ubuntu 16.10, Fedora 25 and
Manjaro.
The crash appears to be triggered when a iup.list with dropdown set is
mapped, and can be reproduced using just the list.lua example included
with IUP.
This happens on ubuntu 16.10, and not on 16.04 (both x64, default
installs with unity desktop). I used the pre-built libraries from
sourceforge, but the user reported IUP built from source on the
affected distros has the same problem.
Download iup-3.20-Lua52_Linux44_64_bin.tar.gz
Download http://webserver2.tecgraf.puc-rio.br/iup/examples/Lua/list.lua
Run
LD_LIBRARY_PATH=`pwd` ./lua52 list.lua
If the definition of list_dropdown is commented out, or list_dropdown
is not included in frm_prize it does not crash.
LD_LIBRARY_PATH=. gdb --args ./lua52 list.lua
GNU gdb (Ubuntu 7.11.90.20161005-0ubuntu1) 7.11.90.20161005-git
...
Thread 1 "lua52" received signal SIGSEGV, Segmentation fault.
0x00007ffff53d7946 in g_type_check_instance_cast ()
from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
(gdb) bt
#0 0x00007ffff53d7946 in g_type_check_instance_cast ()
from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#1 0x00007ffff6bcda1b in gtkListMapMethod () from ./libiup.so
#2 0x00007ffff6b81854 in IupMap () from ./libiup.so
#3 0x00007ffff6b818a8 in IupMap () from ./libiup.so
#4 0x00007ffff6b818a8 in IupMap () from ./libiup.so
#5 0x00007ffff6b818a8 in IupMap () from ./libiup.so
#6 0x00007ffff6b819e7 in IupShowXY () from ./libiup.so
#7 0x00007ffff6e784a8 in ShowXY () from ./libiuplua52.so
#8 0x00000000004085ad in luaD_precall ()
#9 0x0000000000412dbc in luaV_execute ()
#10 0x00000000004088ee in luaD_call ()
#11 0x0000000000407f2f in luaD_rawrunprotected ()
#12 0x0000000000408b31 in luaD_pcall ()
#13 0x0000000000406521 in lua_pcallk ()
#14 0x0000000000404216 in docall ()
#15 0x0000000000404e08 in pmain ()
#16 0x00000000004085ad in luaD_precall ()
#17 0x00000000004088e2 in luaD_call ()
#18 0x0000000000407f2f in luaD_rawrunprotected ()
#19 0x0000000000408b31 in luaD_pcall ()
#20 0x0000000000406521 in lua_pcallk ()
#21 0x0000000000403fbb in main ()
Best regards, and thanks for IUP
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
https://lists.sourceforge.net/lists/listinfo/iup-users
reyalp
2017-01-04 07:36:35 UTC
Permalink
On Ubuntu 16.10, libgtk-3-0 is 3.20.9.

I agree GTK version seems likely to be the cause.

16.04 is an LTS release, so you have to change some setting to update
to 16.10, described on https://wiki.ubuntu.com/YakketyYak/ReleaseNotes

Thanks for looking into this
Hi,
I only have Ubuntu 16.04 installed. But I think the problem should be with
the GTK version. It is using GTK 3.18 and as you mention it is working. I
installed all updates and it is still working. It used to be simple to
update to .10 version but I'm missing the path...
Can you check which is the GTK version where the problem is occurring?
Best,
Scuri
Post by Antonio Scuri
ok. I'll take a look and get back to you in a few days.
Best,
Scuri
Post by reyalp
Hi,
A user of an Lua IUP application I maintain (chdkptp) reported crashes
on several recent Linux distros, including ubuntu 16.10, Fedora 25 and
Manjaro.
The crash appears to be triggered when a iup.list with dropdown set is
mapped, and can be reproduced using just the list.lua example included
with IUP.
This happens on ubuntu 16.10, and not on 16.04 (both x64, default
installs with unity desktop). I used the pre-built libraries from
sourceforge, but the user reported IUP built from source on the
affected distros has the same problem.
Download iup-3.20-Lua52_Linux44_64_bin.tar.gz
Download http://webserver2.tecgraf.puc-rio.br/iup/examples/Lua/list.lua
Run
LD_LIBRARY_PATH=`pwd` ./lua52 list.lua
If the definition of list_dropdown is commented out, or list_dropdown
is not included in frm_prize it does not crash.
LD_LIBRARY_PATH=. gdb --args ./lua52 list.lua
GNU gdb (Ubuntu 7.11.90.20161005-0ubuntu1) 7.11.90.20161005-git
...
Thread 1 "lua52" received signal SIGSEGV, Segmentation fault.
0x00007ffff53d7946 in g_type_check_instance_cast ()
from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
(gdb) bt
#0 0x00007ffff53d7946 in g_type_check_instance_cast ()
from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#1 0x00007ffff6bcda1b in gtkListMapMethod () from ./libiup.so
#2 0x00007ffff6b81854 in IupMap () from ./libiup.so
#3 0x00007ffff6b818a8 in IupMap () from ./libiup.so
#4 0x00007ffff6b818a8 in IupMap () from ./libiup.so
#5 0x00007ffff6b818a8 in IupMap () from ./libiup.so
#6 0x00007ffff6b819e7 in IupShowXY () from ./libiup.so
#7 0x00007ffff6e784a8 in ShowXY () from ./libiuplua52.so
#8 0x00000000004085ad in luaD_precall ()
#9 0x0000000000412dbc in luaV_execute ()
#10 0x00000000004088ee in luaD_call ()
#11 0x0000000000407f2f in luaD_rawrunprotected ()
#12 0x0000000000408b31 in luaD_pcall ()
#13 0x0000000000406521 in lua_pcallk ()
#14 0x0000000000404216 in docall ()
#15 0x0000000000404e08 in pmain ()
#16 0x00000000004085ad in luaD_precall ()
#17 0x00000000004088e2 in luaD_call ()
#18 0x0000000000407f2f in luaD_rawrunprotected ()
#19 0x0000000000408b31 in luaD_pcall ()
#20 0x0000000000406521 in lua_pcallk ()
#21 0x0000000000403fbb in main ()
Best regards, and thanks for IUP
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
https://lists.sourceforge.net/lists/listinfo/iup-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
https://lists.sourceforge.net/lists/listinfo/iup-users
Antonio Scuri
2017-01-05 17:47:20 UTC
Permalink
Hi,

Just fixed and commited to SVN:

Fixed: crash at IupList in GTK 3.20 when DROPDOWN=Yes and EDITBOX=NO. But
in that case keyboard, focus and enter/leave window callbacks stopped
working.

GTK changed how things are done for the control and those callbacks are
not working anymore. There is still work to do, but the crash is gone.

Best,
Scuri
Post by reyalp
On Ubuntu 16.10, libgtk-3-0 is 3.20.9.
I agree GTK version seems likely to be the cause.
16.04 is an LTS release, so you have to change some setting to update
to 16.10, described on https://wiki.ubuntu.com/YakketyYak/ReleaseNotes
Thanks for looking into this
Post by Antonio Scuri
Hi,
I only have Ubuntu 16.04 installed. But I think the problem should be
with
Post by Antonio Scuri
the GTK version. It is using GTK 3.18 and as you mention it is working. I
installed all updates and it is still working. It used to be simple to
update to .10 version but I'm missing the path...
Can you check which is the GTK version where the problem is occurring?
Best,
Scuri
Post by Antonio Scuri
ok. I'll take a look and get back to you in a few days.
Best,
Scuri
Post by reyalp
Hi,
A user of an Lua IUP application I maintain (chdkptp) reported crashes
on several recent Linux distros, including ubuntu 16.10, Fedora 25 and
Manjaro.
The crash appears to be triggered when a iup.list with dropdown set is
mapped, and can be reproduced using just the list.lua example included
with IUP.
This happens on ubuntu 16.10, and not on 16.04 (both x64, default
installs with unity desktop). I used the pre-built libraries from
sourceforge, but the user reported IUP built from source on the
affected distros has the same problem.
Download iup-3.20-Lua52_Linux44_64_bin.tar.gz
Download http://webserver2.tecgraf.puc-rio.br/iup/examples/Lua/list.
lua
Post by Antonio Scuri
Post by Antonio Scuri
Post by reyalp
Run
LD_LIBRARY_PATH=`pwd` ./lua52 list.lua
If the definition of list_dropdown is commented out, or list_dropdown
is not included in frm_prize it does not crash.
LD_LIBRARY_PATH=. gdb --args ./lua52 list.lua
GNU gdb (Ubuntu 7.11.90.20161005-0ubuntu1) 7.11.90.20161005-git
...
Thread 1 "lua52" received signal SIGSEGV, Segmentation fault.
0x00007ffff53d7946 in g_type_check_instance_cast ()
from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
(gdb) bt
#0 0x00007ffff53d7946 in g_type_check_instance_cast ()
from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#1 0x00007ffff6bcda1b in gtkListMapMethod () from ./libiup.so
#2 0x00007ffff6b81854 in IupMap () from ./libiup.so
#3 0x00007ffff6b818a8 in IupMap () from ./libiup.so
#4 0x00007ffff6b818a8 in IupMap () from ./libiup.so
#5 0x00007ffff6b818a8 in IupMap () from ./libiup.so
#6 0x00007ffff6b819e7 in IupShowXY () from ./libiup.so
#7 0x00007ffff6e784a8 in ShowXY () from ./libiuplua52.so
#8 0x00000000004085ad in luaD_precall ()
#9 0x0000000000412dbc in luaV_execute ()
#10 0x00000000004088ee in luaD_call ()
#11 0x0000000000407f2f in luaD_rawrunprotected ()
#12 0x0000000000408b31 in luaD_pcall ()
#13 0x0000000000406521 in lua_pcallk ()
#14 0x0000000000404216 in docall ()
#15 0x0000000000404e08 in pmain ()
#16 0x00000000004085ad in luaD_precall ()
#17 0x00000000004088e2 in luaD_call ()
#18 0x0000000000407f2f in luaD_rawrunprotected ()
#19 0x0000000000408b31 in luaD_pcall ()
#20 0x0000000000406521 in lua_pcallk ()
#21 0x0000000000403fbb in main ()
Best regards, and thanks for IUP
------------------------------------------------------------
------------------
Post by Antonio Scuri
Post by Antonio Scuri
Post by reyalp
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
https://lists.sourceforge.net/lists/listinfo/iup-users
------------------------------------------------------------
------------------
Post by Antonio Scuri
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
https://lists.sourceforge.net/lists/listinfo/iup-users
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
https://lists.sourceforge.net/lists/listinfo/iup-users
reyalp
2017-03-06 06:03:05 UTC
Permalink
I know this is a late reply, but FWIW I verified that that IUP 3.21
resolves the dropdown segfault under ubuntu 16.10 for my application.
Thanks again!
Hi,
Fixed: crash at IupList in GTK 3.20 when DROPDOWN=Yes and EDITBOX=NO. But in
that case keyboard, focus and enter/leave window callbacks stopped working.
GTK changed how things are done for the control and those callbacks are
not working anymore. There is still work to do, but the crash is gone.
Best,
Scuri
Loading...