From: Arno P. <ar...@pu...> - 2011-09-21 20:28:39
|
thanks for the nice analysis! It seems that the exception context was not properly restored when exiting a switch statement. Can you please check if the attached patch fixes this problem? Arno On 9/21/11 3:12 AM, Shai wrote: > OK, I had code that looked something like this (pseudo code): > > public void method(SomeClass obj) { > try { > switch(field) { > case 1: > > ... > return; > > case 2: > > ... > return; > > case 3: > > ... > return; > > case 4: > > ... > return; > > // no default > > } > > } catch(Throwable t) { > System.out.println("Fail message..."); > > } > > } > > > I initially changed all the return methods to breaks which didn't really solve the problem. > Then I moved the switch statement to a different private method (while keeping the break instead of return) and replaced the System.out with printStackTrace(). > Problem solved... > > I'm open for ideas on how to investigate this further. > > >> I think the problem is in the generated code. I have a >> curThread_w23657aaac46b1c17 variable which is indeed invalid and the reason it >> is invalid is that the TRY that corresponds to that uniqueId wasn't executed >> before I reached this line. >> So I'm guessing that this is a problem with the code generator, I'm >> trying to review my Java source code to see if there is something special there. >> The only thing that I can think of is that I have a large switch case in that >> code and most cases invoke return rather than breaking which is a less common >> practice. >> The switch is surrounded by a try/catch pair which might also be related in some >> way... >> I'll try making some code modifications to see if it works around the issue. > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > Xmlvm-developers mailing list > Xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-developers |