Warzone2100 / old-trac-import

Archived Import of (old) Warzone 2100 Trac
0 stars 0 forks source link

warzone crashes on startup when initializing the exception handler #65

Closed wzdev-ci closed 15 years ago

wzdev-ci commented 15 years ago

resolution_fixed type_bug | by arthur.huillet@...


Hello,

warzone2100 crashes immediately with a segfault whenever I try to start it.

$ warzone2100 Segmentation fault

Here is the backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xa6cf4920 (LWP 29555)]
0xa79bcd7b in std::locale::operator= () from /usr/i486-slackware-linux/lib/libstdc++.so.5
(gdb) where
#0  0xa79bcd7b in std::locale::operator= () from /usr/i486-slackware-linux/lib/libstdc++.so.5
#1  0xa79b5ab1 in std::ios_base::_M_init () from /usr/i486-slackware-linux/lib/libstdc++.so.5
#2  0xa79b3d94 in std::basic_ios<char, std::char_traits<char> >::init () from /usr/i486-slackware-linux/lib/libstdc++.so.5
#3  0x081e42b5 in createHeader (argc=1, argv=0xafdc7a14) at /usr/lib/gcc/i486-slackware-linux/4.2.3/../../../../include/c++/4.2.3/sstream:414
#4  0x081e30a1 in setupExceptionHandler (argc=1, argv=0xafdc7a14) at exceptionhandler.c:537
#5  0x080b98a6 in main (argc=1, argv=0xafdc7a14) at main.c:834

Issue migrated from trac:65 at 2022-04-15 17:41:45 -0700

wzdev-ci commented 15 years ago

Buginator commented


Can you try trunk or branches/2.1, and see if you have the same issue?

That backtrace isn't that helpful...

Also, list your hardware specs.

wzdev-ci commented 15 years ago

arthur.huillet@... commented


Hi,

sorry for the delay. I'm the original reporter of this bug and will look into what you ask during the weekend.

Hardware specs: Nvidia Geforce 4Ti with binary drivers (96xx), Athlon XP 2GHz, 1GB RAM.

wzdev-ci commented 15 years ago

anonymous commented


Hi,

further investigation won't be possible in the forthcoming days after all (bad automake version that I cannot/do not wish to change), sorry for the incomplete bug report.

Note that I "worked around" the crash by commenting out the call to createHeader in dbgDumpInit() (lib/exceptionhandler/dumpinfo.cpp), and the game seems to work fine like that.

wzdev-ci commented 15 years ago

Giel edited the issue description

wzdev-ci commented 15 years ago

Giel commented


Wrapped the backtrace in a code block

wzdev-ci commented 15 years ago

anonymous commented


Hi,

Replying to Warzone2100/old-trac-import#65 (comment:1):

Can you try trunk or branches/2.1, and see if you have the same issue?

That backtrace isn't that helpful...

I have just tried with rev. 6126, I have the exact same problem:

#0  0xa7911d7b in std::locale::operator= () from /usr/i486-slackware-linux/lib/libstdc++.so.5
#1  0xa790aab1 in std::ios_base::_M_init () from /usr/i486-slackware-linux/lib/libstdc++.so.5
#2  0xa7908d94 in std::basic_ios<char, std::char_traits<char> >::init () from /usr/i486-slackware-linux/lib/libstdc++.so.5
#3  0x08244e66 in createHeader (argc=2, argv=0xafa8bed4) at /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../include/c++/4.2.4/sstream:414
#4  0x08243c43 in setupExceptionHandler (argc=2, argv=0xafa8bed4) at exceptionhandler.c:708
#5  0x0810c46e in main (argc=2, argv=0xafa8bed4) at main.c:830

What extra information will you need?

wzdev-ci commented 15 years ago

Buginator commented


If you can, compile a debug build (should be the default), then run it under gdb, and post the 'bt full' output.

You may also want to update to beta 5.

wzdev-ci commented 15 years ago

anonymous commented


Hi,

(gdb) bt full
#0  0xa798ed7b in std::locale::operator= () from /usr/i486-slackware-linux/lib/libstdc++.so.5
No symbol table info available.
#1  0xa7987ab1 in std::ios_base::_M_init () from /usr/i486-slackware-linux/lib/libstdc++.so.5
No symbol table info available.
#2  0xa7985d94 in std::basic_ios<char, std::char_traits<char> >::init () from /usr/i486-slackware-linux/lib/libstdc++.so.5
No symbol table info available.
#3  0x08244e66 in createHeader (argc=1, argv=0xafe69ab4) at /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../include/c++/4.2.4/sstream:414
        os = <incomplete type>
        physfs_version # {major 153 '\231', minor # 230 'æ', patch 175 '¯'}
        __FUNCTION__ = "createHeader"
#4  0x08243c43 in setupExceptionHandler (argc=1, argv=0xafe69ab4) at exceptionhandler.c:708
        programCommand = 0x0
        currentTime = 136594832
        __PRETTY_FUNCTION__ = "setupExceptionHandler"
