Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #29672

Re: bug shows up depending on whether Java console is there or not.

From Marcel Mueller <news.5.maazl@spamgourmet.org>
Newsgroups comp.lang.java.programmer
Subject Re: bug shows up depending on whether Java console is there or not.
Date 2014-08-15 11:07 +0200
Organization MB-NET.NET for Open-News-Network e.V.
Message-ID <lskik3$vjs$1@gwaiyur.mb-net.net> (permalink)
References <slrnlukl58.fp3.avl@login.logic.tuwien.ac.at> <lsdu57$d6m$1@news.albasani.net> <slrnluqo7d.fp3.avl@login.logic.tuwien.ac.at>

Show all headers | View raw


On 15.08.14 03.22, Andreas Leitgeb wrote:
>> Almost anything could happen in case of a race condition.
>> Console access could serialize things that otherwise run in parallel.
>> Of course, I'm just guessing.
>
> Thanks for the guess, but that likely isn't the case here.
>
> The code within the try-block doesn't really attempt to write to
> the console. All logging activities are governed by a debugging flag,
> and even when that flag is false, the presence or absence of console
> still made a reliably *reproducible* difference.

Well, 'anything' also include this kind of symptoms. There is no need 
for a comprehensible relation to the cause. Maybe the console just 
changes the memory layout of the VM a bit.
I have seen really wired things. From a a silently aborting VM up to 
throwing the last caught (!) exception again at an arbitrary location.
Broken JNI code can raise similar Problems, as well as a broken JVM, of 
course.

>> What about the call stack? Try to find the corresponding throw in the
>> Java source.
>
> That will be subject to check in the next days.
> My hopes are not very high (based on the null from getLocalizedMessage())
> to find any other sensible information, but it is definitely worth a try.

AFAIK in Java the stack trace is captured by the Throwable constructor. 
It should be almost impossible to leave this field empty. But the stack 
trace may not match the location where the exception was thrown. This 
could add some confusion.

> (I need to add some code for that and have the user check again, as the
> stack-trace of the JAXBException isn't currently visible to the user. So,
> it'll take some time.)

It is always a good advice to include the stack trace when an exception 
is converted to a string. I wrote some helper for this purpose 
(ExceptionFormatter) since Java does not provide such a conversion. The 
message itself is often meaningless without a context.


Marcel

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

bug shows up depending on whether Java console is there or not. Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-08-12 17:53 +0000
  Re: bug shows up depending on whether Java console is there or not. Marcel Mueller <news.5.maazl@spamgourmet.org> - 2014-08-12 22:41 +0200
    Re: bug shows up depending on whether Java console is there or not. Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-08-15 01:22 +0000
      Re: bug shows up depending on whether Java console is there or not. Marcel Mueller <news.5.maazl@spamgourmet.org> - 2014-08-15 11:07 +0200

csiph-web