Opened 11 years ago

Closed 11 years ago

#6073 closed defect (fixed)

LURE: Crash at Copy Protection Screen

Reported by: misterhands Owned by: digitall
Priority: normal Component: Engine: Lure
Version: Keywords:
Cc: Game: Lure of the Temptress


SCUMMVM 1.5.0git3295-g848575b LURE DOS French

At the copy protection screen when you try to type a number (not via the numpad but above the letters) without the caps lock on, SCUMMVM crashes with the error :

Assertion failed: frameNum < _numFrames, file ./engines/lure/hotspots.h, line 290

So the code doesn't like these characters : &é"'(-è_çà Sure the crash is easy to avoid, but SCUMMVM should probably handle this more gracefully, typically by ignoring non numeric characters at the CP screen.

Ticket imported from: #3539031. Ticket imported from: bugs/6073.

Change History (12)

comment:1 by digitall, 11 years ago

misterhands: Since Lure of the Temptress is freeware: thus the copy protection is now disabled by default as it requires a manual not supplied.

Did you renable this function manually i.e. by adding "copy_protection=true" to the relevant entry in your scummvm configuration file, or has this got enabled by some bug i.e. one of the other engines setting this boolean at a global level?

By enabling this myself and typing SHIFT+<number keys>, I can replicate this issue, so will look at fixing, but this is not really needed as the CP is now irrelevant.

comment:2 by digitall, 11 years ago

Owner: set to digitall

comment:3 by digitall, 11 years ago

Committed fix for this as commit 4789e0f02665a8cc8cf0b814d65e71d38f88a5f1. Please test the next build and confirm.

comment:4 by digitall, 11 years ago

Resolution: fixed
Status: newpending

comment:5 by criezy, 11 years ago

Resolution: fixed
Status: pendingnew

comment:6 by criezy, 11 years ago

The committed fix consists in ignoring key pressed with a modifier. And while it works for qwerty keyboards, it does not for azerty keyboards (and my understanding is that the submitter has an azerty keyboard). On those keyboards you actually need to use the SHIFT modifier to get the number. If you press the number keys without a modifier you get the character given in the bug submission (&é"'(-è_çà). So what the commit does is that it still crashes when not using SHIFT but now you cannot even enter the numbers using SHIFT.

comment:7 by misterhands, 11 years ago

Resolution: fixed
Status: newpending

comment:8 by misterhands, 11 years ago

You're right, I have copy_protection set to true for some reason... I think I'll leave it this way though, I like these good old copy protection system, especially the SCUMM ones !

BTW the freeware version of Lure DOES include the manual and copy protection codes in the zip archive.

Anyway I have tried with today's build 1.5.0git3300-g4789e0f but there is no difference, same crash. And I confirm what criezy wrote : I do have a AZERTY keyboard, and now I can't enter the numbers using SHIFT anymore.

comment:9 by digitall, 11 years ago

Resolution: fixed
Status: pendingnew

comment:10 by digitall, 11 years ago

misterhands: I would really recommend that you avoid setting that flag... at least globally, as not all of the freeware releases included the manuals/protection codes. I have just checked and you are correct that the freeware releases of Lure do actually have this included as PDF, but this tends to be the exception, rather than the rule.

criezy: Mea culpa. This crashed for me on my UK Qwerty when I used Shift and number, so I fixed that issue, but this goes beyond Lure then. It appears that when using AZERTY input, the Keycode is correct, but the ASCII value supplied is not necessarily correct. I will need your help in real time to diagnose this and effect a fix for all keyboard types. Will contact you on IRC at some point soon.

comment:11 by criezy, 11 years ago

I committed a different fix in commit 335ba979a2e3aab9c1856bf84a18b60ab91de687. This works for both QWERTY and AZERTY keyboards now.

comment:12 by criezy, 11 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.