Bug 212920

Summary: Crash when loading level 2 (briefcase)
Product: [Fedora] Fedora Reporter: Wart <wart>
Component: fillets-ngAssignee: Matthias Saou <matthias>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: extras-qa, ivo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.7.1-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-11-13 18:12:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 213321    
Attachments:
Description Flags
Fixes table iterations none

Description Wart 2006-10-30 04:08:47 UTC
Description of problem:
The second level, "Briefcase Message", forces a save and reload which causes the
game to crash with the following error message:

main.cpp:117: ERROR script failure;
error='/usr/share/games/fillets-ng/script/share/Pickle.lua:81: attempt to call a
table value
stack traceback:
        /usr/share/games/fillets-ng/script/share/Pickle.lua:81: in function
`unpickle_table'
        ...sr/share/games/fillets-ng/script/share/prog_save.lua:29: in function
`script_loadState'
        [string "script_loadState()"]:1: in main chunk'
Path.cpp:44: INFO creating path; path='/home/wart/.fillets-ng/script/options.lua'

Version-Release number of selected component (if applicable):
fillets-ng-0.7.3-5.fc6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Remove the ~/.fillets-ng directory to start fresh
2. Open a terminal and run 'fillets'
3. Work your way to level 2 "Briefcase Message"
4. Lift the pipe and move the nut to enter the workshop.
5. Let the game run on its own while it shows you tips in the workshop.  This
will trigger an automatic save, then an automatic reload once the level restarts
itself.
  
Actual results:
The game reloads and exits with the error message above once the fish reenter
the workshop.

Expected results:
The game lets the player continue after the level has restarted from the save point.

Additional info:
I've tried manually saving and reloading at various points on this level, but
still get the same results.

I see this problem on both FC6-i386 and FC6-x86_64, but not on FC5-i386.

Comment 1 Ivo Danihelka 2006-10-31 22:02:52 UTC
Created attachment 139905 [details]
Fixes table iterations

Lua 5.1 is no longer supporting the old way of table iteration.

Usage:
$ cd $fillets_data/script
$ patch -p0 <pairs.patch

Comment 2 Ivo Danihelka 2006-10-31 22:09:13 UTC
Game reloading (F3) is broken in general. The Lua 5.1 has completely deprecated
the older way of iteration over tables. The attached patch fixes this particular
problem. It could be applied on fillets-data without recompilation.

Comment 3 Wart 2006-11-01 01:59:14 UTC
I tried out the patch and it did indeed fix the problem for me.

Thanks!

Comment 4 Matthias Saou 2006-11-10 13:29:35 UTC
I'll apply the patch and release a 0.7.1-2 package, which I'll have backported
to FC4 and newer, since even FC4 now includes lua 5.1. Does this seem correct?