Author Topic: libbassmix on linux x64 crash  (Read 219 times)

pipothebit

  • Posts: 10
libbassmix on linux x64 crash
« on: 3 Jun '18 - 20:57 »
Hi,
I am trying to run BassMix under mono in Linux x64 but i can't.
I have x64 version ob libbas.so and libbassmix.so under /us/lib
I have run ldconfig
My simple code on Program.cs Main function is:
 
Code: [Select]
Console.WriteLine("BASSLib: {0:X}", dlopen("libbass.so", 0x101));
Console.WriteLine("BASSLibMix: {0:X}", dlopen("libbassmix.so", 0x101));
var version = BassMix.BASS_Mixer_GetVersion();

The output wwithout the call of BassMix.BASS_Mixer_GetVersion(); is:

Code: [Select]
BASSLib: 94216751787504
BASSLibMix: 94216752154464

If I call the BassMix.BASS_Mixer_GetVersion(); line a stacktrace is generated immediately without previous lines:
Code: [Select]
Native stacktrace:

/usr/bin/cli(+0xc8514) [0x562aa7171514]
/usr/bin/cli(+0x1217ce) [0x562aa71ca7ce]
/usr/bin/cli(+0x3d7e3) [0x562aa70e67e3]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890) [0x7f5420573890]
/usr/lib/libbassmix.so(+0x7cfa) [0x7f541c831cfa]........


Any advice??

Thank You in advance and sorry about my english.



pipothebit

  • Posts: 10
Re: libbassmix on linux x64 crash
« Reply #1 on: 4 Jun '18 - 07:42 »
Hi again,
Just for more info I have attached the output of uname -a and a dump file.
Code: [Select]
$ uname -a
Linux starback 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Ian @ un4seen

  • Administrator
  • Posts: 21133
Re: libbassmix on linux x64 crash
« Reply #2 on: 4 Jun '18 - 13:31 »
What happens if you call a BASS function (eg. BASS_GetVersion) before BASS_Mixer_GetVersion? That would hopefully ensure that the BASS library is loaded first (it needs to be loaded before any add-ons are).

pipothebit

  • Posts: 10
Re: libbassmix on linux x64 crash
« Reply #3 on: 4 Jun '18 - 16:01 »
Hi again,
Calling Bass.BASS_GetVersion() just before BassMix.BASS_Mixer_GetVersion(); works.

Is there a way to check if Bass is fully loaded? and another question, will be a netcoreapp2.0 profile in future Bass.Net?

Thank you! :)

Ian @ un4seen

  • Administrator
  • Posts: 21133
Re: libbassmix on linux x64 crash
« Reply #4 on: 4 Jun '18 - 17:31 »
I believe .Net loads a DLL when it is first used by the app, and so making sure a BASS function is called before any add-on functions will suffice. You could make a call to BASS_GetVersion first thing during initialization. By the way, this requirement only applies on Linux (not other platforms) due to the way that the add-ons access functions from the BASS library there.

Regarding the "netcoreapp2.0 profile" question, I'm not sure of the answer to that, so I have asked the BASS.Net developer to chime in.

pipothebit

  • Posts: 10
Re: libbassmix on linux x64 crash
« Reply #5 on: 4 Jun '18 - 18:46 »
OK

Very Thank You @Ian

I will be checking future versions while I try to patch current version to work with netcoreapp2.0 profile.

Thank You again :)

radio42

  • Posts: 4618
Re: libbassmix on linux x64 crash
« Reply #6 on: 4 Jun '18 - 18:49 »
Yes, any .net DLL is automatically loaded with the very first function call to it.
See here for details: http://www.bass.radio42.com/help/html/b8b8a713-7af4-465e-a612-1acd769d4639.htm#32vs64

Regarding the .Net Core 2.0 lib: No, there are no plans to do so.
But there is the plan to ship a single .Net Standard Lib version instead.
.Net Standard is the foundation to ALL other .Net families and therefore the right way to implement a common API layer.

However, currently the marshaling is still a bit limited in .Net Core and Standard - thus I still cannot fully build on it. But I hope with the next release 'they' implemented all I need.