Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
9 Sep '24 - 02:24
Home
Help
Search
Login
Register
Un4seen Developments Forum
»
Developments
»
BASS
»
Topic:
.Net 9 Preview 6 causes all BASS calls to instantly crash app
Reply
Print
Pages: [
1
]
Author
Topic: .Net 9 Preview 6 causes all BASS calls to instantly crash app (Read 378 times)
pgruebele
Posts: 94
.Net 9 Preview 6 causes all BASS calls to instantly crash app
«
on:
13 Jul '24 - 10:55 »
Quote
I just updated my app to .Net 9 preview 6 and all bass calls started crashing the app. With Preview 5 things worked. The rest of my app is working normally so this is some incompatibility between Bass and the latest .Net 9 Preview 6.
The error message is "... has exited with code 3221226505 (0xc0000409)." which seems to mean STATUS_STACK_BUFFER_OVERRUN so could this be an existing issue that is only no detected by the runtime?
I updated to the latest bass libraries and there is no change.
The native stack trace looks like this:
KernelBase.dll!00007fff8a431f1e() Unknown No symbols loaded.
bass.dll!00007ffede4f7004() Unknown No symbols loaded.
The exception says:
Unhandled exception at 0x00007FFF8A431F1E (KernelBase.dll) in soundjar.exe: Unknown __fastfail() status code: 0x0000000000000039.
«
Last Edit: 13 Jul '24 - 11:23 by pgruebele
»
Logged
radio42
Posts: 4839
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #1 on:
14 Jul '24 - 16:49 »
Quote
I haven't tried that latest preview myself, as I also don't see any advantage yet to migrate immediately.
But maybe this is a bug in the preview of .Net?
Logged
pgruebele
Posts: 94
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #2 on:
15 Jul '24 - 09:14 »
Quote
I will wait for Preview7 and try again. For now I reverted to Preview 5 because of this issue...
Logged
pgruebele
Posts: 94
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #3 on:
25 Jul '24 - 10:47 »
Quote
Looks like .net 9 RC1 will be released shortly. There is a breaking change regarding removal of BinaryFormatter:
https://github.com/dotnet/runtime/issues/98245
If this is functionality the Bass .Net wrapper uses then this could explain the crash. If not then I will test with RC1 and post back...
Logged
pgruebele
Posts: 94
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #4 on:
30 Jul '24 - 11:58 »
Quote
I did not hear back from you so I scanned your .net assembly and it looks like you indeed have references to BinaryFormatter which will throw exceptions in the .Net 9 release. Not sure that these are causing my particular issue but this will certainly cause issues.
Here is the relevant post:
https://github.com/dotnet/runtime/issues/98245
Logged
pgruebele
Posts: 94
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #5 on:
14 Aug '24 - 05:07 »
Quote
I just updated to the newly released .Net 9 Preview 7 and bass still crashes.
I think it is very unlikely that this is a .Net bug at this point and it is a show stopper for me. Can you recreate this issue and publish a fix?
Thanks!
Logged
Ian @ un4seen
Administrator
Posts: 26015
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #6 on:
14 Aug '24 - 13:02 »
Quote
If you catch the crash in the debugger (in mixed mode), does the call stack lead back to a line in your code, and if so, what is it? Are you also able to reproduce the crash with any of the examples that come with BASS.Net?
Logged
pgruebele
Posts: 94
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #7 on:
14 Aug '24 - 14:26 »
Quote
Yes I upgraded the sample "simple.csproj" and it fails identically (see attaches screenshot).
I am also attaching the upgraded simple sample csproj for your convenience.
Logged
Ian @ un4seen
Administrator
Posts: 26015
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #8 on:
14 Aug '24 - 15:05 »
Quote
OK, that looks like it's crashing in the BASS_Init call. If you put a different BASS function call before that, does it crash at that call instead? Please also confirm what BASS version you're using, ie. what BASS_GetVersion returns. And if you haven't already done so, try the latest build:
www.un4seen.com/stuff/bass.zip
Logged
pgruebele
Posts: 94
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #9 on:
14 Aug '24 - 15:06 »
Quote
I am already using the latest version from your download page. Any call to bass crashes, not just bass init...
Logged
Ian @ un4seen
Administrator
Posts: 26015
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #10 on:
14 Aug '24 - 15:34 »
Quote
The BASS build linked above is newer than the one on the BASS webpage. Please reproduce the crash with it and (if it still happens) then use the debugger's "Save Dump As..." option to get a dump file, and ZIP and upload that to have a look at here:
ftp.un4seen.com/incoming
Logged
pgruebele
Posts: 94
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #11 on:
14 Aug '24 - 15:45 »
Quote
With the latest version from your link the crash no longer happens. Can I safely use this newer version? It appears to use some additional DLLs...
Logged
pgruebele
Posts: 94
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #12 on:
14 Aug '24 - 15:54 »
Quote
Unfortunately with our app bass still crashes even with your latest version. But we use a bunch of add-ons so in that sense our app is different from the simple sample app.
Are there newer versions of all the other DLLs including bass.net to try out?
Logged
pgruebele
Posts: 94
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #13 on:
14 Aug '24 - 16:17 »
Quote
It is still crashing later in our application as shown in the attached screenshot (the bass init call no longer crashes with your latest bass.dll).
Logged
Ian @ un4seen
Administrator
Posts: 26015
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #14 on:
14 Aug '24 - 16:20 »
Quote
Looks like it's in BASSmix now. An updated build of that is available here:
www.un4seen.com/stuff/bassmix.zip
Regarding the BASS.DLL update, there are no known issues with it, so it should be safe to use. It imports the same DLLs as the release version, so there shouldn't be any difference there - what additional DLLs are you seeing?
Logged
pgruebele
Posts: 94
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #15 on:
14 Aug '24 - 16:41 »
Quote
The updated bassmix allows our app to pass that line but then it has the same crash on the next line at:
Un4seen.Bass.AddOn.Enc.BassEnc.BASS_Encode_GetVersion()
I am guessing that if you fix that then the next line will crash as well so all the bass libraries need updating?
Logged
Ian @ un4seen
Administrator
Posts: 26015
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #16 on:
14 Aug '24 - 16:53 »
Quote
A BASSenc update is available here:
www.un4seen.com/stuff/bassenc.zip
If there are any other add-ons affected, please try modifying this URL with the add-on's name to see if there's an updated version of that available too.
Logged
pgruebele
Posts: 94
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #17 on:
14 Aug '24 - 18:25 »
Quote
bassenc appears to have been the last problematic one. Also never mind about the extra DLL loading. Some DLLs just weren't being loaded previously due to the crash...
Logged
Ian @ un4seen
Administrator
Posts: 26015
Re: .Net 9 Preview 6 causes all BASS calls to instantly crash app
«
Reply #18 on:
15 Aug '24 - 13:11 »
Quote
Good to hear that it's all working now. I think I know what it was - it's apparently related to the way that the 64-bit Windows DLLs were being built in 2022 (until December). The 3 affected DLLs were built in that time. All 3 are actually due for new releases soonish, but I'll get some rebuilds up on the BASS page in the meantime, although I would usually recommend using the latest builds (above) instead anyway.
Logged
Reply
Print
Pages: [
1
]
Un4seen Developments Forum
»
Developments
»
BASS
»
Topic:
.Net 9 Preview 6 causes all BASS calls to instantly crash app