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

Reply
 
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: 6,622
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.)

https://mespotin.uber.space/stuf/ByteCode-Problem.zip

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 - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is online now   Reply With Quote
Reply

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:50 AM.


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