Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Encountering Bus Error in Java Application ?

Encountering Bus Error in Java Application ?
Thread Tools
Fresh-Faced Recruit
Join Date: May 2001
Location: India
Status: Offline
Reply With Quote
Aug 6, 2001, 04:53 AM
 
Hi,

I am developing an application in Java and running it on Mac OS X.
My application has several Dialogs which are extended by JDialog.

My problem is this, when I invoke the dialogs from menu or toolbar buttons then sometimes the application exits giving a "Bus Error". This behavior is unpredictable, this means sometimes it gives Bus Error and some times it works correctly.

My system is iMac, with Mac OS X and 256MB RAM.

Can any body tell me what could be the problem ? Is this a programming problem or a system dependent bug?
Please help. Its Urgent.

Regards
Rachna
     
Forum Regular
Join Date: Aug 2001
Location: Vienna, Austria
Status: Offline
Reply With Quote
Aug 6, 2001, 07:21 AM
 
Try to run the java-vm in gdb to get the backtrace:

<font face = "courier">gdb java
run &lt;args&gt;</font>

And when the signal occurs:
<font face = "courier">bt
quit</font>
     
Rachna  (op)
Fresh-Faced Recruit
Join Date: May 2001
Location: India
Status: Offline
Reply With Quote
Aug 6, 2001, 11:05 PM
 
I m running my application through jar.
So the command line becomes java -jar MyApplication.jar

the gdb is not working with this command line. It gives error.
What should i do?
     
Dedicated MacNNer
Join Date: Apr 2001
Location: San Francisco, USA
Status: Offline
Reply With Quote
Aug 6, 2001, 11:21 PM
 
Originally posted by Rachna:
<STRONG>What should i do?</STRONG>
% gdb /System/Library/Frameworks/JavaVM.framework/Versions/1.3/Commands/java
GNU gdb 5.0-20001113 (Apple version gdb-186.1) (Sun Feb 18 01:18:32 GMT 2001) (UI_OUT)
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-apple-macos10".
Reading symbols for shared libraries ... done
(gdb) run -jar MyApplication.jar
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:23 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2