Project

General

Profile

Bug #681311

2.6 Windows msys1 Qt client crashes on startup

Added by Jacob Nevins 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
High
Category:
gui-qt
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

On my 32-bit Windows 7 installation, 2.6.0-beta0+6586576b2f msys1 Qt client crashes immediately on startup.

The modpack installer and server in the same installer start fine. 2.5.7 and 2.5.7+8882cf7a3c clients start fine.

freeciv-qt.RPT (decoded by me) says:

Error occured on Wednesday, July 5, 2017 at 23:16:02.

C:\Users\Jacob Nevins\AppData\Local\Freeciv-2.6.0-beta0+6586576b2f-qt\freeciv-qt.exe caused an Access Violation at location 772708f5 in module C:\Windows\system32\msvcrt.dll Reading from location 00000000.

Registers:
eax=00000000 ebx=00000100 ecx=00000040 edx=7efefeff esi=00000000 edi=03c0b840
eip=772708f5 esp=0022fba0 ebp=0022fbc8 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010202

Call stack:
772708F5  C:\Windows\system32\msvcrt.dll:772708F5  strncpy
004B8859  _init_themes
0041F274  _client_main
0040238F  _WinMain@16

Windows' own crash report dialog says:

Problem signature:
  Problem Event Name:    APPCRASH
  Application Name:    freeciv-qt.exe
  Application Version:    0.0.0.0
  Application Timestamp:    595d04e1
  Fault Module Name:    msvcrt.dll
  Fault Module Version:    7.0.7601.17744
  Fault Module Timestamp:    4eeaf722
  Exception Code:    c0000005
  Exception Offset:    000108f5
  OS Version:    6.1.7601.2.1.0.768.3
  Locale ID:    2057
  Additional Information 1:    0a9e
  Additional Information 2:    0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:    0a9e
  Additional Information 4:    0a9e372d3b4ad19135b953a78882e789

History

#1 Updated by Griffon Spade 5 months ago

I received a very similar error when trying to launch client, using Windows.

[code]-------------------

Error occured on Thursday, July 6, 2017 at 08:24:37.

C:\Program Files (x86)\Freeciv\Freeciv-2.6.0-beta0+6586576b2f-qt\freeciv-qt.exe caused an Access Violation at location 758c08f5 in module C:\windows\syswow64\msvcrt.dll Reading from location 00000000.

Registers:
eax=00000000 ebx=00000100 ecx=00000040 edx=7efefeff esi=00000000 edi=048148d8
eip=758c08f5 esp=0028fba0 ebp=0028fbc8 iopl=0 nv up ei pl nz ac pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010212

Call stack:
758C08F5 C:\windows\syswow64\msvcrt.dll:758C08F5 strncpy
004B8859 C:\Program Files (x86)\Freeciv\Freeciv-2.6.0-beta0+6586576b2f-qt\freeciv-qt.exe:004B8859Dwarf Error: found dwarf version '4', this reader only handles version 2 information.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.
0041F274 C:\Program Files (x86)\Freeciv\Freeciv-2.6.0-beta0+6586576b2f-qt\freeciv-qt.exe:0041F274Dwarf Error: mangled line number section.
0040238F C:\Program Files (x86)\Freeciv\Freeciv-2.6.0-beta0+6586576b2f-qt\freeciv-qt.exe:0040238FDwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.[/code]

#2 Updated by Griffon Spade 5 months ago

I received a very similar error when trying to launch client, using Windows. However, it is a silent crash.

@-------------------

Error occured on Thursday, July 6, 2017 at 08:24:37.

C:\Program Files (x86)\Freeciv\Freeciv-2.6.0-beta0+6586576b2f-qt\freeciv-qt.exe caused an Access Violation at location 758c08f5 in module C:\windows\syswow64\msvcrt.dll Reading from location 00000000.

Registers:
eax=00000000 ebx=00000100 ecx=00000040 edx=7efefeff esi=00000000 edi=048148d8
eip=758c08f5 esp=0028fba0 ebp=0028fbc8 iopl=0 nv up ei pl nz ac pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010212

Call stack:
758C08F5 C:\windows\syswow64\msvcrt.dll:758C08F5 strncpy
004B8859 C:\Program Files (x86)\Freeciv\Freeciv-2.6.0-beta0+6586576b2f-qt\freeciv-qt.exe:004B8859Dwarf Error: found dwarf version '4', this reader only handles version 2 information.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.
0041F274 C:\Program Files (x86)\Freeciv\Freeciv-2.6.0-beta0+6586576b2f-qt\freeciv-qt.exe:0041F274Dwarf Error: mangled line number section.
0040238F C:\Program Files (x86)\Freeciv\Freeciv-2.6.0-beta0+6586576b2f-qt\freeciv-qt.exe:0040238FDwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.Dwarf Error: mangled line number section.@

#3 Updated by ᳇ Ϻ⚸Яℨ⚔ ᳇ 5 months ago

it probably happened in "bug fixed mismatched free/delete"
when array = new char [*count];
was replaced with array = static_cast<char *
>(fc_malloc((*count) * sizeof(char *)));

