Bug 1461595 - Sumwars segfaults with current lua
Summary: Sumwars segfaults with current lua
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sumwars
Version: 32
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-14 22:00 UTC by Göran Uddeborg
Modified: 2021-04-30 20:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-30 20:12:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Göran Uddeborg 2017-06-14 22:00:41 UTC
Description of problem:
Sumwars on F26 crashes with a segmentation violation during startup.


Version-Release number of selected component (if applicable):
sumwars-0.5.8-10.fc26.x86_64
lua-5.3.4-3.fc26.x86_64


How reproducible:
Every time


Steps to Reproduce:
1. sumwars


Actual results:
A segmentation violation crash.


Expected results:
The game should start.


Additional info:
I installed the debuginfo packages and took a quick look.  I believe the below code src/code/eventsystem.cpp is guilty.  It initializes m_lua differently depending on the LUA_VERSION_NUM value.  But the lua in F26 sets this value to 503.  None of the cases match, and m_lua remains 0.  The following call of luaL_openlibs can't handle that, it expects it to have a valid value.  Googling a little, it seems the 502 version is to be used in 503 too.  Most likely, changing to "LUA_VERSION_NUM >= 502" is a better fix.

void EventSystem::init()
{
	if (m_lua !=0)
	{
		cleanup();
	}

#if LUA_VERSION_NUM == 501
	m_lua = lua_open();
#elif LUA_VERSION_NUM == 502
    m_lua = luaL_newstate();
#endif

	luaL_openlibs(m_lua);

Comment 1 Fedora End Of Life 2018-05-03 08:14:52 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 2 Göran Uddeborg 2018-05-10 14:45:01 UTC
The problem remains in F28.

sumwars-0.5.8-15.fc28.x86_64
lua-5.3.4-10.fc28.x86_64
lua-libs-5.3.4-10.fc28.x86_64

Comment 4 Ben Cotton 2019-05-02 20:25:14 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Göran Uddeborg 2019-05-07 11:46:45 UTC
The problem remains in F30.

sumwars-0.5.8-17.fc30.x86_64
lua-libs-5.3.5-5.fc30.x86_64

Comment 6 Ben Cotton 2020-04-30 22:04:15 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Göran Uddeborg 2020-05-07 19:58:48 UTC
The problem remains in F32.

sumwars-0.5.8-19.fc32.x86_64
lua-libs-5.3.5-7.fc32.x86_64

Comment 8 Bruno Wolff III 2020-05-13 22:22:32 UTC
I applied your suggested fix while working on a font issue for sumwars and it seems to get further now, but crashes eventually. For now I'm just build for rawhide as pushing still broken updates back to f32 isn't going to help people.

Comment 9 Bruno Wolff III 2020-05-14 10:08:02 UTC
So I found a refernce to the problem I was seeing at a short lived fork. The game will crash if you create a character before naming it. I was able to play a bit when I didn't do that. I'll have builds for f32 and f31 shortly.

Comment 10 Fedora Update System 2020-05-14 10:37:54 UTC
FEDORA-2020-e066dc3264 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-e066dc3264

Comment 11 Fedora Update System 2020-05-14 10:40:58 UTC
FEDORA-2020-3930c742da has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-3930c742da

Comment 12 Fedora Update System 2020-05-15 04:31:18 UTC
FEDORA-2020-3930c742da has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-3930c742da`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-3930c742da

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2020-05-15 05:10:07 UTC
FEDORA-2020-e066dc3264 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-e066dc3264`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-e066dc3264

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2020-05-23 02:44:26 UTC
FEDORA-2020-3930c742da has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2020-05-23 02:50:59 UTC
FEDORA-2020-e066dc3264 has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Program Management 2021-04-29 15:53:16 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 17 Göran Uddeborg 2021-04-30 20:12:39 UTC
This problem was solved by the above updates. The bug should have been closed when they were released.


Note You need to log in before you can comment on or make changes to this bug.