Bug#991460: vcmi: aborts when hovering over campaign selection figures

2021-08-06 Thread Johannes Schauer Marin Rodrigues
Control: tag -1 + patch

Hi,

Quoting fulvio ciriaco (2021-07-24 17:24:37)
> steps to reproduce:
> 1. select new  -> campaign
> 2. move the mouse to select the campaign
> vcmi aborts immediately with the following message:
> 
> Initializing VCMI_Lib: 313 ms
> Screen handler: 8 ms
> Main graphics: 103 ms
> Message handler: 1 ms
> Initialization of VCMI (together): 1126 ms
> corrupted double-linked list
> 
> it happens on different computers, motherboards and graphic cards.
> as a workaround, it is possible to select a campaign opening vcmi in valgrind 
> (very
> slow), saving the first day and reopening normally.

thank you for your bugreport! I can reproduce the problem and the attached
patch fixes it.

Thanks!

cheers, joschdiff -Nru vcmi-0.99+dfsg+git20190113.f06c8a87/debian/changelog vcmi-0.99+dfsg+git20190113.f06c8a87/debian/changelog
--- vcmi-0.99+dfsg+git20190113.f06c8a87/debian/changelog	2021-08-06 19:58:17.0 +0200
+++ vcmi-0.99+dfsg+git20190113.f06c8a87/debian/changelog	2020-06-03 12:44:51.0 +0200
@@ -1,10 +1,3 @@
-vcmi (0.99+dfsg+git20190113.f06c8a87-2.1) UNRELEASED; urgency=medium
-
-  * Non-maintainer upload.
-  * 
-
- -- Johannes Schauer Marin Rodrigues   Fri, 06 Aug 2021 19:58:17 +0200
-
 vcmi (0.99+dfsg+git20190113.f06c8a87-2) unstable; urgency=medium
 
   * Add patch "Fix build with Boost version >= 1.70"
diff -Nru vcmi-0.99+dfsg+git20190113.f06c8a87/debian/control vcmi-0.99+dfsg+git20190113.f06c8a87/debian/control
--- vcmi-0.99+dfsg+git20190113.f06c8a87/debian/control	2021-08-06 19:58:17.0 +0200
+++ vcmi-0.99+dfsg+git20190113.f06c8a87/debian/control	2020-06-03 12:44:51.0 +0200
@@ -26,8 +26,7 @@
  help2man,
  tex4ht,
  texlive-latex-base,
- texlive-latex-extra,
- libtbb-dev
+ texlive-latex-extra
 Standards-Version: 4.1.4
 Vcs-Browser: https://salsa.debian.org/games-team/vcmi
 Vcs-Git: https://salsa.debian.org/games-team/vcmi.git
diff -Nru vcmi-0.99+dfsg+git20190113.f06c8a87/debian/patches/link_with_tbb vcmi-0.99+dfsg+git20190113.f06c8a87/debian/patches/link_with_tbb
--- vcmi-0.99+dfsg+git20190113.f06c8a87/debian/patches/link_with_tbb	2021-08-06 19:58:06.0 +0200
+++ vcmi-0.99+dfsg+git20190113.f06c8a87/debian/patches/link_with_tbb	1970-01-01 01:00:00.0 +0100
@@ -1,558 +0,0 @@
 a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -223,6 +223,7 @@ find_package(SDL2 REQUIRED)
- find_package(SDL2_image REQUIRED)
- find_package(SDL2_mixer REQUIRED)
- find_package(SDL2_ttf REQUIRED)
-+find_package(TBB REQUIRED)
- 
- if(ENABLE_LAUNCHER)
- 	# Widgets finds its own dependencies (QtGui and QtCore).
 a/client/CMakeLists.txt
