Help needed, segmentation fault with java 1.6

Hey, I would very much appreciate help with this problem.
It began a while ago, while I was using Netbeans 6.5 to do some Java Server testing stuff, I was running Adobe Flash on top (working on some WSDL stuff), and the computer was understandable running a bit slowly. However, it got to the point where the computer stopped responding, even with me killing apps as often as possible to conserve memory (1 GB on this machine) and I was forced to kill the machine by holding down the power button (using a white MacBook). When I started up once more, java 1.6 was dead, no amount of re-installs seemed to be helping when I tried downloading the Java Updates from Apple, though java 1.5 seemed to be working at that time. However, poking around in the console and looking at the logs, I noticed that launchd[1] was failing every 10 seconds to start something up, it looked like it was the apache http server, therefore I went to System Preferences to turn of Web Sharing, and that particular problem disappeared. However, whenever I would attempt to run java, even using the Terminal, I would get this Console log, or at least one very similar (this one was generated with java 1.5 I believe)
Process: java [7217]
Path: /usr/bin/java
Identifier: java
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [7208]
Date/Time: 2008-12-13 10:41:23.197 -0500
OS Version: Mac OS X 10.5.5 (9F33)
Report Version: 6
Exception Type: EXCBADACCESS (SIGSEGV)
Exception Codes: 0x000000000000000d, 0x0000000000000000
Crashed Thread: 0
Thread 0 Crashed:
0 libSystem.B.dylib 0x00007fff80e57164 strcmp + 84
1 libobjc.A.dylib 0x00007fff8000b23f _selregisterName + 49
2 libobjc.A.dylib 0x00007fff8000ab46 map_images + 3757
3 dyld 0x00007fff5fc04130 dyld::notifyBatchPartial(dyldimagestates, bool, char const* (*)(dyldimagestates, unsigned int, dyldimageinfo const*)) + 416
4 dyld 0x00007fff5fc048fd dyld::registerImageStateBatchChangeHandler(dyldimagestates, char const* (*)(dyldimagestates, unsigned int, dyldimageinfo const*)) + 525
5 libSystem.B.dylib 0x00007fff80e56472 dyldregister_image_state_changehandler + 88
6 libobjc.A.dylib 0x00007fff8000954f objcinit + 38
7 dyld 0x00007fff5fc11257 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 279
8 dyld 0x00007fff5fc0d16c ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 268
9 dyld 0x00007fff5fc0d110 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 176
10 dyld 0x00007fff5fc0d110 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 176
11 dyld 0x00007fff5fc0d110 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 176
12 dyld 0x00007fff5fc0d254 ImageLoader::runInitializers(ImageLoader::LinkContext const&) + 52
13 dyld 0x00007fff5fc038b4 dyld::initializeMainExecutable() + 132
14 dyld 0x00007fff5fc06eb1 dyld::main(machheader const*, unsigned long, int, char const**, char const**, char const**) + 2209
15 dyld 0x00007fff5fc01695 dyldbootstrap::start(mach_header const*, int, char const**, long) + 693
16 dyld 0x00007fff5fc0103a dyldstart + 42
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x00000000000008a0 rbx: 0x00007fff80018760 rcx: 0x0000000000005722 rdx: 0x000000000000008a
rdi: 0x00007fff80018760 rsi: 0x0c00004806000038 rbp: 0x00007fff5fbfdbc0 rsp: 0x00007fff5fbfdba8
r8: 0x00000000c5a8037d r9: 0x0000000068e33de7 r10: 0x00000000bcafe771 r11: 0x0000000000000001
r12: 0x0c00004806000038 r13: 0x0000000000000001 r14: 0x0000000000000001 r15: 0x000000000000001d
rip: 0x00007fff80e57164 rfl: 0x0000000000010202 cr2: 0x00007fff7002f9f0
Binary Images:
0x100000000 - 0x10000afe0 +java ??? (???) <53c91321e79d660f62c011f5d8625a7f> /usr/bin/java
0x100010000 - 0x100018ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM
0x7fff5fc00000 - 0x7fff5fc2e593 dyld 96.2 (???) <b0570939de4a19f478c8eabab95aaaee> /usr/lib/dyld
0x7fff80003000 - 0x7fff800f7fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib
0x7fff80199000 - 0x7fff801aaffd libz.1.dylib ??? (???) <f260db32dd97a14108a5e04184785ded> /usr/lib/libz.1.dylib
0x7fff801ab000 - 0x7fff801e8ff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <3e058b95c78dc2f54ec3f9781bd86e1c> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfi guration
0x7fff801e9000 - 0x7fff80239fe7 com.apple.Metadata 10.5.2 (398.22) <1fc60b4568a7ffbec4273f656d61ab58> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadat a.framework/Versions/A/Metadata
0x7fff808c2000 - 0x7fff80957ffb com.apple.LaunchServices 290 (290) <b5b494e44b291a782bee370a046d5727> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchS ervices.framework/Versions/A/LaunchServices
0x7fff80a31000 - 0x7fff80a39ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib
0x7fff80a3a000 - 0x7fff80a6cff7 libauto.dylib ??? (???) <cc8eece8c0097b254c758bd4e8df9537> /usr/lib/libauto.dylib
0x7fff80e4d000 - 0x7fff80fd1ffb libSystem.B.dylib ??? (???) <8e3de87ccdf6c4606b9bcb9da3a33eda> /usr/lib/libSystem.B.dylib
0x7fff80fd2000 - 0x7fff81046fe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib
0x7fff81075000 - 0x7fff81106fff com.apple.SearchKit 1.2.1 (1.2.1) <e2a25e04f281fe8ff7088a08a549020f> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchK it.framework/Versions/A/SearchKit
0x7fff81107000 - 0x7fff8119bfe3 com.apple.CFNetwork 339.5 (339.5) <6e912954955e0af0e0defb59cc2c348a> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwo rk.framework/Versions/A/CFNetwork
0x7fff814b5000 - 0x7fff814dcfff libxslt.1.dylib ??? (???) <22a74e7859cfbf63ae7fc310b0a669a4> /usr/lib/libxslt.1.dylib
0x7fff82112000 - 0x7fff82249fff com.apple.CoreFoundation 6.5.4 (476.15) <4b970007410b71eca926819f3959548f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff8224a000 - 0x7fff8224affa com.apple.CoreServices 32 (32) <c12e589173b697ce88050a6f736549eb> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x7fff830ae000 - 0x7fff830edfef com.apple.framework.IOKit 1.5.1 (???) <56d5528f3623ad4d9c68751018e658c3> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x7fff832b0000 - 0x7fff83360fef com.apple.CoreServices.OSServices 226.5 (226.5) <4461ef69cec249de2315c88e83d4c904> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServi ces.framework/Versions/A/OSServices
0x7fff83465000 - 0x7fff835d3fff libicucore.A.dylib ??? (???) <25557e76cafa3f8a97ca7bffe42e2d97> /usr/lib/libicucore.A.dylib
0x7fff835d8000 - 0x7fff835dcfff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib
0x7fff835f5000 - 0x7fff8360dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Diction aryServices.framework/Versions/A/DictionaryServices
0x7fff836a5000 - 0x7fff8379afff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib
0x7fff8379b000 - 0x7fff837a1fff com.apple.DiskArbitration 2.2.1 (2.2.1) <e75fe224700767869227cc903bef8ed9> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x7fff8387a000 - 0x7fff83a80ffb com.apple.security 5.0.4 (34102) <e0b73ab106139601404f2666ce1b9d65> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x7fff83ecb000 - 0x7fff84165fe3 com.apple.Foundation 6.5.6 (677.21) <8995b3185ca91d3508c7580794d40813> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x7fff84166000 - 0x7fff841a1fff com.apple.AE 402.2 (402.2) <b03583e0747f82199e0d9604014faa34> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.fram ework/Versions/A/AE
0x7fff842ed000 - 0x7fff842f9ff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib
0x7fff842fa000 - 0x7fff84382fe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib
0x7fff84383000 - 0x7fff8467efe3 com.apple.CoreServices.CarbonCore 786.6 (786.6) <7048aee00133f19029108600e9ede844> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonC ore.framework/Versions/A/CarbonCore
0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib
0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib
As I said, java 1.5 worked for a while, however recently it too has stopped working and spits out Segmentation Faults like these. Any clues as to why, and how to fix?
Much thanks.

