MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001180VCMIGUI - PreGamepublic2013-01-21 07:562014-05-30 17:41
ReporterWarmonger 
Assigned ToIvan 
PriorityhighSeveritymajorReproducibilitysometimes
StatusclosedResolutionfixed 
PlatformPCOSWindows 7OS VersionSP1
Product Version 
Target Version0.91Fixed in Version0.91 
Summary0001180: Scenario options are always random if mod faction is used
DescriptionIt seems that now internal map options are not respected. Starting map with predefined towns and/or heroes leads to crash. Not sure yet if these are tigtly related, but the bug is bug.

Please take a look.
TagsNo tags attached.
Attached Filespng file icon Starting options.png [^] (243,205 bytes) 2013-01-21 07:56


? file icon Jebus 4P AI test 2.h3m [^] (80,910 bytes) 2013-01-21 07:56
txt file icon VCMI_Server_log.txt [^] (327,553 bytes) 2013-01-21 19:46 [Show Content]
? file icon 144SuperSlam30092012.h3m [^] (82,825 bytes) 2013-01-22 21:15

- Relationships

-  Notes
(0003292)
beegee (developer)
2013-01-21 09:08

Will look into this today evening. I didn't noticed this yesterday, map loading worked properly with map options. So we will see... Many crashes in VCMI the last days:(
(0003294)
beegee (developer)
2013-01-21 19:31

Sorry but I can't confirm this bug. Starting a map with predefined towns/heroes works fine. Starting options are recognized and take effect. Nevertheless sth. seems to be wrong. I got 2 random crashes while testing when loading a map.
(0003295)
Warmonger (administrator)
2013-01-21 19:34

Did you try the map attached?
(0003296)
beegee (developer)
2013-01-21 19:38

No, will try:)
(0003297)
beegee (developer)
2013-01-21 19:51
edited on: 2013-01-21 19:52

Starting options are set(not as in your image), but I can't start the map. I've attached the server log file. The GameHandler is fully initialized in the server. Server reports about how many players connection XY handles. The new turn message has been applied....

(0003298)
beegee (developer)
2013-01-21 20:00

Sometimes I receive a crash when the client is initializing AI players. Line 388 at Client.cpp: playerint[color]->init(cb.get());

In init method call to d-tor of SetGlobalState leads to the crash (VCAI.cpp, line 40)
~SetGlobalState()
{
ai.release(); // crash!
cb.release();
}
(0003306)
Warmonger (administrator)
2013-01-22 10:18

After latest updates I managed to launch the map. However, map options still look random as in the picture.
(0003307)
beegee (developer)
2013-01-22 11:00
edited on: 2013-01-22 11:09

Perhaps the map header is loaded false, so it's not a visual / GUI bug. Try to set a breakpoint in lib/Mapping/CMapService.cpp in the method CMapLoaderH3M::readPlayerInfo() somewhere at the end. Then select the map which is responsible for the random town/hero selection. Now look into the class member field mapHeader->players[i].allowedFactions. Are there no faction, only one faction or several factions listed? (should be one faction)
PS: Map headers are loaded before the map selection screen gets opened. Perhaps its better to debug in PreGame around CSelectionScreen::changeSelection.

(0003309)
Tow (developer)
2013-01-22 12:08

The settings issue is not reproducible for me. When I enter Advanced Options for the attached map, the factions are set and fixed (Tower for Red and so on).

@Beegee and ~SetGlobalState crash
This is strange, releasing pointer should never crash. Object is global, so it should be "always" alive. Can you capture the callstack? What dies exactly crash?
(you can also try rebuilding solution — it sometimes solves "unthinkable" issues)
(0003310)
Warmonger (administrator)
2013-01-22 14:22
edited on: 2013-01-22 14:47

Indeed there were some build issues recently since I dispatched project settings from trunk. The thing is, even with building fixed, interface problem remains.

Maybe we need a singleton pattern for an object or two to prevent compiler-dependent instantiation.

(0003311)
Tow (developer)
2013-01-22 16:11

I don't see how static initialization order could cause any of these issues. [Also we do use the same compiler. ;) ]

Just try debugging (as Beegee described), and check why settings are not set right.
(0003314)
Warmonger (administrator)
2013-01-22 21:15

I think it's caused by Cove town installed. On map SuperSlam (attached) first player has 2 towns available, the second one - all ten. It makes no difference what i set in starting options, though.

Without Cove it all works fine.
https://www.dropbox.com/s/98pm5ibk9ni7gei/cove.rar [^]
(0003317)
Ivan (developer)
2013-01-23 20:47

The source of this bug is probably same as in 0000820
New towns are by default enabled so map defaults may not be respected.

Interesting - in map editor you can't select available towns in RoE or AB maps. In vcmi I don't see any checks for map version in this area. Is this a bug of H3 editor or bug in vcmi?
(0003318)
Ivan (developer)
2013-01-23 21:24

I think I found it. Will fix.

This bug was present always - new towns just made it more visible.
(0003319)
Ivan (developer)
2013-01-23 22:11

Should be fixed, rev 3124.

- Issue History
Date Modified Username Field Change
2013-01-21 07:56 Warmonger New Issue
2013-01-21 07:56 Warmonger Status new => assigned
2013-01-21 07:56 Warmonger Assigned To => beegee
2013-01-21 07:56 Warmonger File Added: Starting options.png
2013-01-21 07:56 Warmonger File Added: Jebus 4P AI test 2.h3m
2013-01-21 08:34 Warmonger Summary Scenario options are awlays random, map crashes at game start => Scenario options are always random, map crashes at game start
2013-01-21 09:08 beegee Note Added: 0003292
2013-01-21 19:31 beegee Note Added: 0003294
2013-01-21 19:34 Warmonger Note Added: 0003295
2013-01-21 19:38 beegee Note Added: 0003296
2013-01-21 19:46 beegee File Added: VCMI_Server_log.txt
2013-01-21 19:51 beegee Note Added: 0003297
2013-01-21 19:52 beegee Note Edited: 0003297 View Revisions
2013-01-21 20:00 beegee Note Added: 0003298
2013-01-22 10:18 Warmonger Note Added: 0003306
2013-01-22 11:00 beegee Note Added: 0003307
2013-01-22 11:09 beegee Note Edited: 0003307 View Revisions
2013-01-22 12:08 Tow Note Added: 0003309
2013-01-22 14:22 Warmonger Note Added: 0003310
2013-01-22 14:47 Warmonger Note Edited: 0003310 View Revisions
2013-01-22 16:11 Tow Note Added: 0003311
2013-01-22 21:15 Warmonger Note Added: 0003314
2013-01-22 21:15 Warmonger File Added: 144SuperSlam30092012.h3m
2013-01-23 20:30 Warmonger Severity block => major
2013-01-23 20:30 Warmonger Category Mechanics - Adventure Map => GUI - PreGame
2013-01-23 20:30 Warmonger Summary Scenario options are always random, map crashes at game start => Scenario options are always random if mod faction is used
2013-01-23 20:47 Ivan Note Added: 0003317
2013-01-23 21:24 Ivan Note Added: 0003318
2013-01-23 21:24 Ivan Assigned To beegee => Ivan
2013-01-23 22:11 Ivan Note Added: 0003319
2013-01-23 22:11 Ivan Status assigned => resolved
2013-01-23 22:11 Ivan Fixed in Version => 0.91
2013-01-23 22:11 Ivan Resolution open => fixed
2014-05-30 17:41 beegee Status resolved => closed

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean