Marko Kiiskila created MYNEWT-621:
-------------------------------------

             Summary: newt, adding a non-existent package in app's pkg.yml 
causes crash
                 Key: MYNEWT-621
                 URL: https://issues.apache.org/jira/browse/MYNEWT-621
             Project: Mynewt
          Issue Type: Bug
          Components: Newt
    Affects Versions: v1_0_0_beta2
            Reporter: Marko Kiiskila
            Assignee: Sterling Hughes


Typo in package name, and newt crashed.


panic: interface conversion: interfaces.PackageInterface is nil, not 
*pkg.LocalPackage

goroutine 1 [running]:
panic(0x407f00, 0xc4201da1c0)
        /usr/local/go/src/runtime/panic.go:500 +0x1a1
mynewt.apache.org/newt/newt/resolve.(*Resolver).resolveDep(0xc4200dc000, 
0xc420372320, 0xc4203a4040, 0x1d, 0xc420372320)
        
/Users/marko/newt/src/mynewt.apache.org/newt/newt/resolve/resolve.go:137 +0x264
mynewt.apache.org/newt/newt/resolve.(*Resolver).loadDepsForPkg(0xc4200dc000, 
0xc4203a5a00, 0xc420431070, 0xc420301500, 0xc420431050)
        
/Users/marko/newt/src/mynewt.apache.org/newt/newt/resolve/resolve.go:293 +0x11e
mynewt.apache.org/newt/newt/resolve.(*Resolver).resolvePkg(0xc4200dc000, 
0xc4203a5a00, 0xc420157500, 0x0, 0x0)
        
/Users/marko/newt/src/mynewt.apache.org/newt/newt/resolve/resolve.go:331 +0x95
mynewt.apache.org/newt/newt/resolve.(*Resolver).resolveDepsOnce(0xc4200dc000, 
0x69b968, 0x0, 0x0)
        
/Users/marko/newt/src/mynewt.apache.org/newt/newt/resolve/resolve.go:383 +0xa7
mynewt.apache.org/newt/newt/resolve.(*Resolver).resolveDepsAndCfg(0xc4200dc000, 
0x4, 0x4)
        
/Users/marko/newt/src/mynewt.apache.org/newt/newt/resolve/resolve.go:418 +0x40
mynewt.apache.org/newt/newt/resolve.ResolveFull(0x0, 0x0, 0x0, 0xc420300d80, 
0x4, 0x6, 0xc420300d50, 0xc4203002a0, 0x69b968, 0x0, ...)
        
/Users/marko/newt/src/mynewt.apache.org/newt/newt/resolve/resolve.go:520 +0x151
mynewt.apache.org/newt/newt/builder.(*TargetBuilder).ensureResolved(0xc420192600,
 0x1126e, 0xc420300d50)
        
/Users/marko/newt/src/mynewt.apache.org/newt/newt/builder/targetbuild.go:166 
+0x2d2
mynewt.apache.org/newt/newt/builder.(*TargetBuilder).PrepBuild(0xc420192600, 
0xc420192600, 0x0)
        
/Users/marko/newt/src/mynewt.apache.org/newt/newt/builder/targetbuild.go:240 
+0x6e
mynewt.apache.org/newt/newt/builder.(*TargetBuilder).Build(0xc420192600, 0xc, 
0xc420192600)
        
/Users/marko/newt/src/mynewt.apache.org/newt/newt/builder/targetbuild.go:344 
+0x2f
mynewt.apache.org/newt/newt/cli.runRunCmd(0xc4201458c0, 0xc420119b80, 0x2, 0x2)
        /Users/marko/newt/src/mynewt.apache.org/newt/newt/cli/run_cmds.go:51 
+0x16c
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).execute(0xc4201458c0,
 0xc4201198c0, 0x2, 0x2, 0xc4201458c0, 0xc4201198c0)
        
/Users/marko/newt/src/mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:636
 +0x443
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc420091200,
 0xffffffffffffffff, 0x3, 0x472fb3)
        
/Users/marko/newt/src/mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:722
 +0x367
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).Execute(0xc420091200,
 0x472fb3, 0x3)
        
/Users/marko/newt/src/mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:681
 +0x2b
main.main()
        /Users/marko/newt/src/mynewt.apache.org/newt/newt/newt.go:167 +0x1b6
exit status 2




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to