Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #874406

Trade plan calculation fails Qt 2.6.2 client

Added by Alexandro Ignatiev over 1 year ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Category:
gui-qt
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

The client hangs for a while and then fails. 2.6.1 does not have this bug.


Related issues

Blocks Freeciv - Feature #893343: QT_DISABLE_DEPRECATED_BEFORE to match Qt-5.15Closed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Alexandro Ignatiev over 1 year ago

Most probably, the error comes from a wrong resolution in bug #852857: std::sort requires a function that behaves as a stable comparison operator, qrand() is not one. It seems to be no standard random shuffle function in stdlib.h, but there are lots of code patterns around that do the task.

#2 Updated by Marko Lindqvist over 1 year ago

Alexandro Ignatiev wrote:

Most probably, the error comes from a wrong resolution in bug #852857

It should be easy to test by reverting that patch. I don't think anything has built on top of it since.

#3 Updated by Marko Lindqvist about 1 year ago

Alexandro Ignatiev wrote:

qrand() is not one.

Also, it seems qrand() has been deprecated in Qt-5.15.

#5 Updated by Marko Lindqvist 12 months ago

  • Status changed from Resolved to In Progress

clang gives a warning:
../../../../src/client/gui-qt/menu.cpp:222:5: error: struct 'trade_city' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
struct trade_city *cities_order[count];
^
../../../../src/client/gui-qt/menu.h:136:7: note: previous use is here
class trade_city
^
../../../../src/client/gui-qt/menu.cpp:222:5: note: did you mean class here?
struct trade_city *cities_order[count];
^~~~
class
1 error generated.

#7 Updated by Marko Lindqvist 12 months ago

  • Blocks Feature #892509: Make Qt-5.15 minimum requirement for --with-qt5x builds added

#8 Updated by Marko Lindqvist 12 months ago

Marko Lindqvist wrote:

Does this patch help?

Ping, Alexandro Ignatiev

#9 Updated by Marko Lindqvist 12 months ago

  • Blocks Feature #893343: QT_DISABLE_DEPRECATED_BEFORE to match Qt-5.15 added

#10 Updated by Marko Lindqvist 12 months ago

  • Blocks deleted (Feature #892509: Make Qt-5.15 minimum requirement for --with-qt5x builds)

#11 Updated by Marko Lindqvist 12 months ago

Marko Lindqvist wrote:

Does this patch help?

Worked at least in my own quick test, so pushing soon.

#12 Updated by Marko Lindqvist 12 months ago

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

#13 Updated by Marko Lindqvist 11 months ago

  • Sprint/Milestone changed from 2.6.3 to 2.6.2.1

Also available in: Atom PDF