Uploaded image for project: 'Appcelerator Studio'
  1. Appcelerator Studio
  2. TISTUD-763

NPE on Titanium Mobile Project Creation (when using a template)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Titanium Studio 1.0.7
    • Component/s: Mobile
    • Labels:
      None

      Description

      Using the following template definition:

      1. Create a new ruble (http://wiki.appcelerator.org/display/tis/Creating+a+new+Ruble)
      2. Paste in the following code:

        project_template "TabBarControllerTemplate" do |t|
          t.type = :titanium_mobile
          t.location = "git@github.com:DamageStudios/TabBarController.git"
          t.description = "Remote template. Requires network access."
        end
        

      3. Launch File > New > Titanium Mobile Project and progress to the template screen. Choose the TabBarControllTemplate and attempt to finish the wizard

      I can reliably get the following NPE:

      !ENTRY com.appcelerator.titanium.ui 2 0 2011-11-03 20:04:37.057
      !MESSAGE Internal error: null
      !STACK 0
      java.lang.NullPointerException
      	at com.appcelerator.titanium.ui.wizard.BasicNewTitaniumProjectWizard.createProjectFiles(BasicNewTitaniumProjectWizard.java:458)
      	at com.appcelerator.titanium.mobile.ui.wizard.NewMobileProjectWizard.createProjectFiles(NewMobileProjectWizard.java:243)
      	at com.appcelerator.titanium.ui.wizard.BasicNewTitaniumProjectWizard.finalizeProjectCreation(BasicNewTitaniumProjectWizard.java:364)
      	at com.appcelerator.titanium.mobile.ui.wizard.NewMobileProjectWizard.createProject(NewMobileProjectWizard.java:146)
      	at com.appcelerator.titanium.ui.wizard.BasicNewTitaniumProjectWizard$1.run(BasicNewTitaniumProjectWizard.java:188)
      	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
      

      It appears that the project location is created asynchronously, and projectData.project.getLocation() is null at this point. If I put a breakpoint there and wait a few seconds, eventually that variable becomes non-null.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cwilliams Christopher Williams
                Reporter:
                ingo Ingo Muschenetz
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: