org.gnome.gtk.Dialog.add(Widget widget) broken

Bug #1043558 reported by Jason Monroe Martin
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
java-gnome (Ubuntu)
Fix Released
Undecided
Guillaume Mazoyer
Precise
Fix Released
Undecided
Unassigned

Bug Description

libjava-gnome-java (4.1.1-2) causes ClassCastException with the Box inside a Dialog

see this page http://sourceforge.net/mailarchive/message.php?msg_id=28329835

fixed in https://launchpad.net/~java-gnome/+archive/ppa with 4.1.1-2ubuntu2~ppa1~precise1 (WORKS FOR ME)

This was the offending code that was fixed but libjava-gnome-java (4.1.1-2) still crashes.

From Dialog.java

    public void add(Widget widget) {
        final Box box;

        box = (Box) this.getChild();
        box.add(widget);
    }

Was changed to

    public void add(Widget widget) {
        final VBox box;

        box = (VBox) this.getChild();
        box.add(widget);
    }

Related branches

Revision history for this message
Guillaume Mazoyer (respawneral) wrote :

A new upstream release (fixing this bug) has been uploaded in Debian. I'll try to see if I can make it sync for quantal.

Changed in java-gnome (Ubuntu):
assignee: nobody → Guillaume Mazoyer (respawneral)
status: New → Confirmed
Revision history for this message
Jason Monroe Martin (agrellum) wrote :

Thanks,

Will this make into 12.04 (LTS) ?

and I just downloaded the latest java-gnome-4.1.2.tar.xz released today.

Dialog.java stills looks like this. I am I correct that it was not fixed upstream?

     /**
     * Add a Widget to the <var>main area</var> of the Dialog.
     *
     * @since 4.0.5
     */
    public void add(Widget widget) {
        final Box box;

        box = (Box) this.getChild();
        box.add(widget);
    }

Revision history for this message
Guillaume Mazoyer (respawneral) wrote :

Actually this is the fix that is available in the PPA. You mixed up the two code.
Before it was a VBox cast now it is a Box cast (Box being the super-class of VBox).
I'll try to put in 12.04 too since this is a quit important crasher.

Revision history for this message
Jason Monroe Martin (agrellum) wrote : Re: [Bug 1043558] Re: org.gnome.gtk.Dialog.add(Widget widget) broken

Thanks again.

On Thu, Aug 30, 2012 at 1:41 PM, Guillaume Mazoyer <email address hidden>wrote:

> Actually this is the fix that is available in the PPA. You mixed up the
> two code.
> Before it was a VBox cast now it is a Box cast (Box being the super-class
> of VBox).
> I'll try to put in 12.04 too since this is a quit important crasher.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1043558
>
> Title:
> org.gnome.gtk.Dialog.add(Widget widget) broken
>
> Status in “java-gnome” package in Ubuntu:
> Confirmed
>
> Bug description:
> libjava-gnome-java (4.1.1-2) causes ClassCastException with the Box
> inside a Dialog
>
> see this page
> http://sourceforge.net/mailarchive/message.php?msg_id=28329835
>
> fixed in https://launchpad.net/~java-gnome/+archive/ppa with
> 4.1.1-2ubuntu2~ppa1~precise1 (WORKS FOR ME)
>
> This was the offending code that was fixed but libjava-gnome-java
> (4.1.1-2) still crashes.
>
> From Dialog.java
>
> public void add(Widget widget) {
> final Box box;
>
> box = (Box) this.getChild();
> box.add(widget);
> }
>
> Was changed to
>
> public void add(Widget widget) {
> final VBox box;
>
> box = (VBox) this.getChild();
> box.add(widget);
> }
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/java-gnome/+bug/1043558/+subscriptions
>

Revision history for this message
Martin Pitt (pitti) wrote :

This fix is included in 4.1.2, which just hit quantal: https://launchpad.net/ubuntu/+source/java-gnome/4.1.2-1

Changed in java-gnome (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Sponsored the branch to precise-proposed upload queue. Thanks!

Changed in java-gnome (Ubuntu Precise):
status: New → In Progress
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Jason, or anyone else affected,

Accepted java-gnome into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/java-gnome/4.1.1-2ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in java-gnome (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Jason Monroe Martin (agrellum) wrote :

I downloaded and installed the debs manually on xubuntu 12.04 with the sun-java6 update 35

I updated depends and rebuilt https://apps.ubuntu.com/cat/applications/compostimate/

All dialogs and widgets used passed.

Thanks to all who worked on this.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Jason Monroe Martin (agrellum) wrote :

Also, fix has been tested with unreleased application with some extra widgets not found in the original one.

Revision history for this message
Guillaume Mazoyer (respawneral) wrote :

Tested and worked (I knew it).
Thanks for uploading.

Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package java-gnome - 4.1.1-2ubuntu1

---------------
java-gnome (4.1.1-2ubuntu1) precise-proposed; urgency=low

  * debian/patches/02_fix_dialog_add_crasher.patch:
    - Fix crasher when using Dialog add() method (LP: #1043558).
 -- Guillaume Mazoyer <email address hidden> Fri, 31 Aug 2012 01:46:26 +0200

Changed in java-gnome (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.