*** glibc detected *** corrupted double-linked list: 0x004ec848 ***
hi,
I am using Berkeley DB database and facing a problem while retrieving records. After building database i'm retrieving records from that database.After retrieving some records it gives the error as
*** glibc detected *** corrupted double-linked list: 0x004ec848 *** Aborted. What can i do solve this problem.
Thank you,
ravi
Hi Ravi,
Have you googled for the error message? What are the results?
A good thing to do is to provide me a test program and more details about your operating system environment. Also, try to update your glibc version.
Regards,
Bogdan Coman
Similar Messages
-
users are getting this error
{noformat}*** glibc detected *** corrupted double-linked list: 0x0027f878 ***{noformat}{noformat} {noformat}
what could the issue for above error,
in concurrent reqest out put,
Apps:12i
os: LinuxSawwan,
Request language is :
AMERICAN
Request territory is :
AMERICA
Previous NLS_LANG Environment Variable was :
AMERICAN_AMERICA.WE8ISO8859P15
Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
AMERICAN_AMERICA.WE8ISO8859P15
stat_low = 6
stat_high = 0
emsg:was terminated by signal 6
Enter Password:
*** glibc detected *** corrupted double-linked list: 0x0027f878 ***
Report Builder: Release 10.1.2.0.2 - Production on Wed Mar 18 09:02:51 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Start of log messages from FND_FILE
End of log messages from FND_FILE
Reset original NLS_LANG in environment as :
AMERICAN_AMERICA.WE8ISO8859P15
Program was terminated by signal 6
Concurrent Manager encountered an error while running Oracle*Report for your concurrent request xxxxxxx -
Hai,
i got this message at command prompt.
o/s version : rhel es 4.0
what was this error. i was running oracle applications on this operating system.
please advice meHai,
.......It seems like it iscaused by some programming error.
hat commands/programs were you executing when seeing
this error?
at os level or ??????????/////...
What commands/programs were you executing when seeing this error? -
I have been upgrading wine and I keep running into problems running Guildwars. Every time I upgrade wine to a newer version using pacman the program will not work correctly and freezes. So I have to downgrade to wine 1.1.20. When I run wine thru terminal I get
*** glibc detected *** c:\Program Files\Guild Wars\Gw.exe: corrupted double-linked list: 0x7d4bc4f8 ***
======= Backtrace: =========
/lib/libc.so.6(+0x6b6c1)[0xb75dc6c1]
/lib/libc.so.6(+0x6d003)[0xb75de003]
/lib/libc.so.6(cfree+0x6d)[0xb75e0f8d]
/usr/lib/libGLcore.so.1(+0x5964af)[0xb6b8d4af]
[0x200000]
/usr/lib/libGLcore.so.1(+0x5ed980)[0xb6be4980]
[0x138808b]
I think this is because somehow libc.so.6 and libGlcore.so.1 is double linked. If so how do I find where they are linked to and how do I get rid of the wrong link. I can only find one /lib/libc.so.6 and only one /usr/lib/libGLcore.so.1 so there are not two of each. Am I going in the right direction?That error does not mean a link as in a symbolic link, but as in a data structure in the code. See http://en.wikipedia.org/wiki/Linked_list for the idea. The trace is saying that somewhere in libGLcore, there is a linked list which is being corrupted somehow. This is an error inside the code, and not with your filesystem, so that would not be a way to fix it. Check out the wine app database at http://appdb.winehq.org/ to see if anyone has had your problem.
-
I am trying to run a program called XMLCopyEditor and I keep getting this in the terminal:
*** glibc detected *** xmlcopyeditor: double free or corruption (out): 0x086646e8 ***
======= Backtrace: =========
/lib/libc.so.6(+0x6b6c1)[0xb67186c1]
/lib/libc.so.6(+0x6cf18)[0xb6719f18]
/lib/libc.so.6(cfree+0x6d)[0xb671cf8d]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb690a901]
xmlcopyeditor(_ZN11xercesc_3_013XSerializableD0Ev+0x23)[0x809cfcd]
/usr/lib/libxerces-c-3.0.so(_ZN11xercesc_3_014RefHashTableOfINS_7GrammarENS_12StringHasherEED1Ev+0x54)[0xb6ac8b94]
/usr/lib/libxerces-c-3.0.so(_ZN11xercesc_3_015GrammarResolverD1Ev+0x2c)[0xb6b5bc2c]
/usr/lib/libxerces-c-3.0.so(_ZN11xercesc_3_017AbstractDOMParser7cleanUpEv+0x62)[0xb6b3c232]
/usr/lib/libxerces-c-3.0.so(_ZN11xercesc_3_017AbstractDOMParserD2Ev+0x4c)[0xb6b3c5ec]
/usr/lib/libxerces-c-3.0.so(_ZN11xercesc_3_015XercesDOMParserD0Ev+0x50)[0xb6b4ee90]
xmlcopyeditor[0x80d812a]
xmlcopyeditor[0x80d657a]
/usr/lib/libexpat.so.1(+0x8c5b)[0xb6e7dc5b]
/usr/lib/libexpat.so.1(+0x9c81)[0xb6e7ec81]
/usr/lib/libexpat.so.1(+0xb65f)[0xb6e8065f]
/usr/lib/libexpat.so.1(+0xbd47)[0xb6e80d47]
/usr/lib/libexpat.so.1(XML_ParseBuffer+0x7c)[0xb6e7772c]
/usr/lib/libexpat.so.1(XML_Parse+0xd3)[0xb6e78be3]
xmlcopyeditor[0x80dd923]
xmlcopyeditor[0x80cb7c6]
xmlcopyeditor[0x8081f43]
xmlcopyeditor[0x809648b]
xmlcopyeditor[0x806e8fc]
xmlcopyeditor[0x806539a]
xmlcopyeditor(_ZN12wxAppConsole10CallOnInitEv+0x18)[0x809a3f6]
/usr/lib/libwx_baseu-2.8.so.0(_Z7wxEntryRiPPw+0x40)[0xb6f1b950]
/usr/lib/libwx_baseu-2.8.so.0(_Z7wxEntryRiPPc+0x37)[0xb6f1bb57]
xmlcopyeditor[0x8063ce7]
/lib/libc.so.6(__libc_start_main+0xe6)[0xb66c3b86]
xmlcopyeditor[0x8063bc1]
======= Memory map: ========
08048000-0814a000 r-xp 00000000 08:02 1060710 /usr/local/bin/xmlcopyeditor
0814a000-0814c000 rwxp 00101000 08:02 1060710 /usr/local/bin/xmlcopyeditor
0814c000-08154000 rwxp 00000000 00:00 0
08409000-08673000 rwxp 00000000 00:00 0 [heap]
b4b00000-b4b21000 rwxp 00000000 00:00 0
b4b21000-b4c00000 ---p 00000000 00:00 0
b4c16000-b4c18000 r-xp 00000000 08:02 788505 /usr/lib/gconv/UTF-16.so
b4c18000-b4c19000 r-xp 00001000 08:02 788505 /usr/lib/gconv/UTF-16.so
b4c19000-b4c1a000 rwxp 00002000 08:02 788505 /usr/lib/gconv/UTF-16.so
b4c1a000-b4c26000 r-xp 00000000 08:02 1192136 /usr/share/fonts/TTF/VeraMoBd.ttf
b4c26000-b4c35000 r-xp 00000000 08:02 1192133 /usr/share/fonts/TTF/VeraBd.ttf
b4c35000-b4c42000 r-xp 00000000 08:02 1192141 /usr/share/fonts/TTF/VeraMono.ttf
b4c42000-b4c53000 r-xp 00000000 08:02 1192140 /usr/share/fonts/TTF/Vera.ttf
b4c53000-b4c93000 r-xs 00000000 08:02 4564 /var/cache/fontconfig/17090aa38d5c6f09fb8c5c354938f1d7-x86.cache-2
b4c93000-b4c9e000 r-xp 00000000 08:02 395 /lib/libudev.so.0.5.0
b4c9e000-b4c9f000 rwxp 0000b000 08:02 395 /lib/libudev.so.0.5.0
b4c9f000-b4cb2000 r-xp 00000000 08:02 829351 /usr/lib/libgvfscommon.so.0.0.0
b4cb2000-b4cb3000 rwxp 00012000 08:02 829351 /usr/lib/libgvfscommon.so.0.0.0
b4cb3000-b4cd6000 r-xp 00000000 08:02 829375 /usr/lib/gio/modules/libgvfsdbus.so
b4cd6000-b4cd7000 rwxp 00022000 08:02 829375 /usr/lib/gio/modules/libgvfsdbus.so
b4cdb000-b4ceb000 r-xs 00000000 08:02 4108 /var/cache/fontconfig/8d4af663993b81a124ee82e610bb31f9-x86.cache-2
b4ceb000-b4d06000 r-xs 00000000 08:02 4565 /var/cache/fontconfig/f6b893a7224233d96cb72fd88691c0b4-x86.cache-2
b4d06000-b4d46000 r-xs 00000000 08:02 4556 /var/cache/fontconfig/df311e82a1a24c41a75c2c930223552e-x86.cache-2
b4d46000-b4d5e000 r-xs 00000000 08:02 813375 /usr/share/mime/mime.cache
b4d5e000-b4fc4000 r-xp 00000000 08:02 974778 /usr/share/icons/hicolor/icon-theme.cache
b4fc4000-b5604000 r-xp 00000000 08:02 938009 /usr/share/icons/gnome/icon-theme.cache
b5604000-b5664000 rwxs 00000000 00:08 2195476 /SYSV00000000 (deleted)
b5664000-b5679000 r-xp 00000000 08:02 825928 /usr/lib/libart_lgpl_2.so.2.3.20
b5679000-b567a000 rwxp 00014000 08:02 825928 /usr/lib/libart_lgpl_2.so.2.3.20
b567a000-b56e1000 r-xp 00000000 08:02 812119 /usr/lib/libgnomeprint-2-2.so.0.1.0
b56e1000-b56e3000 rwxp 00067000 08:02 812119 /usr/lib/libgnomeprint-2-2.so.0.1.0
b56e3000-b57e4000 rwxp 00000000 00:00 0
b57e4000-b57f7000 r-xp 00000000 08:02 829680 /usr/lib/libelf-0.8.12.so
b57f7000-b57f8000 rwxp 00012000 08:02 829680 /usr/lib/libelf-0.8.12.so
b57fd000-b5803000 r-xs 00000000 08:02 3566 /var/cache/fontconfig/d62e99ef547d1d24cdb1bd22ec1a2976-x86.cache-2
b5803000-b5813000 r-xp 00000000 08:02 829374 /usr/lib/gio/modules/libgioremote-volume-monitor.so
b5813000-b5814000 rwxp 00010000 08:02 829374 /usr/lib/gio/modules/libgioremote-volume-monitor.so
b5814000-b5864000 r-xp 00000000 08:02 829731 /usr/lib/bug-buddy/libbreakpad.so.0.0.0
b5864000-b5865000 rwxp 0004f000 08:02 829731 /usr/lib/bug-buddy/libbreakpad.so.0.0.0
b5865000-b5885000 r-xp 00000000 08:02 852930 /usr/lib/gtk-2.0/2.10.0/engines/libmurrine.so
b5885000-b5886000 rwxp 00020000 08:02 852930 /usr/lib/gtk-2.0/2.10.0/engines/libmurrine.so
b5886000-b588d000 r-xp 00000000 08:02 802310 /usr/lib/libltdl.so.7.2.0
b588d000-b588e000 rwxp 00007000 08:02 802310 /usr/lib/libltdl.so.7.2.0
b588e000-b589a000 r-xp 00000000 08:02 826000 /usr/lib/libtdb.so.1.1.3
b589a000-b589b000 rwxp 0000b000 08:02 826000 /usr/lib/libtdb.so.1.1.3
b589b000-b58c2000 r-xp 00000000 08:02 824194 /usr/lib/libvorbis.so.0.4.3
b58c2000-b58c3000 rwxp 00027000 08:02 824194 /usr/lib/libvorbis.so.0.4.3
b58c3000-b5a74000 r-xp 00000000 08:02 816237 /usr/lib/locale/locale-archive
b5a74000-b5aab000 r-xp 00000000 08:02 817362 /usr/lib/libdbus-1.so.3.4.0
b5aab000-b5aac000 r-xp 00036000 08:02 817362 /usr/lib/libdbus-1.so.3.4.0
b5aac000-b5aad000 rwxp 00037000 08:02 817362 /usr/lib/libdbus-1.so.3.4.0
b5aad000-b5ac9000 r-xp 00000000 08:02 800217 /usr/lib/libdbus-glib-1.so.2.1.0
b5ac9000-b5aca000 rwxp 0001b000 08:02 800217 /usr/lib/libdbus-glib-1.so.2.1.0
b5aca000-b5ad0000 r-xp 00000000 08:02 823101 /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so
b5ad0000-b5ad1000 rwxp 00005000 08:02 823101 /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so
b5ad1000-b5ad3000 r-xp 00000000 08:02 93 /lib/libutil-2.11.so
b5ad3000-b5ad4000 r-xp 00001000 08:02 93 /lib/libutil-2.11.so
b5ad4000-b5ad5000 rwxp 00002000 08:02 93 /lib/libutil-2.11.so
b5ad5000-b5ad8000 rwxs 00000000 00:08 2162707 /SYSV00000000 (deleted)
b5ad8000-b5ae5000 r-xp 00000000 08:02 829734 /usr/lib/gtk-2.0/modules/libgnomebreakpad.so
b5ae5000-b5ae6000 rwxp 0000d000 08:02 829734 /usr/lib/gtk-2.0/modules/libgnomebreakpad.so
b5ae6000-b5b27000 r-xp 00000000 08:02 823514 /usr/lib/libhunspell-1.2.so.0.0.0
b5b27000-b5b2b000 rwxp 00041000 08:02 823514 /usr/lib/libhunspell-1.2.so.0.0.0
b5b2d000-b5b34000 r-xp 00000000 08:02 824196 /usr/lib/libvorbisfile.so.3.3.2
b5b34000-b5b35000 rwxp 00006000 08:02 824196 /usr/lib/libvorbisfile.so.3.3.2
b5b35000-b5b43000 r-xp 00000000 08:02 827110 /usr/lib/libcanberra.so.0.2.1
b5b43000-b5b44000 rwxp 0000d000 08:02 827110 /usr/lib/libcanberra.so.0.2.1
b5b44000-b5b46000 r-xp 00000000 08:02 927712 /usr/lib/enchant/libenchant_zemberek.so
b5b46000-b5b47000 rwxp 00001000 08:02 927712 /usr/lib/enchant/libenchant_zemberek.so
b5b47000-b5bdd000 r-xp 00000000 08:02 811888 /usr/lib/libaspell.so.15.1.4
b5bdd000-b5be1000 rwxp 00095000 08:02 811888 /usr/lib/libaspell.so.15.1.4
b5be1000-b5be5000 rwxp 00000000 00:00 0
b5be6000-b5beb000 r-xp 00000000 08:02 824190 /usr/lib/libogg.so.0.6.0
b5beb000-b5bec000 rwxp 00004000 08:02 824190 /usr/lib/libogg.so.0.6.0
b5bec000-b5bef000 r-xp 00000000 08:02 827105 /usr/lib/libcanberra-gtk.so.0.1.4
b5bef000-b5bf0000 rwxp 00003000 08:02 827105 /usr/lib/libcanberra-gtk.so.0.1.4
b5bf0000-b5bf4000 r-xp 00000000 08:02 827122 /usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so
From searching google, this errors comes from trying to free allocated memory that doesn't exist. This program worked before but I am not sure what would be different. There may be a bad upgrade. Anyways, I cannot make heads or tails of the backtrace and memory map. Anyone know where the offending library could be?
Thanks.Since this is happening with the same program then it probably does have something to do with the program or a library, however if you have recently changed the memory in your PC then it can also cause things like this to happen. In fact, adding a certain stick of ram to my PC was the only time I've ever seen a message like this appear
-
Revision: 18926
Revision: 18926
Author: [email protected]
Date: 2010-12-01 14:07:19 -0800 (Wed, 01 Dec 2010)
Log Message:
bug fix BLZ-570 Double linked list with lot of objects result in BlazeDS Error deserializing error : StackOverflowError
We put hard limit to the max object nest level to prevent StackOverFlowError. the default max object nest level is 1024 and it can be configured in the endpoint/serialziation section in service-config.xml.
This needs documentation.
Checkintests pass
Ticket Links:
http://bugs.adobe.com/jira/browse/BLZ-570
Modified Paths:
blazeds/trunk/modules/common/src/flex/messaging/errors.properties
blazeds/trunk/modules/core/src/flex/messaging/endpoints/AbstractEndpoint.java
blazeds/trunk/modules/core/src/flex/messaging/io/SerializationContext.java
blazeds/trunk/modules/core/src/flex/messaging/io/amf/Amf0Input.java
blazeds/trunk/modules/core/src/flex/messaging/io/amf/Amf3Input.java
blazeds/trunk/modules/core/src/flex/messaging/io/amf/AmfIO.java -
Revision: 20451
Revision: 20451
Author: [email protected]
Date: 2011-02-24 08:33:31 -0800 (Thu, 24 Feb 2011)
Log Message:
backporting bug fix BLZ-570/BLZ-620 Double linked list with lot of objects result in BlazeDS Error deserializing error : StackOverflowError We put hard limit to the max object nest level to prevent StackOverFlowError. the default max object nest level is 1024 and it can be configured in the endpoint/serialziation section in service-config.xml. This needs documentation. Checkintests pass
Ticket Links:
http://bugs.adobe.com/jira/browse/BLZ-570
http://bugs.adobe.com/jira/browse/BLZ-620
Modified Paths:
blazeds/branches/4.0.0_fixes/modules/common/src/flex/messaging/errors.properties
blazeds/branches/4.0.0_fixes/modules/core/src/flex/messaging/endpoints/AbstractEndpoint.j ava
blazeds/branches/4.0.0_fixes/modules/core/src/flex/messaging/io/SerializationContext.java
blazeds/branches/4.0.0_fixes/modules/core/src/flex/messaging/io/amf/Amf0Input.java
blazeds/branches/4.0.0_fixes/modules/core/src/flex/messaging/io/amf/Amf3Input.java
blazeds/branches/4.0.0_fixes/modules/core/src/flex/messaging/io/amf/AmfIO.javaDear Pallavi,
Very useful post!
I am looking for similar accelerators for
Software Inventory Accelerator
Hardware Inventory Accelerator
Interfaces Inventory
Customization Assessment Accelerator
Sizing Tool
Which helps us to come up with the relevant Bill of Matetials for every area mentioned above, and the ones which I dont know...
Request help on such accelerators... Any clues?
Any reply, help is highly appreciated.
Regards
Manish Madhav -
Revision: 20443
Revision: 20443
Author: [email protected]
Date: 2011-02-23 21:19:22 -0800 (Wed, 23 Feb 2011)
Log Message:
back porting bug fix BLZ-570/BLZ-620 Double linked list with lot of objects result in BlazeDS Error deserializing error : StackOverflowError We put hard limit to the max object nest level to prevent StackOverFlowError. the default max object nest level is 1024 and it can be configured in the endpoint/serialziation section in service-config.xml. This needs documentation. Checkintests pass
Ticket Links:
http://bugs.adobe.com/jira/browse/BLZ-570
http://bugs.adobe.com/jira/browse/BLZ-620
Modified Paths:
blazeds/branches/3.x/modules/common/src/java/flex/messaging/errors.properties
blazeds/branches/3.x/modules/core/src/java/flex/messaging/endpoints/AbstractEndpoint.java
blazeds/branches/3.x/modules/core/src/java/flex/messaging/io/SerializationContext.java
blazeds/branches/3.x/modules/core/src/java/flex/messaging/io/amf/Amf0Input.java
blazeds/branches/3.x/modules/core/src/java/flex/messaging/io/amf/Amf3Input.java
blazeds/branches/3.x/modules/core/src/java/flex/messaging/io/amf/AmfIO.java -
Search in Double link list in java
Can any body give me the code implementation for searching an element in double link list in java as soon as possible...
Can any body give me the code implementation for
searching an element in double link list in java as
soon as possible...Psuedo code...
current = head of list
found = null
while(current is not null)
if doesItMatch(current, target)
break
current = current->next
if (current is null) Out("no match")
else Out("found it") -
Implementing Double Linked Lists
I have been set a task creating a java class to implement the data cells of a double linked list, then improving on this class so that it will implemt the interface of a LinearList using a double linked list.
HELP?!?!?!?!i have implemented a small method.u can implement the remaining methods as u want. I have not tested the code. Just for idea i am giving it. try it.
public class Node{
Node leftNode;
Node rightNode;
int data;
public Node addNode(Node node,int data,int position){
Node originalCopy=node;
for(int i=0;i<position;i++){
Node tempNode=new Node();
tempNode.data=data;
tempNode.leftNode=node;
tempNode.rightNode=node.rightNode;
node=node.rightNode;
return originalCopy;
This class represents a Doubly linked list and it provides operations on it. -
Delphi Double Linked List to Java
Does a Delphi Double Linked List correspond to any data type in Java?
Thanks for your time,
NateLook at the documentationf for java.util.*, in particular the collections therein.
java.util.LinkedList is probably closest to what you want. -
Hi everyone,
I have some problems about Double Linked Lists which I can not overcome. When I execute the following codes, there is an exception occured that is called NullPointer Exception in inser method.
So how can I fix it ??
class DoublyLinkedNode {
// properties
DoublyLinkedNode nextNode;
DoublyLinkedNode previousNode;
int size;
int data;
// constructors
public DoublyLinkedNode(int data,DoublyLinkedNode nextNode, DoublyLinkedNode previousNode){
this.data = data;
this.nextNode = nextNode;
this.previousNode = previousNode;
size = 0;
// methods
public void setNext(DoublyLinkedNode next){
nextNode = next;
public void setPrevious(DoublyLinkedNode pre){
previousNode = pre;
public DoublyLinkedNode getNext(){
return nextNode;
public DoublyLinkedNode getPrevious(){
return previousNode;
public int getData(){
return data;
public void setData(int value){
data = value;
class DoubleLinkedList {
// properties
int size;
DoublyLinkedNode tail;
DoublyLinkedNode head;
String s = "";
// constructors
public DoubleLinkedList(){
head = null;
tail = null;
size = 0;
// methods
public boolean isEmpty(){
if(head == null)
return true;
else
return false;
public DoublyLinkedNode next(){
return head.getNext();
public DoublyLinkedNode previous(){
return head.getPrevious();
public void insert(int data){
head = new DoublyLinkedNode(data, head.getNext(),head.getPrevious());
size++;
public String toString(){
s += head.getData() + "";
head = head.getNext();
if(isEmpty())
return s;
else
return toString();
public static void main(String args[]){
DoubleLinkedList list = new DoubleLinkedList();
list.insert(111);
list.insert(21);
list.insert(311);
list.insert(41);
list.insert(51);
list.insert(16);
list.insert(117);
System.out.println(list.toString());
// for(int a = 0; a < 5; a++){
// list.previous();
}Again, I changed insert method which is now correct I think.
But now, toString cause only appear the last object on the console.
So how can I fix toString method ???
public void insert(int data){
DoublyLinkedNode pointer = head.getPrevious();
DoublyLinkedNode pointer2 = pointer.getNext();
head = new DoublyLinkedNode(data,pointer2, pointer );
} -
If the circular double linked list has only one item, will that item's next/previous node references point to itself?
Yeah, it would make sense. But I'm wondering if there's any standard?
It could also make sense for the references to simply be null. -
Hashing with double linked list....
Okay, everything compiles great but I'm getting a NullPointerException upon running the program.
'line' is a string from a file to let you know that much. 'firstnode', 'nownode', and 'lastnode' are pointers in my array linked list 'anArray'. I know clever names. lol But hey, my professor uses variable names like 'X' 'T' and 'G' all the time, confusing bastard. :-) Anywho... I put a note in the code so you can see where this exception is taking place. Any help is 100% welcomed and appreciated!
while( line != null )
int hashindex = hash(line, 20);
if(firstnode[hashindex] == null)
firstnode[hashindex] = nownode[hashindex] = lastnode[hashindex] = new ListNode( line );
else
nownode[hashindex] = new ListNode( line );
//This line is the exception, if I comment it out, the next line throws it
anArray[hashindex].CONS(nownode[hashindex], lastnode[hashindex]);
anArray[hashindex].LCONS(lastnode[hashindex], nownode[hashindex]);
//If I comment out the 2 lines above this line DOES NOT throw an exception, weird
lastnode[hashindex] = nownode[hashindex];
line = input.readLine();
}Okay, here's some more code... Just the top portion of the program. Keep in mind that methods like CONS, LCONS, CDR, and LCDR are just using the ListNode methods such as .ptr and stuff... My professor makes us use this ADT he provided. I can post ALL code if you would like but I dont think all that is necessary.
static BufferedReader input, console;
static List hashtable = new List();
static List[] anArray = new List[20];
static ListNode[] nownode, firstnode, lastnode;
static String message = "";
static int nodecount = 0;
public static void openFile()
//Opens the file for input and throws and exception if the file is not there
File taskFile = new File("prices.txt");
try
input = new BufferedReader(new FileReader( taskFile ));
catch( FileNotFoundException fileNotFoundException )
outputStuff("Error", "The file does not exist!", "error");
public synchronized static void setupTable() throws IOException
firstnode = new ListNode[20];
nownode = new ListNode[20];
lastnode = new ListNode[20];
String line = input.readLine();
firstnode[0] = nownode[0] = lastnode[0] = new ListNode( line );
while( line != null )
hashindex = hash(line, 20);
if(firstnode[hashindex] == null)
firstnode[hashindex] = nownode[hashindex] = lastnode[hashindex] = new ListNode( line );
else
nownode[hashindex] = new ListNode( line );
anArray[hashindex].CONS(nownode[hashindex], lastnode[hashindex]);
anArray[hashindex].LCONS(lastnode[hashindex], nownode[hashindex]);
lastnode[hashindex] = nownode[hashindex];
line = input.readLine();
for(int i = 0; i <= 20; i++)
while( nownode[i] != null)
message += "String = " + anArray.info( nownode[i], 0 ) + "\tIndex = " + i + "\n";
nownode[i] = anArray[i].CDR(nownode[i]);
outputStuff("test", message, "blah");
}//End setupTable -
Sorted Double Linked List.
public class DLinkedList {
class Node {
String data;
Node next = null;
Node prev = null;
public Node(String o, Node n, Node p){
data = o;
next = n;
prev = p;
private int max;
private Node head;
private Node current = null;
public DLinkedList(int max_size) {
head = null;
current = null;
max = max_size;
public boolean isEmpty() {
public void insert(String o) {
Node n;
while (current != null && o.compareToIgnoreCase(current.data) > 0)
current.prev = current;
current = current.next;
if (current.prev == null)
// First Item in List
n = new Node(o, current, null);
else
current.prev.next = new Node(o, current, current.prev);
I am working on the insert and keep getting a null pointer exception. Can someone point me in the right direction.
Thanksif (current.prev == null)
// First Item in List
n = new Node(o, current, null);
}This code right here will cause a NullPointerException if current is still null, which is one of the possible exit conditions in your loop.
Maybe you are looking for
-
Change order of songs on itunes
How do I change the order of the songs in itunes? I have albums out of chronological order and want to move them so that when I play all the songs from a band on my IPOD it plays them from the first to last. Thanks for any help.
-
How do I get proxy authentication working with PDK-URL Services?
I am posting this question for a PDK user HEllo!!! I installed the jpdk and the urlservices. In the company, we have to log into the proxy server before we can go to the internet. How can setup my urlservices so they can pass this authentication prox
-
HT204135 How to connect a NAS printer (Epson SX218) to OS Lion
Hi, I have an Epson Printer on a Medion NAS Server P89633, the connection between Epson and WIN XP, WIN7 is perfect, but I cant get an connection to my MAC. Printdriver is installed and I found the printer in my systeme/ print&scan. I also able to se
-
Can't open "Accounts" preferences pane
I have a 1 week old iMac 27". When I open "System Preferences" and click on Accounts, first it says "To use the "Accounts" preferences pane, System Preferences must quit and reopen." I click OK and System Preferences opens in 32-bit and I get the mes
-
Olympus p440 printer - printed images are distorted
Since updating to 10.6 I have not been able to print correctly from my Olympus dye-sub printer. I had previously used the older gimp-print driver, but this is not available anymore only the Gutenprint version. Now I find that everything I try to prin