File paths: I've tried everything

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
togFox
Party member
Posts: 764
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

File paths: I've tried everything

Post by togFox »

Code: Select all

sqlite3 = require("lsqlite3");
The above code in my main.lua works on 4 different PC's (Windows) but doesn't work on a fifth PC and I'm running out of options. It's even harder because I don't own the 5th PC and me making different EXE's and sending is challenging the friendship (not really but you know what I mean.

This is the error when launching:

error loading module 'lsqlite3' from the file '.\lsqlite3.dll':
The specified module could not be found.


The dll is distributed in the zip file. This i literally the 3rd line in main.lua:

Code: Select all

strGameVersion = "0.23"
Slab = require 'Slab'
-- https://github.com/coding-jackalope/Slab/wiki
sqlite3 = require("lsqlite3");
The traceback points to the sqlite3 line. Remember - this works on 4 out of 5 Windows boxes. Run as Administrator has been tried.

I know some ppl don't like EXE's but the zip file with EXE and dll is here: https://github.com/togfoxy/TacticalGridIron/releases

Here is the folder structure - it's flat. No subfolders.
Untitled.png
Untitled.png (8.96 KiB) Viewed 2830 times
What could this possibly be? Are there any VisualStudio or SQLite3 packs that need to also be installed?
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: File paths: I've tried everything

Post by grump »

Try copying the DLL to the game's save directory.
User avatar
togFox
Party member
Posts: 764
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: File paths: I've tried everything

Post by togFox »

That wouldn't explain why distribution works on 4 of the 5 PC's.

I'm leaning towards those PC's having a .net distribution that this one PC does not have.
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
User avatar
zorg
Party member
Posts: 3435
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: File paths: I've tried everything

Post by zorg »

Works on my pc too, with win7 so i couldn't reproduce the issue... though the exclusive fullscreen thing did scare the hell out of me.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
pgimeno
Party member
Posts: 3541
Joined: Sun Oct 18, 2015 2:58 pm

Re: File paths: I've tried everything

Post by pgimeno »

The whole traceback would be interesting, to see if ./lsqlite3.dll has been tried. Also, the current working directory from the point of view of the application (edit: as returned by love.filesystem.getWorkingDirectory()). Lastly, I don't know whether Windows will always look in ./ for a DLL, but it's something to look into as well.
User avatar
togFox
Party member
Posts: 764
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: File paths: I've tried everything

Post by togFox »

So what is the ./ in ./lsqlite3.dll ?? I thought that Is that the location the EXE is in? You can see above that the dll co-exists with the EXE. If I'm misunderstanding what ./ is then this might be super simple to solve.

Photo of a screen because I'm getting this info 2nd hand:
Image


@zorg - thanks for trying and lol at the full screen. :) Glad it works for you. That means it works on 5/6 machines.

PS: exe in the repository is a temporary thing while I can work out how to deploy this before moving to itch.io - when it works. :(
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: File paths: I've tried everything

Post by grump »

togFox wrote: Thu Apr 08, 2021 9:36 am That wouldn't explain why distribution works on 4 of the 5 PC's.
The point is that the current working directory might be something else than the directory where the .exe is stored. I haven't used Windows in a while so I don't know what kind of error message you would see in that case, but I had this exact problem before. Copying the dll into the save directory should work in any case I think, if love.filesystem.getCRequirePath() contains that directory (I can't remember).

If all else fails, search for "dependency walker", download it and see if there's a missing dependency. Maybe it's one of those seven million different MSVC dlls.
User avatar
togFox
Party member
Posts: 764
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: File paths: I've tried everything

Post by togFox »

I've never used the walker before but it did display this when I profiled the exe while executing:
LoadLibraryA(".\lsqlite3.dll") called from "LUA51.DLL" at address 0x00007FF85439683D.
Loaded "LSQLITE3.DLL" at address 0x00007FF8485D0000. Successfully hooked module.
Could my friend have a LUA 5.1 installation/pathing issue?

IDK if this helps - this is on my machine that works. Maybe my friend should run this on their machine?

Image
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
User avatar
togFox
Party member
Posts: 764
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: File paths: I've tried everything

Post by togFox »

Corrupt dll during unzip?
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: File paths: I've tried everything

Post by grump »

Lua is part of LÖVE, that can't be the issue. Try adding MSVCR100.DLL to the game, it's the only thing that could be it if it's a missing dependency.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 18 guests