Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / March 2004

Tip: Looking for answers? Try searching our database.

stackOverFlow error

Thread view: 
jagiello - 21 Mar 2004 23:57 GMT
Hello,
I have a problem with lists. I begin writing an implementation of list to
understand it better, but I have a problem:
When I try to create a new list I receive the following error:

java.lang.StackOverflowError
Exception in thread "main"

I think it is caused by the statement which creates an empty list, but I
don't know why.
The files can be found here (they are rather long for posting in the group,
I think):

http://it.f2.pg.briefcase.yahoo.com/bc/wtkrak/lst?.dir=/java&.view=l

Thanks for any help,
Witold
Yoyoma_2 - 22 Mar 2004 00:58 GMT
> Hello,
> I have a problem with lists. I begin writing an implementation of list to
[quoted text clipped - 13 lines]
> Thanks for any help,
> Witold

Stack overflow means that the jvm ran out of stack memory.  For you it
probably means that you are using a recursive function but it goes too
far and never stops until it busts the memory. Try putting a
System.out.println( ); to see why it keeps on calling itself and why
your 'stop condition' never gets reached.
Andrew Thompson - 22 Mar 2004 10:20 GMT
> http://it.f2.pg.briefcase.yahoo.com/bc/wtkrak/lst?.dir=/java&.view=l

Il file che stai cercando non è disponibile.

Per favore effettua nuovamente l'accesso e riprova,
o fai una verifica sul documento.

Signature

Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology

Witold - 22 Mar 2004 13:00 GMT
>> http://it.f2.pg.briefcase.yahoo.com/bc/wtkrak/lst?.dir=/java&.view=l
>
> Il file che stai cercando non ? disponibile.
>
> Per favore effettua nuovamente l'accesso e riprova,
> o fai una verifica sul documento.

I'm sorry, I didn't set correct access. Now the problem is corrected and
you can access to the files contained in the java folder.
Witold - 22 Mar 2004 13:37 GMT
>> http://it.f2.pg.briefcase.yahoo.com/bc/wtkrak/lst?.dir=/java&.view=l
>
> Il file che stai cercando non ? disponibile.
>
> Per favore effettua nuovamente l'accesso e riprova,
> o fai una verifica sul documento.

I corrected the access to the briefcase now. I also corrected the
stackOverflowError, but now when I insert few elements using the
insertFirst method, only the last one is printed. It is also printed as
many times as are the elements inserted.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.