Opened 3 weeks ago

Closed 2 weeks ago

#145 closed defect (fixed)

Aven exception on launch on Windows 11

Reported by: Footleg Owned by: Olly Betts
Priority: blocker Milestone: 1.4.19
Component: Other Version: 1.4.18
Keywords: Cc:

Description

Just installed the latest Survex from Windows installer on my Windows 11 laptop. On launching Aven I get an error dialog: Title: ave_.exe - Entry Point Not Found Content: The procedure entry point clock_gettime64 could not be located in the dynamic link library C:\Program Files (x86)\Survex\libstdc++-6.dll.

Closing this dialog, and another appears with: The procedure entry point pthread_cond_timedwait64 could not be located in the dynamic link library C:\Program Files (x86)\Survex\libgdal-37.dll.

A further 4 errors appear each time I close the dialog until Aven exits.

I had installed 1.4.18 over the top of 1.4.15 which was working (but raised an error on processing a project, which I was trying to check whether fixed by latest).

Change History (8)

comment:1 Changed 3 weeks ago by Footleg

I just uninstalled 1.4.18 and installed 1.4.17 which works fine, and was able to process the project which 1.4.15 was generating an error for. So I'll assume my 1.4.15 bug is not an issue.

comment:2 Changed 3 weeks ago by Olly Betts

Juan Corrin reported this in #144 in a test build of a version between 1.4.17 and 1.4.18, but we ascribed it to the laptop having been overzealously "cleaned" before being donated and so missing a DLL.

It seems to me we're probably missing a DLL (or have an older version of a DLL).

Web searching found me https://github.com/msys2/MINGW-packages/issues/24355 which says these symbols were added to libwinpthread-1.dll - do you have that in c:\Program Files\Survex (or wherever you installed to)?

Do you have a version of libwinpthread-1.dll anywhere else on the system?

And what sizes and dates are any copies you have?

We could probably workaround this by forcing 32-bit time_t - we then couldn't handle dates after early 2038 but dates used in Survex should always be in the past (or maybe a day in the future if you're sent very fresh data from another timezone). However it seems better to try to resolve the underlying problem as the packaging process aims to gather up all the DLLs which will be needed, and if that isn't happening then it could cause other problems.

comment:3 Changed 3 weeks ago by Olly Betts

We could probably workaround this by forcing 32-bit time_t

Oh, actually that probably wouldn't work as the errors suggest there are references from other DLLs such as libgdal-37.dll not (or not only) from Survex code.

comment:4 Changed 3 weeks ago by Olly Betts

Also, could you try running the uninstaller for the old version and then installing 1.4.18?

I did test after Juan's report and shortly before the 1.4.18 release and it worked for me so I'm wondering if the problem is an existing old version of libwinpthread-1.dll which for some reason doesn't get overwritten by a newer version when upgrading (I was testing on a machine which had never had Survex installed before).

comment:5 Changed 3 weeks ago by Olly Betts

Having poked this some more, I'm fairly sure what's happening is that the installer doesn't update libwinpthread-1.dll when installing 1.4.18 over an older version because it checks the version it claims to be which appears not to have changed (even though the code has).

In this case it's changed in an upwardly compatible way, but not in a downwardly compatible way, so the new aven built to use the new libwinpthread-1.dll doesn't work with the old one.

That's a default behaviour of the installer, which is probably sensible for DLLs installed into public directories where other installed applications might be using them, but these are all installed into Survex's private install directory.

There's a setting to ignore these version numbers so using that is probably the answer. This will also mean that downgrading by installing an older version over a newer one will leave things in a state much more like that of installing that older version from scratch, which seems preferable.

Also, could you try running the uninstaller for the old version and then installing 1.4.18?

It would still be useful to check this - if that doesn't work then I'm probably off down the wrong track.

comment:6 Changed 2 weeks ago by Olly Betts

Milestone: 1.4.19
Status: newassigned

comment:7 Changed 2 weeks ago by Footleg

This does appear to be related to the installer not removing older DLLs before installing the latest. I ran the 1.4.18 installer over the top of my 1.4.17 install, and found that many DLLs from the earlier installed version were left in the installation directory. I moved them all out to see what errors this caused, and the following 4 DLLs were reported as missing:

avformat-61.dll avutil-59.dll libdav1d-7.dll libiconv-2.dll

My guess is these are the ones which have the same name in both releases, and so did not get updated. Running the 1.4.18 installer again replaced these 4 missing DLLs and now Aven runs without errors.

comment:8 Changed 2 weeks ago by Olly Betts

Resolution: fixed
Status: assignedclosed

Thanks. I changed the installer to just install the packaged DLLs and not try to check versions in 2312da6817fd396391f4e605e5ce926ed11b46ba so that should fix this.

Note: See TracTickets for help on using tickets.