カテゴリ | 重要度 | ステータス | 解決状況 | 登録日時 | 最終更新 |
---|---|---|---|---|---|
プラグイン | 低 | 解決済み | 修正済み | 2022-03-05 00:35 | 2022-04-01 14:14 |
テスター | Bletch | 担当者 | cuavas | ソース | |
バージョン | 0.241 | 発生バージョン | 修正バージョン | 0.242 | |
修正コミット | dd1e5b1 | プルリク | #9419 | ||
フラグ | |||||
セット | |||||
セット詳細 | |||||
概 要 | ClangビルドでLUAエラー。 | ||||
詳 細 | For me, the following LUA code seems to fail on self-made Clang/Visual Studio builds: local file = emu.file(manager.machine.options.entries.cheatpath:value(), 1); file:open("cheat.blah"); local blah = file:read(file:size()); manager.machine:popmessage("blah: " .. tostring(blah)); The error seems to be: [LUA ERROR] in execute_function: stack index 2, expected userdata, received number: value is not a valid userdata (bad argument into 'void) [T = sol::buffer *](void) [T = emu_file &], void) [T = sol::buffer *])') The problem seems to be that file:read() fails, because it fails to convert the return value from file:size() to a number. At first, I assumed this was a Sol 3 regression, but I later discovered that this does not seem to happen in any normal MinGW builds. I strongly suspect that this may be some sort of a compiler bug (perhaps with Clang or my older version of Clang), but I'd like to report it to see if anybody sees this problem elsewhere. | ||||
再現手順 | 1. Paste the above snippet into `dummy.startplugin()` in plugins/dummy/init.lua 2. Ensure that a text file called "cheat.blah" is in your cheat path 3. 'mame anydriver -plugin dummy' | ||||
追加情報 | |||||
添付ファイル |