• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

OutOfMemory error is not being sent to stderr

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an app that doesn't produce OutOfMemory output to stderr. I haven't been able to re-pro this problem on a small app, as if I write a simple app that allocates more than the allowed memory, the JVM catches the OutOfMemory and prints it to stderr.

Has anyone seen OutOfMemory errors being swallowed in some way? The code that exhibits this problem does not catch Throwable, or OutOfMemoryError or such, so I would assume the normal JVM handler should catch it and print to stderr...

thanks,
thushara
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Describe these two apps. Is app 1 a web app against app 2 being a client app. Web containers may sometimes choose to redirect std out to a file or some other persistence.
 
thushara wijeratna
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Deepak Bala wrote:Describe these two apps. Is app 1 a web app against app 2 being a client app. Web containers may sometimes choose to redirect std out to a file or some other persistence.


they are both stand-alone apps. the first (more complex app) uses JDO to access a mysql database.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thushara,
Could the JDO code itself be catching the error?
 
thushara wijeratna
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:Thushara,
Could the JDO code itself be catching the error?


except, if i catch Throwable (instead of Exception), i do catch the OutOfMemoryError - this can't happen if the JDO code (which i call) is catching it, right?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic