Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Procedure entry point InitOnceBeginInitialize could not be located #2576

Closed
musikBear opened this issue Feb 17, 2016 · 24 comments
Closed

Procedure entry point InitOnceBeginInitialize could not be located #2576

musikBear opened this issue Feb 17, 2016 · 24 comments
Labels
Milestone

Comments

@musikBear
Copy link

1.2.0-RC1 1.1.9 RC will not run on xp. That is not an issue, but it need to be in the download info, so peeps with xp does not install in vain.
nokernel32entrypoint

Edit, @tresf quoted exception message to make searchable

lmms.exe - Entry Point Not Found
Procedure entry point InitOnceBeginInitialize could not be located in the dynamic link library KERNEL32.dll

A guy with Vista also had problems.
http://lmms.io/forum/viewtopic.php?f=7&t=4822

I will set a xp-exclusive warning on forum. Then at least something has been done.

@tresf
Copy link
Member

tresf commented Feb 17, 2016

Please don't put up a big flashy warning on the forums. If 1.2 breaks XP compat, we can add a warning to the downloads page.

@musikBear
Copy link
Author

Please don't put up a big flashy warning on the forums.

just a simple post on support, has been posted.
http://lmms.io/forum/viewtopic.php?f=7&p=15790#p15790


btw strange that lmms-1.1.1-g23d2824-win32.exe installed with no issues at all. Eg your build from january, was just fine. Runs perfect, also on xp

@tresf
Copy link
Member

tresf commented Feb 17, 2016

A guy with Vista also had problems. http://lmms.io/forum/viewtopic.php?f=7&t=4822

His bug is i installed the beta version 1.1.9 in win vista and when i press edit/settings, it crashes every time , therefore it is impossible to use.

That is a separate issue. Please file a separate bug report.

just a simple post on support, has been posted. http://lmms.io/forum/viewtopic.php?f=7&p=15790#p15790

Your post title is:

Important Info! Do NOT install 1.190 on XP!

Which is 1. Invalid, there's no such thing as 1.190. 2. Exactly what was asked of you NOT to post. Deleted.

btw strange that lmms-1.1.1-g23d2824-win32.exe installed with no issues at all. Eg your build from january, was just fine. Runs perfect, also on xp

The g23d2824 build was created using Ubuntu 12.04 on my own personal VM, whereas the version on our Downloads page was built using Travis-CI so this may be a bug that we need to identify. We'll test on some platforms and report back our findings.

1.1.9RC no entryPoint on KERNEL32

FYI, this version doesn't exist. We appreciate the fast feedback as well as the strong enthusiasm, but the more the devs have to edit your posts and bug reports, the less time they have to fix problems. 👍

@tresf tresf changed the title 1.1.9RC no entryPoint on KERNEL32 Procedure entry point InitOnceBeginInitialize could not be located Feb 17, 2016
@tresf tresf added this to the 1.2.0 milestone Feb 17, 2016
@tresf
Copy link
Member

tresf commented Feb 17, 2016

1.2.0-RC1 Windows test Results:

Tests performed: Installation, open.

Version OS Status
win32 Windows 7 x64
win32 Windows XP SP3 🚫 fail with above error
win32 Windows 10 x64
win32 Wine 32-bit
win64 Windows 7 x64
win64 Windows 10 x64
win32 Wine 64-bit

Edit: I think we can fix this by changing our linking order.

Picture, because everyone loves pictures...
image

@tresf tresf added the bug label Feb 17, 2016
@tresf
Copy link
Member

tresf commented Feb 17, 2016

@musikBear we may be able to fix this, but we'll need someone a bit more familiar with the linking process to help. Here's an mingw-w64 article which I believe to be relevant to the message we're receiving:

https://sourceforge.net/p/mingw-w64/wiki2/Procedure%20entry%20point/

Tagging @lukas-w @Umcaruje on a whim, but first we need to be able to reproduce the problem by building a win32 version on our own machines that suffers the bug, then we can make some attempts to fix this. The downside is that Wine doesn't have the same issue, so we'll need to load up a 30-day XP VM to reproduce the crash. Fortunately Microsoft offers these as read-to-run VirtualBox images via https://dev.windows.com/en-us/microsoft-edge/tools/vms/windows/

In this case, I believe this to be a bug worth fixing. Thanks for reporting. P.S. Please upgrade your O.S. 🍻

@tresf
Copy link
Member

tresf commented Feb 17, 2016

Reproducible via sudo apt-get upgrade and clean build of master on my own Ubuntu 12.04 machine.

https://github.com/tresf/lmms/releases/tag/v1.1.90-tres

Edit: I've tried everything proposed in this thread and also mentioned here to no avail. What it explains is that kernel32.dll didn't offer some of it's API on older Windows versions and (apparently) advapi32.dll did. The compat fix seems to be to change the linking order by overriding CMAKE_C_STANDARD_LIBRARIES, but no dice.

Next attempt is cherry-picking an XP compat flag from a VisualStudio project...

  # configure the win32 API for Windows XP compatibility
  # (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)
  set(WINVER "0x0501" CACHE STRING "Win32 API Target version")
  add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")

Still no luck.

@musikBear
Copy link
Author

@tresf Thanks! But this should not hold back development and or release. 'Us' with xp has to realize that the train has left the station for scrapping 👍

@tresf
Copy link
Member

tresf commented Mar 5, 2016

@musikBear here you are: tresf/lmms-1.1.90-gd098a39-win32-nosoundio.exe

Ok... after using DependencyWalker, I was able to track down libsoundio.dll causing the crash. In short, compiling with -DWANT_SOUNDIO=False will allow LMMS to continue running on Windows XP.

Turns out soundio's InitOnceBeginInitialize is causing this crash on Windows XP, as it's a Windows Vista and higher function. The soundio page makes this requirement/limitation very clear.

@andrewrk (and perhaps @LMMS/developers), I would like to know your thoughts on having libsoundio disabled for our win32 builds.

  • We don't have a whole lot of working options for audio backends in Windows. Has anyone tested this with LMMS? Specifically WASAPI vs. SDL?
  • If our website traffic is any indication, and if it's an influencing factor Windows XP usage is on a rapid decline.

Edit: Perhaps on another note, is there a way to include libsoundio without the hard crash? Can libsoundio be enhanced to silently fail out this missing Windows Vista API, or is it a hard requirement of the library?

image

@grejppi
Copy link
Contributor

grejppi commented Mar 5, 2016

@tresf libsoundio apparently requires Windows 7 or newer. Honestly, XP is dead, and Vista is almost there. The Mac version has no support for Snow Leopard which is also dead. If a user chooses to use a dead OS it's their problem.

@musikBear
Copy link
Author

@tresf very nice! Thanks! 🍷
Perhaps this version could be the last farewell, with a informative note in the release doc, that hereafter winXP specific issues, will not be considered in future development. Then a nice clean sand-line has been drawn, with 1.2, and me and china will have to upgrade, or go linux. No reason that dev should be delayed for catering winXP. I agree.

@mikobuntu
Copy link
Contributor

@musikBear just out of curiosity is XP still covered by security updates? And my 2 cents, I would recommend switching to Linux 😆

@IvanMaldonado
Copy link
Contributor

Who uses vista anyway? Lmms was lucky to run on Vista since many many things didn't work properly even in Vista times.

@tresf
Copy link
Member

tresf commented Mar 5, 2016

I appreciate the feedback.

What I haven't read yet is a Windows 7/8/10 user that has tried libsoundio from our 1.2-RC1 release to vote in its favor. We can pull this library out our 32-bit Windows 1.2 release and offer XP support for a bit longer, or we can drop XP completely and ship with libsoundio. Regardless, I have no intentions of stripping this from the 64-bit Windows installer, since Windows XP 64-bit is very rare on consumer PCs.

On that note, I'm attempting to compile libsoundio using Mingw so that I can experiment with GetProcessAddress and family per MinGW documentation, which would allow this library to silently fail rather than cause "entry point not found" errors.

Mingw build process if failing, but it's here for those curious: andrewrk/libsoundio#58

@tresf
Copy link
Member

tresf commented Mar 6, 2016

So I tried to use libsoundio today on Windows 10 64-bit, and these are my results:

  • Audio backends:
    • libsoundio: WASAPI (default device): Selectable, restart LMMS for changes to take effect. Playback is too sporadic for daily use, but sounds ok when it does work. Something seems to kill the audio randomly. Note, this is not quite as bad as PortAudio: Direct Sound. On a side note, PortAudio: WASAPI was working quite well.
    • libsoundio: WASAPI (**raw** device): Selectable, restart LMMS for changes to take effect. Software crashes and refuses to load after this option is selected.

So at this point, we can't ship libsoundio with Windows builds unless these sound quality and stability issues are addressed.

The decision whether or not to bundle libsoundio in regards to sound quality and stability is really off-topic to this discussion and better left for another thread, but I'll continue to leave this open until a decision is reached at least in regards to the state of Windows XP.

In regards to XP compat... I did attempt to code around this bug directly in the libsoundio library, but just ran into new errors. I've decided any compat coding isn't worth the time to code around. andrewrk/libsoundio@5f33f95

image

@musikBear
Copy link
Author

@mikobuntu updates, no. I run some security stuff on top of xp. I consider that to be sufficient, and i have never had any incident. 🍀

@tresf those are interesting, albeit i do have to say that ASIO4ALL imo is the best 'other than SDL' for windows. At current ASIO is a no-go, because of the mandatory crash-at-shutdown #2584. On my system that causes the BSOD every time -Eg ASIO causes a critical issue in windows, and BSOD flashes for a fraction of a second, and then the system reboot 😠 ..And that is totally unacceptable error handling, but so windows 👎 (an argument for your suggestion @mikobuntu :)
ASIO is imo the best sound, but that is ofcause only compared to SDL, because i have only horrible noise from any other setting.
Against ASIO is ofcause the fact that it cant be bundled at a<ll, and using it is in some way not legit 🍭

tresf added a commit to tresf/lmms that referenced this issue Mar 7, 2016
tresf added a commit to tresf/lmms that referenced this issue Mar 7, 2016
@tresf
Copy link
Member

tresf commented Mar 7, 2016

It is with mixed emotions that I say, we can continue using Windows XP on 1.2.0 via #2645. 😄

Reasoning had most to do with the unreliability of libsoundio + LMMS sound output on Windows. Once these issues are resolved, we can re-enable libsoundio for win32.

screen shot 2016-03-07 at 12 55 10 am

@andrewrk
Copy link
Member

andrewrk commented Mar 7, 2016

Thanks for doing this testing. I'll see if I can figure out what's going wrong with libsoundio on Windows. Although I'll be testing on Windows 7 or Windows 10 and not XP.

@tresf
Copy link
Member

tresf commented Mar 7, 2016

and not XP.

Well, I got a bit ambitious for a minute there, but quickly realized how much compat code would be needed just to prevent the Windows XP crash. I'm still interested in a technique that allows it to silently fail, but I don't know enough about the compiler to tackle something like that.

I'll be testing on Windows 7 or Windows 10 and not XP.

Thanks. We have issues with our PortAudio DirectSound driver too (PortAudio WASAPI seems to work) so our recommendation for years has been to use SDL, which seems to be quite high on CPU usage. We'll be happy to re-enable libsoundio on Windows once it's working. Much obliged.

@andrewrk
Copy link
Member

andrewrk commented Mar 7, 2016

but quickly realized how much compat code would be needed just to prevent the Windows XP crash.

That's not even the real issue, the real issue is that libsoundio would need to target a different audio backend than WASAPI for XP.

@tresf
Copy link
Member

tresf commented Mar 7, 2016

That's not even the real issue, the real issue is that libsoundio would need to target a different audio backend than WASAPI for XP.

This is where my understanding of the linker gets a bit foggy... by "different audio backend" you're essentially saying to ship a separate DLL just for XP, right? Because everything I read about the linker said to either use soft-links against KERNEL32 to detect missing symbols, or don't run on that platform. My attempt to find another way was unsuccessful. 🍺

@andrewrk
Copy link
Member

andrewrk commented Mar 7, 2016

I mean that I would need to write a DirectSound backend for libsoundio since WASAPI was introduced in Windows Vista.

In Windows Vista and beyond, if you use the DirectSound backend, under the covers it's a wrapper around WASAPI. But on XP it's the real deal.

liushuyu pushed a commit to liushuyu/lmms that referenced this issue Mar 8, 2016
@gwald
Copy link

gwald commented Sep 10, 2016

lmms-1.1.90-win32.exe has the KERNEL32 missing issue for winXP.
I removed libsoundio.dll but it's still linked.
Where's the installer or lmms.exe for winXP?
Cheers.

@musikBear
Copy link
Author

@gwald
Here, if its still available, if not, tell here
#2576 (comment)

@gwald
Copy link

gwald commented Sep 10, 2016

ha.. cool thanks, yes that works :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants