Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Mon Jun 24, 2019 4:18 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: "Segmentation fault" calling external library
PostPosted: Wed May 26, 2010 4:00 am 
Offline

Joined: Wed May 26, 2010 3:26 am
Posts: 4
I'm Testing Realbasic to linux and I have a problem

When I make a call to some function of a library get a segmentation fault. I tested with other libraries and work well. I tried to make a small application in C and works well.

This is my test code (console application):

Soft Declare Function BASS_FX_TempoCreate Lib "libbass_fx.so" (ByVal chan As Integer, ByVal flags As Integer) As Integer
Dim x as integer
Print "Hit a key..."
dim R as string = Input()
x=BASS_FX_TempoCreate(0, 0)


This is the result (debuging with gdb):

Leyendo símbolos desde /home/om/Escritorio/test linux/test2/consola/consola...(no debugging symbols found)...hecho.
(gdb) run
Starting program: /home/om/Escritorio/test linux/test2/consola/consola
[Thread debugging using libthread_db enabled]
Hit a key...
Program received signal SIGSEGV, Segmentation fault.
0x00e175c3 in BASS_FX_BPM_Free () from /usr/local/lib/libbass_fx.so


If I declare the function normally (not as soft declaration) crashes immediately. If declared it soft, crash when calling the function.

I use:
RealStudio 2010 r2 (demo)
Linux Ubuntu 9.10 Karmic Koala (with libstdc++5 installed)

NOTE: the same result with other distros (live-cd: opensuse 11.2 & debian based live-cds)


Top
 Profile  
Reply with quote  
 Post subject: Re: "Segmentation fault" calling external library
PostPosted: Fri May 28, 2010 6:33 am 
Offline

Joined: Wed May 26, 2010 3:26 am
Posts: 4
I installed ubuntu 9.04 and get the same error.

Any idea?


Top
 Profile  
Reply with quote  
 Post subject: Re: "Segmentation fault" calling external library
PostPosted: Fri May 28, 2010 1:42 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
Sounds like you might not be using the library correctly or something

But the library is crashing your app so however you're calling it must not be right

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: "Segmentation fault" calling external library
PostPosted: Tue Jun 01, 2010 3:08 am 
Offline

Joined: Wed May 26, 2010 3:26 am
Posts: 4
I continue doing tests and I found something new ...

this code crashes:

If System.IsFunctionAvailable("BASS_FX_TempoCreate","libbass_fx.so") Then


... Segmentation fault.

libbass_fs.so is available in this link: http://www.un4seen.com/filez/0/bass_fx24-linux.zip

Can be compatibility problems with REALbasic?

NOTE: c++ works fine


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group