openGeeksLab / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

res.getTheme(res.getThemeResourceNames()[0]) crashes on IOS 8.1.1 #1350

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
IMPORTANT: This is not a place to ask questions! Please ask questions here:
http://www.codenameone.com/discussion-forum.html
If you are unsure about an issue go to the discussion forum first. Remove
these lines to indicate that you read and understood them.

Please clearly state whether the issue relates to a device/the simulator or
the tools.
If related to a device be sure to specify exactly which device with as much
details as possible.

What steps will reproduce the problem?

public class Main {

    private Form currentForm;
    private static Object context;
    private Resources res;
    public void init(Object context) {
        this.context = context;

        try {
            res = Resources.openLayered("/theme");
            Hashtable baseTheme = res.getTheme(res.getThemeResourceNames()[0]); //CRASHES HERE
        } catch (IOException e) {
            Log.e(e);
        }
    }

    public void start(){
        Log.p("Start");
        if(currentForm != null && !(currentForm instanceof Dialog)) {
            currentForm.show();
            return;
        }
        showMain();
    }

    private void showMain(){
        Form f= new Form("CRASH FORM");
        f.show();
    }
    public void stop() {
        currentForm = Display.getInstance().getCurrent();
    }

    public void destroy() {
    }
}

What is the expected output? What do you see instead?
It should return a hashtable 

What version of the product are you using? On what operating system?
IOS 8.1.1

Please provide any additional information below.
there is a theme file attached that probably causes this crash

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by evenmat...@gmail.com on 14 Feb 2015 at 7:49

Attachments:

GoogleCodeExporter commented 8 years ago
Issue 1349 has been merged into this issue.

Original comment by shai.almog on 15 Feb 2015 at 7:04

GoogleCodeExporter commented 8 years ago
This should be fixed now.

Original comment by shai.almog on 15 Feb 2015 at 8:33

GoogleCodeExporter commented 8 years ago
I see its fixed but seems  like the fix triggered   some regressions. My
app now crashed randomly. it's able to get past that point  but there  are
now crashes  here and there. I will find the time to debug this.

Original comment by evenmat...@gmail.com on 15 Feb 2015 at 9:53