Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] SWT & JVM crashes

Title: Message
In addition, we've found it helpful in our own cross-platform efforts (in C) to enforce host specific restrictions on the development platform that most people are using. So for example if GTK crashes when it uses an invalid GC, it would be good if a check were put into the other platforms (esp. Windows) so that it would throw an exception there too. That's not to take the place of unit tests, but just as an extra safety net.
 
-----Original Message-----
From: Randy Hudson [mailto:hudsonr@xxxxxxxxxx]
Sent: Wednesday, March 17, 2004 10:36 AM
To: platform-swt-dev@xxxxxxxxxxx
Subject: Re: [platform-swt-dev] SWT & JVM crashes


I'm going to guess that the answer is: the behavior is undefined.  Clients should never be doing this.  The number of combinations you would have to test to ensure consistency would be pretty large.


"Ivan Markov" <ivan.markov@xxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

03/17/2004 08:38 AM
Please respond to platform-swt-dev

       
        To:        platform-swt-dev@xxxxxxxxxxx
        cc:        
        Subject:        [platform-swt-dev] SWT & JVM crashes



 
As far as I know NT Win32, using invalid HDC/HFONT/HWND etc. handles will not crash the process.
However, I'm not so certain it is true for SWT/GTK. Does it use some sort of refcounting to track the shared resources, I haven't noticed anything like this in the sources..
 
Using the type of code from above in SWT/Fox will lead to JVM segfault almost 100%.
 
 
The question is, are JVM crashes in situations like the above acceptable in a SWT port, or I should track the shared resources and handle nicely efforts to dispose these while they are still in use?

Back to the top