-+++ b/client/CMakeLists.txt
-@@ -176,6 +176,7 @@ endif()
- target_link_libraries(vcmiclient vcmi ${Boost_LIBRARIES}
- 	${SDL2_LIBRARY} ${SDL2_IMAGE_LIBRARY} ${SDL2_MIXER_LIBRARY} ${SDL2_TTF_LIBRARY}
- 	${ZLIB_LIBRARIES} ${FFMPEG_LIBRARIES} ${FFMPEG_EXTRA_LINKING_OPTIONS} ${SYSTEM_LIBS}
-+	${TBB_LIBRARIES}
- )
- 
- target_include_directories(vcmi
 /dev/null
-+++ b/cmake_modules/FindTBB.cmake
-@@ -0,0 +1,534 @@
-+#.rst:
-+# FindTBB
-+# ---
-+#
-+# Find Intel's Threading Building Blocks (TBB) include path and libraries.
-+#
-+# This module reads hints about search locations from variables:
-+#
-+# ::
-+#
-+#TBB_ROOT - Root directory of pre-built TBB package.
-+#   Can be an environment variable instead. It is
-+#   derived from the found TBB_INCLUDE_DIR if unset.
-+#TBB_ARCH_PLATFORM- Environment variable which can be used to specify
-+#   architecture and platform specific library path
-+#   suffix (excluding "/lib/" suffix or prefix).
-+#   For MSVC, the appropriate link library path of the
-+#   official pre-built download package from the TBB
-+#   web site is chosen by this module. The path suffix
-+#   derived from this variable takes precedence.
-+#
-+# This module considers the following CMake variables set by find_package:
-+#
-+# ::
-+#
-+#TBB_FIND_COMPONENTS  - Case-insensitive names of requested libraries:
-+#   tbb, [tbb]malloc, [tbb]malloc_proxy
-+#TBB_FIND_REQUIRED_- Whether TBB library component  is required.
-+#   TBB is considered to be not found when at least
-+#   one required library or its include path is missing.
-+#   When no TBB_FIND_COMPONENTS are specified, only the
-+#   threading library "tbb" is required.
-+#TBB_FIND_REQUIRED- Raise FATAL_ERROR when required components not found.
-+#TBB_FIND_QUIETLY - Suppress all other (status

Bug#991460: vcmi: aborts when hovering over campaign selection figures

2021-07-24 Thread fulvio ciriaco
Package: vcmi
Version: 0.99+dfsg+git20190113.f06c8a87-2+b1
Severity: important

steps to reproduce:
1. select new  -> campaign
2. move the mouse to select the campaign
vcmi aborts immediately with the following message:

Initializing VCMI_Lib: 313 ms
Screen handler: 8 ms
Main graphics: 103 ms
Message handler: 1 ms
Initialization of VCMI (together): 1126 ms
corrupted double-linked list

it happens on different computers, motherboards and graphic cards.
as a workaround, it is possible to select a campaign opening vcmi in valgrind 
(very
slow), saving the first day and reopening normally. 

thank you

-- System Information:
Debian Release: 11.0
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-7-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_WARN
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages vcmi depends on:
ii  libavcodec587:4.3.2-0+deb11u2
ii  libavformat58   7:4.3.2-0+deb11u2
ii  libavutil56 7:4.3.2-0+deb11u2
ii  libboost-filesystem1.74.0   1.74.0-9
ii  libboost-locale1.74.0   1.74.0-9
ii  libboost-program-options1.74.0  1.74.0-9
ii  libboost-thread1.74.0   1.74.0-9
ii  libc6   2.31-12
ii  libfuzzylite6.0 6.0+dfsg-3
ii  libgcc-s1   10.2.1-6
ii  libminizip1 1.1-8+b1
ii  libqt5core5a5.15.2+dfsg-9
ii  libqt5gui5  5.15.2+dfsg-9
ii  libqt5network5  5.15.2+dfsg-9
ii  libqt5widgets5  5.15.2+dfsg-9
ii  libsdl2-2.0-0   2.0.14+dfsg2-3
ii  libsdl2-image-2.0-0 2.0.5+dfsg1-2
ii  libsdl2-mixer-2.0-0 2.0.4+dfsg1-3
ii  libsdl2-ttf-2.0-0   2.0.15+dfsg1-1
ii  libstdc++6  10.2.1-6
ii  libswscale5 7:4.3.2-0+deb11u2
ii  zlib1g  1:1.2.11.dfsg-2

Versions of packages vcmi recommends:
ii  ffmpeg   7:4.3.2-0+deb11u2
ii  innoextract  1.8-1.2+b1
ii  unshield 1.4.2-1
ii  unzip6.0-26

Versions of packages vcmi suggests:
pn  homm3-demo-data | homm3-data  

-- no debconf information