#126 Reports fail on Mac OS X

closed
Reports (22)
5
2009-03-22
2008-12-15
Tom Edelson
No

When running jGnash 1.11.7 on Mac OS X, if I select any item in the Reports menu, nothing (visible to the user) happens. I.e. no report is created, and also, no error indication is displayed in the GUI.

This was observed in the following environment:

Power PC Macintosh

Mac OS X 10.4.11 (Tiger)

Java version and JVM info:

java version "1.5.0_07"

Java(TM) 2 Runtime Environment, Standard Edition
(build 1.5.0_07-164)

Java HotSpot(TM) Client VM
(build 1.5.0_07-87, mixed mode, sharing)

Discussion

  • Tom Edelson

    Tom Edelson - 2008-12-15
    • status: open --> pending
     
  • Tom Edelson

    Tom Edelson - 2008-12-15

    Changing status to "pending" because a fix has been coded and committed, but not released.

     
  • Petey

    Petey - 2008-12-15

    What is the fix?

     
  • Craig Cavanaugh

    Craig Cavanaugh - 2008-12-16
    • milestone: --> Affects_only_jGnash_1.x
     
  • Craig Cavanaugh

    Craig Cavanaugh - 2008-12-16
    • assigned_to: nobody --> edelsont
     
  • Tom Edelson

    Tom Edelson - 2008-12-17

    > What is the fix?

    There were two kinds of fixes needed to get all eleven reports working. (That being the number of reports available under the Reports menu, in the jGnash 1.x series, at present.)

    The first change was (primarily) to method runResource of class jgnash.plugin.RunBshScript. Instead of calling the getResourceAsStream method of the Class object associated with the BeanShell Interpreter class, we now call a method with the same name on the "System class loader" object.

    Correlative with this, it was necessary to make a change to the buildUI method of class jgnash.ui.MainFrame. The change here was to the string constants associated with the "actions" that run these reports: each such constant had its leading slash character removed.

    This fix created revision 1053 of the 1.x tree. Prior to this fix, none of the eleven reports would run, when selected from the Reports menu, on Mac OS X (or at least on my system). (Basically, jGnash was failing to open the BeanShell script itself.) After this fix, if I recall correctly, six of them worked, and the other five required further changes on a report-by-report basis.

    The way the remaining five reports were fixed was to convert part of each one (sometimes just a little, sometimes most of the code) from BeanShell code to (otherwise similar) Java code, in a new Java class created for each. All of these new Java classes are in package jgnash.report.compiled ... along with others for reports which had already been partly (usually mostly) converted from BeanShell to Java.

    I'm not 100% sure, but I _suspect_ that we can draw an inference from the fact that [these five] reports could be fixed in this way, with no real change to the logic ... along with the fact that they were already working on Windows and Linux. The inference is that the root cause of the failures was a Mac-specific bug in BeanShell itself.

    After I coded this second round of changes, but before I committed them, ccavanaugh committed changes to two of the five reports. His changes went further than mine had done in converting them from BeanShell to Java code, and thus rendered my changes, for those two, superfluous.

    Thus, I ended up committing three changed BeanShell scripts and three new Java classes. Their names were "SecurityHighLow", "AccountMonthBalance", and "AccountRunningBalance". This commit created revision 1330 of the 1.x source tree; I believe that in any revision of 1.x from that one on, all eleven reports can run on Mac OS X.

     
  • Tom Edelson

    Tom Edelson - 2008-12-17
    • status: pending --> open
     
  • Tom Edelson

    Tom Edelson - 2008-12-17

    BTW, you may notice that this bug has been marked "Affects only jGnash 1.x". Originally, the bug was in 2.x as well. (As it happens, when I started working on these fixes, 2.x wasn't out yet; but at the time of the release of 2.0.0, I believe, at least the second round of changes, as described in the previous comment, had not yet been committed to either 2.x or 1.x.)

    However, ccavanaugh ported them forward to 2.x, and committed them there, before I committed them to 1.x (not to mention before I filed this bug). Also, after they were committed to 2.x, but before the bug was filed, at least one point release of 2.x was done, while, on the other hand, there has been no release from the 1.x tree that contains any of these fixes.

    Thus, at the time the bug was filed (and through now), the fixes for this bug were already in released code for jGnash 2.x, but not for 1.x. A release for 1.x, primarily to make these fixes available, is now being prepared.

     
  • Tom Edelson

    Tom Edelson - 2009-03-22

    This is fixed in release 1.12.0, which has been (fully) available for download since 2009-02-27.

     
  • Tom Edelson

    Tom Edelson - 2009-03-22

    This is fixed in release 1.12.0, which has been (fully) available for download since 2009-02-27.

     
  • Tom Edelson

    Tom Edelson - 2009-03-22
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks