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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-30-2021, 01:42 PM   #1
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 2,741
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.001Bjrn", 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
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 12:20 AM.


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