#5  0x0810c46e in main (argc=1, argv=0xafe69ab4) at main.c:830
        __FUNCTION__ = "main"
        __PRETTY_FUNCTION__ = "main"

As I said this is with rev. 6126, isn't that more recent than beta5 ?

wzdev-ci commented 15 years ago

Giel changed operating_system which not transferred by tractive

wzdev-ci commented 15 years ago

Giel changed milestone from ` to2.1`

wzdev-ci commented 15 years ago

Giel uploaded file 0001-Force-using-the-C-compiler-as-linker.patch (1.1 KiB)

Force using the C++ compiler as linker

wzdev-ci commented 15 years ago

Giel commented


Can you try applying attachment:0001-Force-using-the-C-compiler-as-linker.patch to see whether it fixes your problem?

wzdev-ci commented 15 years ago

Giel commented


Also looking at this line:

#3  0x08244e66 in createHeader (argc=1, argv=0xafe69ab4) at /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../include/c++/4.2.4/sstream:414

It appears that something goes wrong in your compiler, because that function is found in [browser:trunk/lib/exceptionhandler/dumpinfo.cpp lib/exceptionhandler/dumpinfo.cpp] not in . Especially with a debug build (--enable-debug as parameter to ./configure) these line numbers should not be screwed up because optimisations are disabled then.

PS [6126] is newer indeed.

wzdev-ci commented 15 years ago

anonymous commented


Hi,

yes, this does fix the problem.

Could you please explain what this changes and why it works? I'd like to understand the issue. I am quite puzzled :)

wzdev-ci commented 15 years ago

anonymous commented


(note that the game starts but segfaults later on, below is a backtrace, I can post that as a separate ticket if you feel this is completely unrelated)

(the crash is inside freetype, the backtrace is useless:)

(gdb) bt full

0 0xa7721484 in FT_New_Size () from /usr/lib/libfreetype.so.6

No symbol table info available.

1 0xa776844a in ?? () from /usr/lib/libfreetype.so.6

No symbol table info available.

2 0x104d8b20 in ?? ()

No symbol table info available.

3 0xafd28ba4 in ?? ()

No symbol table info available.

4 0xafd28ba8 in ?? ()

No symbol table info available.

5 0xa7720914 in ft_mem_alloc () from /usr/lib/libfreetype.so.6

No symbol table info available.

6 0xa77666e8 in ?? () from /usr/lib/libfreetype.so.6

No symbol table info available.

7 0x093a5ae8 in ?? ()

No symbol table info available.

8 0xafd28c5c in ?? ()

No symbol table info available.

9 0x08e50c88 in ?? ()

No symbol table info available.

10 0xa7e47d18 in ?? ()

No symbol table info available.

11 0xafd28c1c in ?? ()

No symbol table info available.

12 0xafd28c5c in ?? ()

No symbol table info available.

13 0xa7d905a8 in __glcCommonArea () from /usr/lib/libGLC.so.0

No symbol table info available.

14 0x00000000 in ?? ()

No symbol table info available.

Thanks!

wzdev-ci commented 15 years ago

Giel changed status from new to accepted

wzdev-ci commented 15 years ago

Giel changed owner from ` toGiel`

wzdev-ci commented 15 years ago

Giel commented


Replying to Warzone2100/old-trac-import#65 (comment:12):

(note that the game starts but segfaults later on, below is a backtrace, I can post that as a separate ticket if you feel this is completely unrelated)

(the crash is inside freetype, the backtrace is useless:)

Yes on both accounts, please open a separate ticket for this issue as its unrelated, and the back trace is indeed useless (please include it in the ticket though, if only to demonstrate its uselessness).

wzdev-ci commented 15 years ago

Giel changed status from accepted to closed

wzdev-ci commented 15 years ago

Giel changed resolution from ` tofixed`

wzdev-ci commented 15 years ago

Giel changed component from other to Build system

wzdev-ci commented 15 years ago

Giel changed title from Wz2100 2.1beta4 crashes on startup to warzone crashes on startup when initializing the exception handler

wzdev-ci commented 15 years ago

Giel commented


Replying to Warzone2100/old-trac-import#65 (comment:11):

yes, this does fix the problem.

Nice, that confirms my suspicions of the cause.

Could you please explain what this changes and why it works? I'd like to understand the issue. I am quite puzzled :)

That patch forces automake to use the C++ linker instead of the C linker. The C++ linker should include some initialisation code which the C++ library requires. Not including this can cause some nasty and strange problems, as you yourself experienced.

Fixed in [6142] and [6143].

wzdev-ci commented 14 years ago

Buginator removed milestone (was 2.1)

wzdev-ci commented 14 years ago

Buginator commented


Milestone 2.1 deleted

wzdev-ci commented 7 years ago

Per Inge Mathisen per.mathisen@... commented


In https://github.com/Warzone2100/warzone2100/commit/dee354faa76b931719cf255bf8a09759c81e4d6b:

#CommitTicketReference repository="" revision="dee354faa76b931719cf255bf8a09759c81e4d6b"
Merge pull request #65 from ckorn/missing_arg

Add format to snprintf