inseven / opolua

A compiled-OPL interpreter for iOS written in Lua
https://opolua.org
MIT License
12 stars 0 forks source link

[Scribble] Internal Error: attempt to index a nil value #457

Open kapfab opened 1 month ago

kapfab commented 1 month ago

Description

Error at launch

Metadata

Key Value
Title Scribble
Source URL https://archive.org/download/3-libjune-05/3LIBJUNE05.iso/library%2Fepocgraphics%2Fscribble%2FScribble.sis

Details

attempt to index a nil value
SCRIBBLE\APPINIT:00002568: FF [NextOpcodeTable] 18 CallOpxFunc 0 45 (SYSTEM ReadRsc)
SCRIBBLE\START:00000739: 53 [RunProcedure] 0x06BC (name="APPINIT" nargs=0)
stack traceback:
    [C]: in for iterator 'for iterator'
    opl.lua:1514: in function <opl.lua:1512>
    (...tail calls...)
    opx/system.lua:385: in function 'opx.system.ReadRsc'
    ops.lua:2454: in function 'ops.CallOpxFunc'
    ops.lua:2332: in function 'ops.NextOpcodeTable'
    runtime.lua:989: in function <runtime.lua:974>
    [C]: in function 'xpcall'
    runtime.lua:1108: in method 'pcallProc'
    runtime.lua:1426: in function 'runtime.runOpo'
tomsci commented 2 weeks ago

That's an interesting one... it's trying to read a resource from eikon.rsc, which apparently is implicitly opened by OPL programs. (the nil index is due to our impl of ReadRsc not expecting someone to call it without ever having called LoadRsc).

The resource in question appears to be the text "Busy" so I guess this application is using it as a way to leverage existing locallisations.

kapfab commented 2 weeks ago

Nice find!