Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Thread Tools Display Modes
Old 03-30-2021, 01:42 PM   #1
Meo-Ada Mespotine
Human being with feelings
Meo-Ada Mespotine's Avatar
Join Date: May 2017
Location: Leipzig
Posts: 5,387
Default Weird error-message with dofile, bytecode-lua-files and umlauts in resourcepath

I found a very odd and strange bug, that occurs only on Windows and makes Ultraschall-API sometimes not working.

When I run a script using dofile, it usually loads and executes the script. This script can also be in bytecode, which loads the script slightly faster.

Now here's the thing: it only works, if the path of the resource-folder has no Umlauts(ń,÷,Ř) in them. So if you try the same in a portable Reaper-installation "Ultraschall-US_API_4.1.001ÍBj÷rn", only the source-code-version will be loaded, while the byte-code-version produces an obscure error, that "can not reopen $scriptfilename".

I made three scripts, that demonstrate this. Just put them into scripts-folder and run the script "ByteCode-Problem.lua".
In a Reaper-installation that doesn't contain an umlaut in the path to the resource-folder, it will show twice the resourcepath.
In Reaper-installations with ─, Í or ▄ in their resource-path, the script will fail.
(I left some additional comments in the script, just in case.)


I guess, Lua doesn't resolve Unicode-paths properly for dofile, when using bytecode, but it's just a guess.
I haven't tested load or require, but I imagine, that they can have the same problem...

Tested on Reaper 6.26rc3x64 on Windows, but has been reported to be a problem on Reaper 6.25x64(also Windows) too.

Mac and Linux seem to work fine...
Use you/she/her.Ultraschall-Api Lua Api4Reaper
Bugreports&Docs notes please do here:https://github.com/Ultraschall/ultra...-reaper/issues - Donate, if you wish
Meo-Ada Mespotine is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 06:08 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.