Opened 7 years ago

Closed 7 years ago

#10126 closed defect (fixed)

TITANIC: Star Puzzle, crash for unlocking 1st star after 2 locked

Reported by: dafioram Owned by: dafioram
Priority: low Component: Engine: Titanic
Version: Keywords:
Cc: Game: Starship Titanic

Description

f738e79e2a5dff5feed81834ca84e47aa8dac114

  1. Lock onto two stars
  2. Go into skyview and deselect the first star you locked onto
  3. Go back to starview.

crash.

#0  0x0000000000520f6e in Titanic::CStarField::fn5 (this=0x22b3c18, surfaceArea=0x7ffffffb7d60, camera=0x22bdf28, v1=..., v2=..., v3=...) at engines/titanic/star_control/star_field.cpp:203
#1  0x0000000000520e44 in Titanic::CStarField::fn4 (this=0x22b3c18, surfaceArea=0x7ffffffb7d60, camera=0x22bdf28) at engines/titanic/star_control/star_field.cpp:185
#2  0x00000000005205ab in Titanic::CStarField::render (this=0x22b3c18, surface=0x231d840, camera=0x22bdf28) at engines/titanic/star_control/star_field.cpp:80
#3  0x0000000000524a60 in Titanic::CStarView::draw (this=0x22bdf10, screenManager=0x15ca160) at engines/titanic/star_control/star_view.cpp:105
#4  0x000000000051119b in Titanic::CStarControl::draw (this=0x22b3af0, screenManager=0x15ca160) at engines/titanic/star_control/star_control.cpp:87
#5  0x00000000005508d9 in Titanic::CMainGameWindow::drawViewContents (this=0x15cc280, screenManager=0x15ca160) at engines/titanic/main_game_window.cpp:222
#6  0x00000000005506c2 in Titanic::CMainGameWindow::draw (this=0x15cc280) at engines/titanic/main_game_window.cpp:173
#7  0x000000000054eb24 in Titanic::CSTGameView::draw (this=0x1cfd370, bounds=...) at engines/titanic/game_view.cpp:93
#8  0x000000000054c428 in Titanic::CGameManager::update (this=0x1d966e0) at engines/titanic/game_manager.cpp:203
#9  0x0000000000550a02 in Titanic::CMainGameWindow::onIdle (this=0x15cc280) at engines/titanic/main_game_window.cpp:248
#10 0x000000000054adbb in Titanic::Events::checkForNextFrameCounter (this=0x15ca0a0) at engines/titanic/events.cpp:139
#11 0x000000000054a88d in Titanic::Events::pollEvents (this=0x15ca0a0) at engines/titanic/events.cpp:41
#12 0x000000000054ac12 in Titanic::Events::pollEventsAndWait (this=0x15ca0a0) at engines/titanic/events.cpp:109
#13 0x0000000000423105 in Titanic::TitanicEngine::run (this=0x1334b00) at engines/titanic/titanic.cpp:144
#14 0x000000000040dfce in runGame (plugin=0xc47020, system=...,  edebuglevels=...) at base/main.cpp:263
#15 0x000000000040f191 in scummvm_main (argc=1, argv=0x7fffffffdf38) at base/main.cpp:529
#16 0x000000000040c13e in main (argc=1, argv=0x7fffffffdf38) at backends/platform/sdl/posix/posix-main.cpp:45

Change History (3)

comment:1 by dafioram, 7 years ago

If you do this in the original it doesn't crash, but it does break the puzzle. It makes the starmap be all black and you can't progress further.

comment:2 by dafioram, 7 years ago

Owner: set to dreammaster
Resolution: fixed
Status: newpending

PR995 solves this.

The logic in CStarCrosshairs::selectStar was allowing previously marked/locked stars to be deselected via the skymap. Now the code checks that that the new star selection is not already in the queue (_entries) unless it is the most recent one then that one can be removed since its not locked.

It previously crashed if

  1. You had 2 stars locked on and you tried to remove the 1st
  2. Had 1 locked and 1 unlocked and you tried to unlock the 1st
  3. Had 2 locked and 1 unlocked and you tried to unlock any of the other two locked stars.

comment:3 by dafioram, 7 years ago

Owner: changed from dreammaster to dafioram
Status: pendingclosed
Note: See TracTickets for help on using tickets.