I have no answers, but strongly suggest posting to an appropriate forum under OS X Technologies, where Unix and developer gurus hang out.

Similar Messages

  • Help needed- Check hardware with java

    Hi everyone:)
    I'm working on a colledge project and i need to know if anybody knows a way to check hardware's capabilities using java, i.e. i want to use java to check if a machine can play a sound clip, or has enough free space, etc...
    Can someone please point me some clues on how to get there (prefeberably using J2ME)?
    Thanks in advance,
    Pedro

    Download the SAP Java connector (JCo).
    This has documentation and sample code to get you started.

  • Python segmentation fault with matplotlib and opencv2

    Once again fellow archers, I am in need of your help.
    I have a file, Test1.py, which uses cv2, pylab, and numpy.
    Excluding either pylab or cv2 functions, I can make the rest of the script work, but when pylab is imported, calling cv2's imshow() function causes a "segmentation fault (core dumped)".
    By the sound of it, I thought it might come from the underlying C stuff, rather than python.
    So I ran it through gdb.
    This is where I need help. I'm not sure how to interprete the backtrace, and I probably wouldn't know what to to if I were.
    Perhaps a problem with glib or GObject?
    Below are the python script in question (it a template for a school assignment), and the gdb trace.
    Test1.py
    import sys
    sys.settrace
    import numpy as np
    import cv2
    import math
    import pylab
    #----------------------------Functions
    def show1_OpenCV(image):
    # ##This function define a window by namedWindow() and then show the image in that window
    image=np.array(image)
    # cv2.namedWindow('ByOpenCV', cv2.WINDOW_AUTOSIZE)## create a window called
    # #+'By OpenCV'Using the \nw{cv2.WINDOW_AUTOSIZE} parameter when defining a window display the image with its actual size in the window.
    cv2.imshow('ByOpenCV', image) ## show the image in 'By OpenCV' window
    # cv2.waitKey(0) ## the window will be closed with a (any)key press
    def show2_OpenCV(*image):
    ## Showing the image using OpenCV
    im=[]
    for i in image:
    im.append(array(i))
    cv2.namedWindow('1', cv2.WINDOW_AUTOSIZE)## create a window called 'By OpenCV' Using the \nw{cv2.WINDOW_AUTOSIZE} parameter when defining a window display the image with its actual size in the window.
    cv2.imshow('1', im[0]) ## show the image in 'By OpenCV' window
    cv2.namedWindow('2', cv2.WINDOW_AUTOSIZE)
    cv2.imshow('2', im[1])
    cv2.waitKey(0) ## the window will be closed with a (any)key press
    def showAll_OpenCV(**image):
    im = []
    for (k,v) in image.items():
    cv2.namedWindow(str(k), cv2.WINDOW_AUTOSIZE)
    cv2.imshow(k, np.array(v))
    cv2.waitKey()
    def show1_pylab(image):
    ## Showing the image using pylab
    figure("By pylab")## Create a figure
    gray()
    title("1"); imshow(image)
    show()
    def show2_pylab(*images):
    ## Showing the image using pylab
    figure("By pylab")## Create a figure
    gray()
    subplot(1,2,1);title("1"); imshow(images[0])## more about 'subplot()' : <http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label>
    subplot(1,2,2);title("2"); imshow(images[1])
    show()
    def grayLevelMap2(I,vector):
    I = np.copy(I)
    (x,y) = np.shape(I)
    for i in range(x):
    for j in range(y):
    I[i,j] = vector[I[i,j]]
    return I
    def grayLevelMap(I,a,b):
    I = np.copy(I)
    (x,y) = np.shape(I)
    for i in range(x):
    for j in range(y):
    I[i,j] = max(0,min(255, a* I[i,j] +b))
    return I
    def grayLevelMapF(I,f):
    I = np.copy(I)
    (x,y) = np.shape(I)
    for i in range(x):
    I[i] = map(f, I[i])
    return I
    def f(x):
    func=(255-x)*math.sqrt(100/+1)
    return func
    def displayVect(v):
    points=[]
    for i in range(len(v)):
    points.append((i,v[i]))
    bins = range(256)
    n = v
    grid(None, 'major', 'both')
    plot(bins, n, 'k-', linewidth=5)
    axis([-2, 256, -2, 256])
    show()
    ##------------------------------Main body
    # Loading an image using openCV
    I1=cv2.imread("children.tif")
    I2=cv2.imread("Eye1.jpg")
    I3=cv2.imread("Marker1.jpg")
    I4=cv2.imread("GreenTest.jpg")
    I1=cv2.cvtColor(I1, cv2.COLOR_RGB2GRAY)
    I2=cv2.cvtColor(I2, cv2.COLOR_RGB2GRAY)
    I3=cv2.cvtColor(I3, cv2.COLOR_RGB2GRAY)
    I4=cv2.cvtColor(I4, cv2.COLOR_RGB2GRAY)
    show1_OpenCV(grayLevelMapF(I4, lambda x: 2*x))
    show1_OpenCV(I4)
    gdb output:
    Reading symbols from /usr/bin/python2...(no debugging symbols found)...done.
    (gdb) run Test1.py
    Starting program: /usr/bin/python2 Test1.py
    warning: Could not load shared library symbols for linux-vdso.so.1.
    Do you need "set solib-search-path" or "set sysroot"?
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib/libthread_db.so.1".
    Traceback (most recent call last):
    File "/usr/share/gdb/auto-load/usr/lib/libgobject-2.0.so.0.3400.3-gdb.py", line 9, in <module>
    from gobject import register
    File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
    ImportError: No module named backtrace
    [New Thread 0x7fffdf259700 (LWP 3981)]
    Program received signal SIGSEGV, Segmentation fault.
    0x00000036cb6bc785 in do_warn () from /usr/lib/libpython2.7.so.1.0
    (gdb) backtrace
    #0 0x00000036cb6bc785 in do_warn () from /usr/lib/libpython2.7.so.1.0
    #1 0x00000036cb6bcc4c in PyErr_WarnEx () from /usr/lib/libpython2.7.so.1.0
    #2 0x00007fffe10153b5 in ?? ()
    from /usr/lib/python2.7/site-packages/gobject/_gobject.so
    #3 0x00000036cde4ea00 in g_logv () from /usr/lib/libglib-2.0.so.0
    #4 0x00000036cde4ebf2 in g_log () from /usr/lib/libglib-2.0.so.0
    #5 0x00007fffef8e009e in gtk_disable_setlocale ()
    from /usr/lib/libgtk-x11-2.0.so.0
    #6 0x00007ffff21ca8a8 in cvInitSystem ()
    from /usr/lib/libopencv_highgui.so.2.4
    #7 0x00007ffff21cafb3 in cvNamedWindow ()
    from /usr/lib/libopencv_highgui.so.2.4
    #8 0x00007ffff352dfe4 in ?? () from /usr/lib/python2.7/site-packages/cv2.so
    #9 0x00000036cb6dc05a in PyEval_EvalFrameEx ()
    from /usr/lib/libpython2.7.so.1.0
    #10 0x00000036cb6dba83 in PyEval_EvalFrameEx ()
    from /usr/lib/libpython2.7.so.1.0
    #11 0x00000036cb6dcedd in PyEval_EvalCodeEx ()
    ---Type <return> to continue, or q <return> to quit---j
    from /usr/lib/libpython2.7.so.1.0
    #12 0x00000036cb6dcfb2 in PyEval_EvalCode () from /usr/lib/libpython2.7.so.1.0
    #13 0x00000036cb6f5eea in run_mod () from /usr/lib/libpython2.7.so.1.0
    #14 0x00000036cb6f6ce2 in PyRun_FileExFlags ()
    from /usr/lib/libpython2.7.so.1.0
    #15 0x00000036cb6f76fb in PyRun_SimpleFileExFlags ()
    from /usr/lib/libpython2.7.so.1.0
    #16 0x00000036cb7089f2 in Py_Main () from /usr/lib/libpython2.7.so.1.0
    #17 0x00007ffff7833a15 in __libc_start_main () from /usr/lib/libc.so.6
    #18 0x0000000000400741 in _start ()
    (gdb) run Test1.py
    Last edited by Bladtman242 (2013-02-12 19:30:55)

    Thank you so much!
    This (ugly) workaround might have saved me from a lot of trouble with this semester's exercises.
    Just to be clear, the solution is:
    Import opencv
    Call namedWindow
    Do the rest of the imports
    Do the rest of the script
    Corect?
    I'm hesitant to mark the thread as solved, as the problem is still very much there, this workaround just allows us to ignore it.

  • Segmentation fault with xqillia when using purifyplus

    Hi friends,
    I am using BDB , xqilla /xerces interface to perform an xquery.The program works fine,but after building the program along with purifyplus,if i try to run the program a segmentation fault is raised.
    attached are the code,command used to build the program and the stack trace.
    here is some specifications-
    Rational Purifyplus 7.0
    gcc version 3.4.6
    OS-Linux(redhat);Linux 3 2.6.9-89.ELsmp
    dbxml-2.4.16
    CODE:
    #include "DbXml.hpp"
    #include <iostream>
    using namespace DbXml;
    using namespace std;
    int putxml(string filename,string docname2)
    XmlManager myManager;
    XmlContainer myContainer;
    try
    if (!myManager.existsContainer("Container.bdbxml"))
    myContainer =myManager.createContainer("Container.bdbxml");
    myContainer = myManager.openContainer("Container.bdbxml");
    XmlUpdateContext theContext = myManager.createUpdateContext();
    XmlInputStream *theStream =myManager.createLocalFileInputStream(filename);
    myContainer.putDocument(docname2,theStream,theContext,0);
    catch(XmlException &e)
    cout<<e.what()<<endl;
    /* function to get the xml file and display output */
    void getxml(string docname3)
    string query_result;
    try
    XmlManager myManager;
    XmlContainer myContainer = myManager.openContainer("Container.bdbxml");
    XmlQueryContext myContext = myManager.createQueryContext();
    myContext.setDefaultCollection("./Container.bdbxml");
    cout<<"docname3 is "<<docname3<<endl;
    std::string myQuery="for $i in doc('dbxml:/Container.bdbxml/docname') return ($i)";
    XmlQueryExpression qe = myManager.prepare(myQuery, myContext);
    XmlResults results = qe.execute(myContext);
    XmlValue my_value;
    while (results.next(my_value))
    query_result += my_value.asString(); //xml file data come in query_result
    }catch(XmlException &e){
    cout<<e.what()<<endl;
    cout<<query_result<<endl;
    /* main function */
    int main()
    string filename("XYZ.xml"),docname1("docname");
    putxml(filename,docname1);
    getxml(docname1);
    Command used:
    purify -always-use-cache-dir=yes -cache-dir=/tmp/3rdPArty/RT -chain-length=10 -static-checking=no -thread_stack_change=0x4000 -fds=57 -thread-stack-change=0x4000 -best-effort g++ -g final.cpp -I /tmp/3rdPArty/dbxml-2.4.16/dbxml/include/dbxml -L /tmp/3rdPArty/dbxml-2.4.16/install/lib/ -ldbxml -ldbxml-2.4 -lxqilla -lxerces-c -ldb -ldb_cxx
    Stack Trace:
    #0 0x01205131 in m_apm_is_integer ()
    at /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_construct.h:134
    #1 0x009d9794 in std::vector<ASTNode*, XQillaAllocator<ASTNode*> >::_M_insert_aux (this=dwarf2_read_address: Corrupted DWARF expression.
    at /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/vector.tcc:229
    #2 0x00d94dea in std::vector<ASTNode*, XQillaAllocator<ASTNode*> >::push_back (this=Could not find the frame base for "std::vector<ASTNode*, XQillaAllocator<ASTNode*> >::push_back(ASTNode* const&)".
    at /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_vector.h:564
    *#3 0x01195bca in XQParser::yyparse (qp=Could not find the frame base for "*XQParser::yyparse(void*)"*.*
    *) at /tmp/3rdPArty/dbxml-2.4.16/xqilla/build/../src/parser/XQParser.y:2266*
    #4 0x00eb1c4a in XQilla::parse () at /tmp/3rdPArty/dbxml-2.4.16/xqilla/build/../include/xqilla/ast/LocationInfo.hpp:63
    #5 0x006a266a in QueryExpression (this=Not enough elements for DW_OP_rot. Need 3, have 0
    ) at QueryExpression.hpp:42
    #6 0x007d819c in DbXml::XmlManager::prepare (this=Could not find the frame base for "DbXml::XmlManager::prepare(std::string const&, DbXml::XmlQueryContext&)".
    ) at XmlManager.cpp:551
    #7 0x08086a0d in getxml (docname3=
    {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, Mp = 0x80be6e4 "docname"}}) at final.cpp:56
    #8 0x08087dae in main () at final.cpp:81
    As per my understanding my program is crashing in XQParser::yyparse(void*) which is in YACC. is there any known issue regarding compatibility between YACC and Purifyplus ?
    Kindly help me out
    Thanks.
    Edited by: user8114111 on Jul 22, 2009 11:10 PM
    Edited by: user8114111 on Jul 22, 2009 11:15 PM

    Hi. This question is better suited for the BDB XML forum, which is here:
    Berkeley DB XML
    Ben Schmeckpeper

  • X Segmentation fault with new sapphire HD7850

    Hi,
    randomly my X server crash and reboot (like 1 time at day, while surfing the net. No problem while playing under wine/steam)
    i attach the xorg log, but it doesn't say very much to me.
    can you find out what is going on or what i have to do to get a better stack trace/error log?
    interesting part:
    [  6057.946] (EE)
    [  6057.946] (EE) Backtrace:
    [  6057.981] (EE) 0: /usr/bin/X (xorg_backtrace+0x36) [0x58a416]
    [  6057.981] (EE) 1: /usr/bin/X (0x400000+0x18e269) [0x58e269]
    [  6057.981] (EE) 2: /usr/lib/libpthread.so.0 (0x7fd7ffa22000+0xf1e0) [0x7fd7ffa311e0]
    [  6057.981] (EE) 3: /usr/lib/libpixman-1.so.0 (0x7fd7ff57e000+0x82a7d) [0x7fd7ff600a7d]
    [  6057.981] (EE) 4: /usr/lib/libpixman-1.so.0 (0x7fd7ff57e000+0x50c7b) [0x7fd7ff5cec7b]
    [  6057.981] (EE) 5: /usr/lib/libpixman-1.so.0 (pixman_blt+0x52) [0x7fd7ff5894b2]
    [  6057.981] (EE) 6: /usr/lib/xorg/modules/libfb.so (fbCopyNtoN+0x343) [0x7fd7fbf0c453]
    [  6057.981] (EE) 7: /usr/lib/xorg/modules/glesx.so (0x7fd7f9f8d000+0x8d491) [0x7fd7fa01a491]
    [  6057.981] (EE) 8: /usr/lib/xorg/modules/glesx.so (0x7fd7f9f8d000+0x8f62b) [0x7fd7fa01c62b]
    [  6057.981] (EE) 9: /usr/bin/X (0x400000+0x1141f9) [0x5141f9]
    [  6057.981] (EE) 10: /usr/bin/X (0x400000+0xc7315) [0x4c7315]
    [  6057.981] (EE) 11: /usr/bin/X (0x400000+0xc8136) [0x4c8136]
    [  6057.981] (EE) 12: /usr/bin/X (0x400000+0xc6b9c) [0x4c6b9c]
    [  6057.981] (EE) 13: /usr/bin/X (0x400000+0x60d86) [0x460d86]
    [  6057.981] (EE) 14: /usr/bin/X (MapWindow+0x1a2) [0x463b22]
    [  6057.981] (EE) 15: /usr/bin/X (0x400000+0x32690) [0x432690]
    [  6057.981] (EE) 16: /usr/bin/X (0x400000+0x37e51) [0x437e51]
    [  6057.981] (EE) 17: /usr/bin/X (0x400000+0x2695a) [0x42695a]
    [  6057.981] (EE) 18: /usr/lib/libc.so.6 (__libc_start_main+0xf5) [0x7fd7fe8aea15]
    [  6057.982] (EE) 19: /usr/bin/X (0x400000+0x26c9d) [0x426c9d]
    [  6057.982] (EE)
    [  6057.982] (EE) Segmentation fault at address 0x7fd7eac0b000
    [  6057.982]
    Fatal server error:
    [  6057.982] Caught signal 11 (Segmentation fault). Server aborting
    [  6057.982]
    [  6057.982] (EE)
    Please consult the The X.Org Foundation support
             at http://wiki.x.org
    for help.
    [  6057.982] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
    [  6057.982] (EE)
    full xorg log: http://snipt.org/zJhd9

    Here is some additional information that may or may not be of any relevance. I do not know.
    On the old server, I compiled the code with the compilation commands: f95 program.for
    I was able to compile and execute code with small, medium size or large arrays (with or without the additional -openmp flag).
    If I repeat the same command: f95 program.for
    on the new server, I get the following compilation error message for programs with medium size and large arrays:
    In function `newmaxmalecor':
    /mnt/ide0/home/gustaf/education/programming/cesprod100//chicago.for:4340: relocation truncated to fit: R_X86_64_32 against symbol
    If I compile with the additional flags: f95 -xmodel=medium -m64 program.for
    on the new server, there are no compilation errors and I can run the code in sequence.
    However, when I compile with
    f95 -xmodel=medim -m64 -openmp program.for
    on the new server, compilation works, but I cannot execute the code with medium size and large arrays.
    The programs for which I have to add the "-xmodel=medium" flag on the new server to be able to compile the code and run it in sequence, are exactly the ones for which I get segmentation faults when I introduce the openmp flag and try to execute the code in parallel fashion.
    Is this just a coincidence?
    Lage

  • Segmentation fault with just one user

    Hi,
    When I try to close a toolwindow in an application (it's iViewMediaPro), the app crashes. Console says, there's a segmentation fault. This happens only with one useraccount (adminrights). I deleted .pref-files, reinstalled the software, emptied the preferencesfolder in the users library and started the app then, nothing helps.
    Any ideas to solve the problem?
    Thanks for help
    Wolfgang

    Are you implying that you can run that app in other accounts without any problems? If so, then there's corruption or a conflict within the original account, usually associated with preference files. See my response in http://discussions.apple.com/message.jspa?messageID=8664734 on how to resolve those.

  • [SOLVED]Easytag Segmentation fault with kde3 (kdemod)

    (easytag:4811): Gtk-WARNING **: libbonoboui-2.so.0: cannot open shared object file: No such file or directory
    (easytag:4811): Gtk-WARNING **: libbonoboui-2.so.0: cannot open shared object file: No such file or directory
    EasyTAG 2.1.5: Abnormal exit! (PId: 4811).
    Received signal SIGSEGV (11)
    You have probably found a bug in EasyTAG. Please, send a bug report with a gdb backtrace ('gdb easytag core' then 'bt' and 'l') and informations to reproduce it to [email protected]
    Segmentation fault
    If I start up easytag while running KDE3 (kdemod), I get this problem every time. I have tried running it with openbox and it runs without a problem. I have deleted .easytag and reinstalled, but the problem continues.
    EDIT: Installing libbonoboui resolves the problem. It looks like the there is a dependency issue here, I'll file a bug.
    Last edited by alleyoopster (2008-08-02 17:18:06)

    Allan wrote:Do a "pacman -S libbonoboui" an all should be good.  I don't understand why this only occurs in KDEmod though.  Is that on two different computers.   File a bug report about the missing dependancy.
    Yeah thanks Allan, I figured it out. Bug report at http://bugs.archlinux.org/task/11094
    No it is on the same machine
    Last edited by alleyoopster (2008-08-02 17:18:28)

  • [SOLVED] Segmentation Fault with Clementine

    When I open the preferences (Ctrl+P) of Clementine it crashes with a segmentation fault.
    This is the backtrace:
    18:53:58.858 WARN unknown libpng warning: iCCP: known incorrect sRGB profile
    18:53:58.900 WARN unknown libpng warning: iCCP: known incorrect sRGB profile
    [Thread 0x7fff9ffff700 (LWP 1566) exited]
    Program received signal SIGSEGV, Segmentation fault.
    0x00007fffec8b9ba1 in ?? () from /usr/lib/libfontconfig.so.1
    (gdb) bt
    #0 0x00007fffec8b9ba1 in ?? () from /usr/lib/libfontconfig.so.1
    #1 0x00007fffec8ba03f in ?? () from /usr/lib/libfontconfig.so.1
    #2 0x00007fffec8b9cd8 in ?? () from /usr/lib/libfontconfig.so.1
    #3 0x00007fffec8ba554 in ?? () from /usr/lib/libfontconfig.so.1
    #4 0x00007fffec8ba77d in FcConfigSubstituteWithPat ()
    from /usr/lib/libfontconfig.so.1
    #5 0x00007fffec8c85cc in FcFontRenderPrepare ()
    from /usr/lib/libfontconfig.so.1
    #6 0x00007ffff32d695e in QFontDatabase::load(QFontPrivate const*, int) ()
    from /usr/lib/libQtGui.so.4
    #7 0x00007ffff32b35e9 in QFontPrivate::engineForScript(int) const ()
    from /usr/lib/libQtGui.so.4
    #8 0x00007ffff32e9252 in QTextEngine::fontEngine(QScriptItem const&, QFixed*, QFixed*, QFixed*) const () from /usr/lib/libQtGui.so.4
    #9 0x00007ffff32e9a03 in QTextEngine::shapeTextWithHarfbuzz(int) const ()
    from /usr/lib/libQtGui.so.4
    #10 0x00007ffff32eab02 in QTextEngine::shapeText(int) const ()
    from /usr/lib/libQtGui.so.4
    #11 0x00007ffff32eae25 in QTextEngine::shape(int) const ()
    from /usr/lib/libQtGui.so.4
    #12 0x00007ffff32f0a30 in QTextEngine::boundingBox(int, int) const ()
    from /usr/lib/libQtGui.so.4
    #13 0x00007ffff32c79f4 in QFontMetrics::boundingRect(QString const&) const ()
    ---Type <return> to continue, or q <return> to quit---
    from /usr/lib/libQtGui.so.4
    #14 0x00007ffff34673dd in ?? () from /usr/lib/libQtGui.so.4
    #15 0x00007ffff3467534 in QComboBox::sizeHint() const ()
    from /usr/lib/libQtGui.so.4
    #16 0x00007ffff30ce65c in QWidgetItemV2::updateCacheIfNecessary() const ()
    from /usr/lib/libQtGui.so.4
    #17 0x00007ffff30ce96d in QWidgetItemV2::maximumSize() const ()
    from /usr/lib/libQtGui.so.4
    #18 0x00007ffff30b0b55 in ?? () from /usr/lib/libQtGui.so.4
    #19 0x00007ffff30b11d6 in QBoxLayout::sizeHint() const ()
    from /usr/lib/libQtGui.so.4
    #20 0x00007ffff30caca4 in QLayout::totalSizeHint() const ()
    from /usr/lib/libQtGui.so.4
    #21 0x00007ffff30dec30 in QWidget::sizeHint() const ()
    from /usr/lib/libQtGui.so.4
    #22 0x00007ffff30ce65c in QWidgetItemV2::updateCacheIfNecessary() const ()
    from /usr/lib/libQtGui.so.4
    #23 0x00007ffff30ce96d in QWidgetItemV2::maximumSize() const ()
    from /usr/lib/libQtGui.so.4
    #24 0x00007ffff30b0b55 in ?? () from /usr/lib/libQtGui.so.4
    #25 0x00007ffff30b1206 in QBoxLayout::minimumSize() const ()
    from /usr/lib/libQtGui.so.4
    #26 0x00007ffff30cac34 in QLayout::totalMinimumSize() const ()
    ---Type <return> to continue, or q <return> to quit---
    from /usr/lib/libQtGui.so.4
    #27 0x00007ffff30dec60 in QWidget::minimumSizeHint() const ()
    from /usr/lib/libQtGui.so.4
    #28 0x00007ffff30cc8c3 in qSmartMinSize(QWidget const*) ()
    from /usr/lib/libQtGui.so.4
    #29 0x00007ffff350e4b9 in ?? () from /usr/lib/libQtGui.so.4
    #30 0x00007ffff350e897 in QScrollArea::setWidget(QWidget*) ()
    from /usr/lib/libQtGui.so.4
    #31 0x0000000000765b18 in SettingsDialog::AddPage(SettingsDialog::Page, SettingsPage*, QTreeWidgetItem*) ()
    #32 0x0000000000765e67 in SettingsDialog::SettingsDialog(Application*, BackgroundStreams*, QWidget*) ()
    #33 0x0000000000745360 in MainWindow::OpenSettingsDialog() ()
    #34 0x000000000080c1ea in ?? ()
    #35 0x00007ffff6cd7b48 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
    #36 0x00007ffff309cf82 in QAction::triggered(bool) ()
    from /usr/lib/libQtGui.so.4
    #37 0x00007ffff309e953 in QAction::activate(QAction::ActionEvent) ()
    from /usr/lib/libQtGui.so.4
    #38 0x00007ffff34c7d79 in ?? () from /usr/lib/libQtGui.so.4
    #39 0x00007ffff34cc2a9 in ?? () from /usr/lib/libQtGui.so.4
    #40 0x00007ffff30f262e in QWidget::event(QEvent*) ()
    ---Type <return> to continue, or q <return> to quit---
    from /usr/lib/libQtGui.so.4
    #41 0x00007ffff34d007b in QMenu::event(QEvent*) () from /usr/lib/libQtGui.so.4
    #42 0x00007ffff30a30dc in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib/libQtGui.so.4
    #43 0x00007ffff30a97dd in QApplication::notify(QObject*, QEvent*) ()
    from /usr/lib/libQtGui.so.4
    #44 0x00007ffff6cc3ebd in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib/libQtCore.so.4
    #45 0x00007ffff30a8f93 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
    from /usr/lib/libQtGui.so.4
    #46 0x00007ffff311aedc in ?? () from /usr/lib/libQtGui.so.4
    #47 0x00007ffff311961c in QApplication::x11ProcessEvent(_XEvent*) ()
    from /usr/lib/libQtGui.so.4
    #48 0x00007ffff3140162 in ?? () from /usr/lib/libQtGui.so.4
    #49 0x00007ffff41b3296 in g_main_context_dispatch ()
    from /usr/lib/libglib-2.0.so.0
    #50 0x00007ffff41b35e8 in ?? () from /usr/lib/libglib-2.0.so.0
    #51 0x00007ffff41b368c in g_main_context_iteration ()
    from /usr/lib/libglib-2.0.so.0
    #52 0x00007ffff6cf0b25 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
    #53 0x00007ffff3140216 in ?? () from /usr/lib/libQtGui.so.4
    ---Type <return> to continue, or q <return> to quit---
    #54 0x00007ffff6cc2b1f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
    #55 0x00007ffff6cc2e15 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
    #56 0x00007ffff6cc7f4b in QCoreApplication::exec() ()
    from /usr/lib/libQtCore.so.4
    #57 0x00000000005db094 in main ()
    This happen every time. I searched on internet but I can't find similar issue.
    Thanks.
    Last edited by ryuzy (2014-02-06 11:30:13)

    I tried installing Infinality-bundle+fonts and it fixed the problem.
    So there was a problem with my fonts, I don't know why this happened but I'm happy to have solved.
    Last edited by ryuzy (2014-02-06 11:30:59)

  • Segmentation fault with apache plug-in

    The debug flag is on with apache.Getting the following message and core dump.wl 6.0, jdk 1.3, Solaris 2.6 105181-21, apache 1.3.12, gcc 2.8(FSF), make(3.7.6)os patch 10559-09 installed.[Fri Dec 29 14:57:11 2000] [notice] child pid 27661 exit signal Segmentation Fault (11), possible coredump in /usr/local/apache

    The debug flag is on with apache.Getting the following message and core dump.wl 6.0, jdk 1.3, Solaris 2.6 105181-21, apache 1.3.12, gcc 2.8(FSF), make(3.7.6)os patch 10559-09 installed.[Fri Dec 29 14:57:11 2000] [notice] child pid 27661 exit signal Segmentation Fault (11), possible coredump in /usr/local/apache

  • Help in getting started with java 3d

    Hi everyone,
    I am very new to java3d and I started learning it from few books and online tutorial.
    However, in my very first program that I trying to code, I get error when I try to import following:-
    import com.sun.j3d.utils.universe.SimpleUniverse;
    The compilation error that I am getting is that "com.sun.j3d cannot be resolved". I have already installed java 3d. I can see java3d package in the Program Files/java directory.
    Any suggestions would be greatly appreciated.
    Thanks!

    On the instalation you have to use the default location, or the location where your SDK is installed.
    Also, check if the CLASSPATH is defined correctly in your Environment Variables for JAVA_HOME and PATH.
    You can also try to define the Java 3D jar files in you classpath before you try to run your file. Or can also try to use an IDE like NetBeans or Eclipse, it will help you a lot with your import declarations.

  • Segmentation fault with mod_wl_22.so and Apache 2.2.3

    Hi,
    Every few requests, the proxy plugin seg faults.
    The following backtrace is logged:
    [Sun Sep 26 06:26:16 2010] [notice] child pid 28254 exit signal Segmentation fault (11)
    *** glibc detected *** /usr/sbin/httpd: free(): invalid pointer: 0x00002b285a9882f0 ***
    ======= Backtrace: =========
    /lib64/libc.so.6[0x2b2853f3230f]
    /lib64/libc.so.6(cfree+0x4b)[0x2b2853f3276b]
    /etc/httpd/modules/mod_wl_22.so(_tmf90043+0x2f)[0x2b285d4f9954]
    /etc/httpd/modules/mod_wl_22.so(_tmf90047+0x51)[0x2b285d4e0c2c]
    /etc/httpd/modules/mod_wl_22.so(_tmf90487+0xa3)[0x2b285d4e062d]
    /etc/httpd/modules/mod_wl_22.so(_ZN3URL5closeEv+0x69)[0x2b285d49d353]
    /etc/httpd/modules/mod_wl_22.so(_Z19getPooledConnectionP8ListNodePKctiiP10LogContext+0x1c2)[0x2b285d498ff2]
    /etc/httpd/modules/mod_wl_22.so[0x2b285d490ee4]
    /etc/httpd/modules/mod_wl_22.so(request_handler+0x10b0)[0x2b285d493018]
    /usr/sbin/httpd(ap_run_handler+0x7a)[0x2b2851fc5a4a]
    /usr/sbin/httpd(ap_invoke_handler+0x78)[0x2b2851fc8ed8]
    /usr/sbin/httpd(ap_process_request+0x1a8)[0x2b2851fd3978]
    /usr/sbin/httpd[0x2b2851fd0bb0]
    /usr/sbin/httpd(ap_run_process_connection+0x72)[0x2b2851fcccd2]
    /usr/sbin/httpd[0x2b2851fd77c9]
    /usr/sbin/httpd[0x2b2851fd7a5a]
    /usr/sbin/httpd[0x2b2851fd7b10]
    /usr/sbin/httpd(ap_mpm_run+0xccb)[0x2b2851fd87fb]
    /usr/sbin/httpd(main+0x7e8)[0x2b2851fb2e48]
    /lib64/libc.so.6(__libc_start_main+0xf4)[0x2b2853edd994]
    /usr/sbin/httpd[0x2b2851fb2199]
    I am using the following plugin version:
    Oracle WebLogic plugin build date/time: Apr 20 2009 15:29:36. Change Number: 1211636
    The OS is a stock RHEL 5.4 (64 bit)
    Any ideas?

    I've tried to upgrade to plugin version 1.1, but now it refuses to use SSL between the proxy and the weblogic server.
    All I get from the logs is the following:
    Sun Sep 26 12:03:32 2010 <2450512854954051> mod_weblogic(ssl): Connection mod_wl SSL handshake failed (29024)
    Sun Sep 26 12:03:32 2010 <2450512854954051> mod_weblogic(ssl): SSL Handshake failed
    I've created a wallet, and imported my certificate to it as a trusted certificate.
    It should be noted that I have a wildcard certificate, and the previous plugin version did not support it - I had to use
    RequireSSLHostMatch false
    EnforceBasicConstraints false
    for it to work. These options are no longer supported in 1.1 - Why?

  • Help needed for JDBC with RMI plz reply

    Dear fellows
    i have a problem which is making me circle in hell :( i mean i m trying to get strings from a database class which connects and returns the data as a string to the RMI server mthod, and then the client can call on this to get that String passed on to it for processing.
    when wever i run it it gives me error
    Exception : com.mysql.jdbc.Driver
    when i run that database class alone it runs fine, but when i call it from RMI server method it gives exception?
    can anybody help?
    code is
    Database.java
    import java.sql.*;
    import java.io.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.Driver;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import java.sql.ResultSetMetaData;
    import java.net.InetAddress;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class DatabaseConn {
    String s;
    String roomno;
    DatabaseConn(String roomno){
    //super();
    this.roomno= roomno;
    connect(roomno);
    public String connect(String roomno) {
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    con = DriverManager.getConnection("jdbc:mysql:///pais",
    "koitohay", "ayesha79");
    }catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    try{
    String qs = "SELECT * FROM room where roomid='"+roomno+"'";
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery( qs );
    while (rs.next()) {
    String s1 = rs.getString("roomId");
    int i = rs.getInt("floorId");
    s = rs.getString("Location");
    System.out.println("Location:"+s);
    if(!con.isClosed())
    System.out.println("Successfully connected to " +
    "MySQL server using TCP/IP...");
    }catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}
    return s;
    /*public static void main(String args[]) {
    DatabaseConn rmm= new DatabaseConn("3.15");
    RMI Server
    import java.rmi.*;
    import java.rmi.server.*;
    import java.rmi.*;
    import java.rmi.server.*;
    import java.rmi.registry.LocateRegistry;
    import java.util.*;
    import java.util.Vector;
    import java.sql.*;
    import java.io.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.Driver;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import java.sql.ResultSetMetaData;
    import java.net.InetAddress;
    //import compute.*;
    public class PAISServer extends UnicastRemoteObject
    implements PAIS
    LOCPAIS Loc;
    PositionVal pos;
    String str, CLIENT_IP;
    private static String X,Y,Floor,Room;
    String room;
    JdbcExample2 coon;
    DatabaseConn con;
    public PAISServer() throws RemoteException {
    super();
    public String getPosition(String CLIENT_IP){
    //this.CLIENT_IP = CLIENT_IP;
    LOCPAIS Loc = new LOCPAIS(CLIENT_IP);
    System.out.println("****"+Loc);
    String str = Loc.getLocation();
    //int str2= Loc.getX();
    System.out.println("hi"+str);
    return str; //the original code is here
    //PositionObject pos = new PositionObject("fdf","gdf","rdgdf","fdf") ;
    // process string
    /* pos.X = "10";
    pos.Y = "20";*/
    //return posString;
    //PositionObject str =Loc.getLocation();
    //System.out.println("****"+str);
    //PositionObject posi= (PositionObject)(Loc.getLocation());
    //System.out.println("****"+posi);
    // return str;
    /* Loc.gosietX();
    Loc.getY();
    Loc.getFloor()
    //Tokenize(Loc);
    //return Loc;
    public String getData( String roomno ) {
    try{
    DatabaseConn con= new DatabaseConn(roomno);
    String room= con.connect(Room);
    System.out.println("Data:"+room);
    }catch(Exception e) {
    System.err.println("Exception for: " + e.getMessage());
    return room;

    Hi
    If you start rmiregistry on the side don't include the JDBC driver to the classpath, use CODEBASE when you start the server.
    But again, please give more info.... how you start, how you compile... more traces... etc

  • Need help, I am terrible with Java, can someone help.

    Please can someone help me with this program. I am in a JAVA programming class and I am having a heck of a time. I am still having a problem with the basic concepts of JAVA but the teacher continues to give us difficult assignments with out any help. Here is the assignment:
    Write a class named 'Player' that has two attributes, 'name' (which has to be a 'Sting') and 'rating' (which has to be a 'int'). Then write an application class named "PlayerRating" that first creates an array consisting of 5 player objects, then display the list three times; first unsorted, then sorted by Name and finally sorted by rating.
    Must use the Bubble Sort Program and do NOT use Array.sort.
    Example output:
    Unsorted
    Name: Rating:
    Mickey Mantle 5
    Ty Cobb 3
    Babe Ruth 4
    Pete Rose 3
    Sammy Sosa 1
    Sorted by Name
    Name: Rating:
    Babe Ruth 4
    Mickey Mantle 5
    Pete Rose 3
    Sammy Sosa 1
    Ty Cobb 3
    Sorted by Rating
    Name: Rating:
    Sammy Sosa 1
    Pete Rose 3
    Ty Cobb 3
    Babe Ruth 4
    Mickey Mantle 5
    Here is what I have and it is not much, cause I am so lost:
    1 import java.io.*;
    2 import javax.swing.*;
    3 import java.text.*;
    4 import java.lang.*;//String[][];
    5 import java.util.*; //ArrayList;
    6
    7
    8 public class Player
    9 {
    10 public static void main (String [][]args)
    11 {
    12
    13 int maxSize = 100; //array size
    14 // String[][] s = new String[100][100]; //Default values: null
    15 boolean [] b = new boolean[4]; //default values: false
    16 int[][] i = new int[10][10]; //default values: 0
    17
    18
    19 PlayerRating arr; //reference to array
    20 //arr = new PlayerRating(maxSize);
    21 Sting player[]={"Mickey Mantle 5","Ty Cobb 3"
    22 ,"Babe Ruth 4","Pete Rose 3","Sammy Sosa 1"};
    23
    24
    25 }
    26 }
    Here is all I have on the second program:
    public class PlayerRating
    public void PlayerRating (int Max)
    int[][] i = new int[10][10];
    Please help I am totally lost.

    You repeat code, you should do a generic bubble sort with comparators, or declare class as Comparable. You can see how String class is Comparable, furthermore it has a final static Comparator for CASE_INTENSENSITIVE_ORDER.
    class User implements Comparable<User>{
      public static final java.util.Comparator<Cliente> RATING_COMPARATION=new java.util.Comparator<Cliente>(){
        public int compare(User u1,User u2){
               int comp=u1.rating-u2.rating;
               return comp==0?u1.name.compareTo(u2.name):comp;
         private String name;
         private int rating;
         public User(String name, int rating){
              setName(name);
              setRating(rating);
         public String getName(){
              return name;
         public void setName(String name){
              this.name = name;
         public int getRating(){
              return rating;
         public void setRating(int rating){
              this.rating = rating;
            // Compare users first by name and last by rating;
            public int compareTo(User anotherUser){
               int comp=name.compareTo(anotherUser.name);
               return comp==0?rating-anotherUser.rating:comp;
             public void equals(Object o){
              if(this==o)
                return true;
              if(o instanceof User){}
                 User anotherUser=(User)o;
                 return name.equals(anotherUser.name)&&rating==anotherUser.rating;
              return false;
               public int hashCode(){
                  return name.hashCode()+rating<<16;
    public class Sorting{
         public <E extends Comparable<E>>static void bubleSort(E[] arr){
              for(int i = 0; i < arr.length - 1; i++){
                   for(int j = arr.length - 1; j > i; j--){
                        if(arr[j].compareTo(arr[j - 1])<0)
                                     swap(arr,j,j-1);
         public static<E> void bubleSort(E[] arr,Comparator<E> cmp){
              for(int i = 0; i < arr.length - 1; i++){
                   for(int j = arr.length - 1; j > i; j--){
                        if(cmp.compare(arr[j],arr[j-1]) < 0)
                                      swap(arr,j,j-1);
            private static void swap(Object[] arr,int x,int y){
               Object tmp=arr[x];
               arr[x]=arr[y];
               arr[y]=tmp;
         public static void main(String[] args){
              User[] arr = new User[5];
              arr[0] = new User("Mickey Mantle", 5);
              arr[1] = new User("Ty Cobb", 3);
              arr[2] = new User("Babe Ruth", 4);
              arr[3] = new User("Pete Rose", 3);
              arr[4] = new User("Sammy Sosa", 1);
              System.out.println("Sorting by Name : ");
              bubleSort(arr)
              System.out.println(Arrays.toString(arr));
              System.out.println("Sorting by Rating : ");
              bubleSort(arr,User.RATING_COMPARATION);
              System.out.println(Arrays.toString(arr));
    }

  • Help needed for Time Calc Java Script

    Hi,
    I am trying to create a timesheet in PDF and have hit a speed bump. Is there anyone there who could provide me with a script that calculated the difference between 2 times? (Field2 time)-(Feild 1 Time) = Duration.I am desperate and have tried everything.
    I proccess the payroll for a company and all of the 500 or so timesheets that I received each fortnight are paper copies and I am pulling my hair out. I need to use Adobe forms (We have Adobe Pro 9 and I am using the XML forms, not live cycle) as the serach engine that we use for emails cannot search on excel documents.
    I have no Java script experience and I am getting completely lost in the subject. Any help would be greatly appreciated.
    Thanks anyone who can help at all.
    -Sohnia

    hi friend here example for time calulation start and end time example..<br />just copy and paste then run it ur browser.<br /><br /><HTML><br /><script language="JavaScript"><br /><!--<br /><br />var h1 = 1;<br />var h2 = 2;<br />var days = 0;<br />var m1 = 1;<br />var m2 = 2;<br />var am1 = 1;<br />var am2 = 2;<br />function findtime(h1,h2,days,m1,m2,am1,am2)<br />{<br />var answer = "why";<br />var mdiff = 1;<br />var hdiff = 2;<br />pdays = parseInt(days);<br />ph1 = parseInt(h1);<br />ph2 = parseInt(h2);<br />pm1 = parseInt(m1);<br />pm2 = parseInt(m2);<br />if(am1 == 2 & ph1 < 12) ph1 = ph1 + 12;<br />if(am2 == 2 & ph2 < 12) ph2 = ph2 + 12;<br />if(am1 == 1 & ph1 == 12) ph1 = 24;<br />if(am2 == 1 & ph2 == 12) ph2 = 24;<br />if(am1 == 2 & am2 == 1 & ph2 < 24) ph2 = ph2 + 24;<br />if(am1 == am2 & ph1 > ph2) ph2 = ph2 + 24;<br />if(pm2 < pm1){<br />pm2 = pm2 + 60;<br />ph2 = ph2 - 1;<br />}<br />mdiff = pm2 - pm1;<br />hdiff = (ph2 - ph1) + (pdays * 24);<br />if(hdiff == 0) answer = mdiff + ' minutes';<br />else if(hdiff == 1) answer = '1 hour and ' + mdiff + ' minutes'<br />else answer = hdiff + ' hours and ' + mdiff + ' minutes'<br />return answer<br />}<br /><br />//--><br /></script><br /></HEAD><br /><br /><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><br /><BODY BGCOLOR=FFFFFF TEXT=000000 LINK=0000FF VLINK=800080><br /><br /><div align="center"><table width="950" border="0" cellpadding="0" bgcolor="#899194" cellspacing="0"><br /><br />  <br /><tr><td valign="middle" width="33%"><br /><br /><center><br /><form><br /><TD WIDTH=80%><br /><center><br /><TABLE ALIGN=MIDDLE BORDER=5 CELLPADDING=5><br /><TR BGCOLOR=#FFFFFF><br /><!--ROW 1--><br /><TD WIDTH=80%><br /><center><br /><TABLE ALIGN=MIDDLE BORDER=5 CELLPADDING=5><br /><TR BGCOLOR="#B6D4D2"><br /><!--ROW 1--><br /><td colspan=4><br /><center>Time Between Times Calculations - Multiple Days</center><br /><br /></td><br /></tr><br /><TR BGCOLOR="#B6D4D2"><br /><TD align="center" colspan=4><br />Required Data Entry<br /></td><br /></tr><br /><tr><br /><td align="center">Start / End</td><br /><td align="center">Hour</td><br /><td align="center">Minute</td><br /><td align="center">AM / PM</td><br /></tr><br /><br /><td align="center">Start time</td><br /><td align="center"><input type="text" name="hour1" size="5"></td><br /><td align="center"><input type="text" name="minute1" size="5"></td><br /><td align="center"><select name="period1"><br /><option value="1">AM<br /><option value="2">PM<br /></select><br /></td><br /></tr><br /><tr><br /><td colspan="3">    Add Complete Interim Days</td><td align="center"><input type="text" name="adays" size="5" value="0"></td><br /></tr><br /><tr><br /><td align="center">Start / End</td><br /><br /><td align="center">Hour</td><br /><td align="center">Minute</td><br /><td align="center">AM / PM</td><br /></tr><br /><td align="center">End time</td><br /><td align="center"><input type="text" name="hour2" size="5"></td><br /><td align="center"><input type="text" name="minute2" size="5"></td><br /><td align="center"><select name="period2"><br /><option value="1">AM<br /><option value="2">PM<br /></select><br /></td><br /></tr><br /><br /><tr><br /><td align="center" colspan=4 BGCOLOR="#B6D4D2"><br /><input type="button" value="Calculate" <br />onclick="h1=form.hour1.value;<br />h2=form.hour2.value;<br />m1=form.minute1.value;<br />m2=form.minute2.value;<br />days=form.adays.value;<br />am1=form.period1.options[period1.selectedIndex].value;<br />am2=form.period2.options[period2.selectedIndex].value;<br />if(h1 < 0 | h1 > 12) alert('Your start hour is not valid');<br />else if(h2 < 0 | h2 > 12) alert('Your end hour is not valid');<br />else if(m1 < 0 | m1 > 59) alert('Your start minute is not valid');<br />else if(m2 < 0 | m2 > 59) alert('Your end minute is not valid');<br />else form.answer.value=findtime(h1,h2,days,m1,m2,am1,am2);"><br />   <br /><input type="reset" value="Clear Values"><br /><br /></td><br /></tr><br /><TR BGCOLOR="#B6D4D2"><br /><TD align="center" colspan=4><br />Calculated Results<br /></td><br /></tr><br /><br /><tr><br /><td align="center" colspan="4"><br />Time Difference <input type="text" name="answer" size="40"><br /><tr><td>[email protected]</td></tr><br /></td><br /></tr><br /></table><br /></form><br /></td><br /></tr><br /></table><br /><br /></center><br /></td><br /></tr><br /></table><br /></center><br /><br /></TD><br /></TR><br /></TABLE><br /></BODY> <br /></HTML>

  • Help needed please.. with JPG file

    Hi all,
    I am a Forms developer that DOES NOT use Jdeveloper so go easy on me!
    I have with the help of this forum amended the Java Bean Forms graph to create a JPG from the Graph bean. Our original problem was the need to print the graphs that were displayed, the forum very helpfully guided me through creating a JPG and i used Forms to open this and therefore user can then print it.
    I have used the following:
    File f = new File((String) _object,"img.gif");
    FileOutputStream fos = new FileOutputStream(f);
    m_graph.exportToGIF(fos);
    I then use Forms to Pass the clients temp location and save the file to the local PC temp location as img.gif.
    Unforunately this came up with user rights problems and in order to make this work we needed to sign the certificate. BUT by signing the certificate it meant EVERY one of our customers has to approve the changes once we give them the new JAR. Unforunately we use (as per Oracle Certification) JRE 1.4.2_13 and when the customers go to approve the changes it crashes JAVA (if they have previousely used the system). The only way to get round this (that we have found) is to clear all signitures and clear cache on the JRE. This is something that our customers will not accept doing.
    I posted that initial JRE problem but not had any comeback so my next question is. Is there a way to do what we need to do without the need of signing the JAR?
    The graph pre these changes did not need the approvals. So im assuming its the fact we want to place something on the Client PC is what is requiring the approval. Can we do what were doing but place the JPG on the Server and use something like webutil to get the file over. Meaning we dont need to use a different JAR?
    Any help would be most appreciated

    Hi,
    I cannot help you much on the issue, but I can confirm some of your thought. Signing is indeed required because you're trying to access the user's PC, which is a potential security breach hence why Java requires that the user agrees to it when the application goes out of the normal sandbox. You can check out http://www.securingjava.com/chapter-two/ as an introduction on the subject.
    I don't really get your use case though, you simply want to print the generated gif file right, so why do you write it on the user's hard drive?
    Regards,
    ~ Simon

Maybe you are looking for