Idk if it could fix that bug -
- strncpy(persistent, fileinfoname(get_data_dirs(),""), 256);
+ strncpy(persistent, fileinfoname(get_data_dirs(),""),
+ sizeof(persistent) / sizeof(persistent0) - 1);
+ persistent[sizeof(persistent)/sizeof(persistent0) - 1] = 0;

I removed my msys envs, in favor of my MSVS+mingw cmake build, but curl is not linking there,
and I kinda of abandononed it for a while.

Btw jtn how u decoded that?

#4 Updated by Jacob Nevins 5 months ago

Btw jtn how u decoded that?

I've got a hacky script. I've re-uploaded it to bug #681643.

#5 Updated by ᳇ Ϻ⚸Яℨ⚔ ᳇ 4 months ago

I compiled and linked with MingW 5.3.0 32bit with my cmake build, without any modyfication,
but it didnt crashed at all.

#6 Updated by Marko Lindqvist 4 months ago

I don't have builds with the patch yet, but without it:
Build with msys1 environment 2017-06-25 (win32) -> doesn't start
Build with msys2 environment 170616 (win64) -> works fine

#7 Updated by ᳇ Ϻ⚸Яℨ⚔ ᳇ 4 months ago

Btw I noticed that freeciv-qt.exe in msys1 takes 33Mb, Qt is probably linked both static and dynamically I guess.

#8 Updated by Marko Lindqvist 4 months ago

Even with the patch applied msys1 build does not start. I don't know if it's still the same reason as before or if there's another point where it crashes.

#9 Updated by Marko Lindqvist 4 months ago

The code in qtg_get_gui_specific_themes_directories() seems completely wrong to me.

I can only assume it tries to get first of the data directories and assumes that the theme is there (which is quite bad assumption to begin with, a lot of the time the theme will not be in the first data directory). Calling fileinfoname() with "" as the second parameter means it tries to find a directory that contains file with an empty name. fileinfoname() does support NULL second parameter, which is probably what this was meant to use. Failing to find file named "" fileinfoname() should return NULL.

#10 Updated by Marko Lindqvist 4 months ago

Untested patch for the most critical qtg_get_gui_specific_themes_directories() problems. This is meant as stopgag measure for this ticket.

#11 Updated by Marko Lindqvist 4 months ago

Msys1 build still crashes with my patch. I still plan to commit it as a fix to listed problems, if not to this crash.

I tested running it with '--version' parameter and that returns with success, so I know the crash to be at least later than initializations done before handling commandline parameters.

#12 Updated by Jacob Nevins 4 months ago

(GriffonSpade's backtrace looks very like mine, when decoded.)

cazfi sent a .RPT and .exe which decode like this:

Error occured on Wednesday, July 12, 2017 at 02:59:02.

C:\Program Files (x86)\Freeciv-2.6.0-beta0-qt\freeciv-qt.exe caused an Access Violation at location 00577f66 in module C:\Program Files (x86)\Freeciv-2.6.0-beta0-qt\freeciv-qt.exe Reading from location 00000000.

Registers:
eax=00000000 ebx=04b163a0 ecx=ffffffff edx=04b16030 esi=00000001 edi=00000000
eip=00577f66 esp=0281fb10 ebp=0281fb78 iopl=0         nv up ei pl zr na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010246

Call stack:
00577F66  _fileinfoname
004654A1  __Z39qtg_get_gui_specific_themes_directoriesPi
004BB215  _init_themes
0041F274  _client_main
0040238F  _WinMain@16

-------------------

Error occured on Wednesday, July 12, 2017 at 03:01:13.

C:\Program Files (x86)\Freeciv-2.6.0-beta0-qt\freeciv-qt.exe caused an Access Violation at location 00577f66 in module C:\Program Files (x86)\Freeciv-2.6.0-beta0-qt\freeciv-qt.exe Reading from location 00000000.

Registers:
eax=00000000 ebx=04bc6630 ecx=ffffffff edx=04bc6000 esi=00000001 edi=00000000
eip=00577f66 esp=0281fb10 ebp=0281fb78 iopl=0         nv up ei pl zr na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010246

Call stack:
00577F66  _fileinfoname
004654A1  __Z39qtg_get_gui_specific_themes_directoriesPi
004BB215  _init_themes
0041F274  _client_main
0040238F  _WinMain@16

#13 Updated by Marko Lindqvist 4 months ago

Jacob Nevins wrote:

cazfi sent a .RPT and .exe which decode like this:

Ok, my patch unearthed another bug. I will make a new ticket about this.

#14 Updated by Marko Lindqvist 4 months ago

Marko Lindqvist wrote:

Jacob Nevins wrote:

cazfi sent a .RPT and .exe which decode like this:

Ok, my patch unearthed another bug. I will make a new ticket about this.

-> Bug #682522

#15 Updated by Marko Lindqvist 4 months ago

  • Status changed from New to Resolved

Marko Lindqvist wrote:

Marko Lindqvist wrote:

Jacob Nevins wrote:

cazfi sent a .RPT and .exe which decode like this:

Ok, my patch unearthed another bug. I will make a new ticket about this.

-> Bug #682522

With both bug #682522 fix and my fix here applied the client proceeds further. It gets the windows visible, even. I will open a new ticket about crash happening then.

#16 Updated by Marko Lindqvist 4 months ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF