Not running on Linux at all?


#1

Hi Julian!

Something strange happens when running my application under openSuSE 10.2 x86_64. The application just silently exits right after launching with no errors at all.
First, I’d got “segment fault” exceptions under the debug build. But then, I’d read the thread at the forum and have applied the juce64.diff patch and added JUCE_64BIT definition. No positive results. My application still silently exits with no errors and even no exceptions no matter the debug or release builds were launched.

What am I doing wrong?


#2

the 32bit version behaves the same…

…aha! I discovered the next thing while debugging: the application exits because of the following function:

//============================================================================== // Not currently sure how to do these on Linux void* juce_getGlobalLock (const String& lockName, int timeoutMillis) { return 0; }

So, what do I have to do to compile and run a JUCE application under linux?


#3

I compile and run apps on linux all the time, and so do lots of other people, so this is a bit odd. Global locks are one of the few remaining bits that I’ve not implemented on linux yet, but I’d never run into this problem before. What’s actually happening? A crash? If so, what’s the rest of the stack trace?


#4

No, that’s because I do not allow more than one instance to run. By allowing that, the application runs OK under the Release version, but I’ve encountered another problem. I cannot move the application window when using JUCE title bar. There is no problems when using the native OS title bar. How to solve the problem?

Another one. The debug version is still not running returning -1 on exit. But while step-by-step debuging, the application runs OK. Strange. But I’ve discovered that it happens because of the SplashScreen class. When I comment out the SplashScreen creation line, the debug version runs OK. Moreover, the SplashScreen class on linux does not render the alpha chennel of my PNG image (My Windows version does the thing OK). The Code::Blocks’s splash screen uses PNG to display it properly with no problems, so I can look through its source code to discover how to implemet it in JUSE.


#5

Well, I’ve found out that my main application window is too big to be moved easily (it occupies the whole working desktop area). That’s because of the edge snapping.

The 64bit version looks a little bit differently than the 32bit one. The 32bit application looks the same as Windows version but 64bit one has a thick border around and it aloows to resize window although it has not the resizing style. Weird.


#6

No idea what’s happening with the window dragging - does the juce demo work?

Is it an assertion that’s blowing up the debug splash screen? I bet it’s an assertion warning you that it doesn’t support transparent windows, which is why your png isn’t showing up as you’d like it to. Not all window managers support semi-transparent windows, so I’ve not really looked at how you’d do that yet.


#7

I’ve answered it above. My application window is too big (as working area) and it snaps to display edges and do not want to move. Smaller windows are dragged OK. Although native OS title bar allows dragging my big main window.

Julian, take a careful look at the FLAC API as it’s changed since the last FLAC version (e.g. “seekable_stream…” was replaced just with “stream…” etc.).

The SplashScreen class does not throw any exceptions or assertions and I think it must render the PNGs because Code::Blocks shows its splash screen PNG with alpha channel normally. It means my current window manager can render windows with alpha channells. So, I can look into the CodeBlocks’ source code to find out how to handle this.


#8

That’ll be the window manager snapping the windows - I don’t know any good way to stop it interfering like that…

I know about the flac changes, but for the next release I’ve now embedded the flac and ogg source code inside juce, so that it all just builds without needing to use any external libs.


#9

That’s the great idea! Thanks :slight_smile:


#10

[quote=“Ptomaine”]No, that’s because I do not allow more than one instance to run. By allowing that, the application runs OK under the Release version, but I’ve encountered another problem. I cannot move the application window when using JUCE title bar. There is no problems when using the native OS title bar. How to solve the problem?
[/quote]

I think this could be the same problem as in this discussion:
http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?t=1168

Are you using the fvwm window manager? In case not, which one are you using, and does it help to use a different window manager?


#11

I’ve got the same problem: the library itself compiles OK, so does the demo app, but when trying to run it i get such a message:

# ./build/jucedemo 
JUCE v1.40
Time and date: 17 Jan 2007 11:59:31 pm
Operating system: Linux
CPU vendor: GenuineIntel
CPU speed: 2993MHz

Number of physical CPUs: 2
Number of logical CPUs: 2
CPU has MMX: yes
CPU has SSE: yes
CPU has SSE2: yes
CPU has 3DNOW: no
CPU has hyperthreading: no
Memory size: 494MB
Current executable file: /var/abs/local/juce/demo/build/linux/build/jucedemo
User home directory: /root
User documents directory: /root
User application data directory: /root
Common application data directory: /var
Temp directory: /var/tmp

What’s wrong?


#12

Don’t understand why you’ve posted that output - it’s just what the demo dumps to show how to use some of the system info functions. You do seem to be running as root though, which is a bit of a strange choice…


#13

Well, I hoped to see a kind of a window drawn, as windows version of demo does, no just console output.


#14

well yes - of course you should get a window… Have you tried running it gdb to see if something’s crashing?


#15