Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-jambi-interest Archive, November 2006
Example crashs on Mac


Message 1 in thread

Hi there,

I'm doing my first steps with Qt Jambi on my Mac. I tried a simple 
program for some tests. I recieved a seg fault for this small example.

[code]

import com.trolltech.qt.gui.*;

public class test extends QMainWindow {
     public static void main (String args[]){
	QApplication.initialize(args);
	QWidget wid = new QWidget();
	wid.show();
	QApplication.exec();
     }
}

[/code]

I was quite confused, because these are also my first steps with Java, 
but it seems that everything else works fine. Also the precompiled 
examples work. Compiling is no problem, so I think it could be a Qt 
Jambi problem, because the crash occurs in:

[snip]
0   libqtjambi.1.0.0.jnilib        	0x06883ed4 
StaticCache::resolveQtJambiInternal_internal() + 40
1   libqtjambi.1.0.0.jnilib        	0x06886704 
qtjambi_end_paint(JNIEnv_*, _jobject*) + 48
2   libQtGui.4.dylib               	0x068f6b4c QWidget::event(QEvent*) + 908
[/snip]

Sometimes I get the message:
QWidget::repaint: Recursive repaint detected

Are there any other Mac users of Qt Jambi around who could help me out 
or am I doing something else wrong?


Best regards
Tilman


PS:
My Java version:
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-112)
Java HotSpot(TM) Client VM (build 1.5.0_06-64, mixed mode, sharing)


Message 2 in thread

Tilman Holschuh wrote:
> Hi there,
> 
> I'm doing my first steps with Qt Jambi on my Mac. I tried a simple 
> program for some tests. I recieved a seg fault for this small example.

...

> I was quite confused, because these are also my first steps with Java, 
> but it seems that everything else works fine. Also the precompiled 
> examples work. Compiling is no problem, so I think it could be a Qt 
> Jambi problem, because the crash occurs in:

Hi Tilman,

Did you start the virtual machine with the option -XstartOnFirstThread?

Qt Jambi on Mac OS X requires this flag to properly run. This is because 
of the way Swing and the Java virtual machine on Mac OS X cooperate with 
Quartz.

If you run the examples you see that the qtjambi.sh bash script passes 
this command along as well as setting the DYLD_LIBRARY_PATH to the lib 
directory.

best regards,
Gunnar