|
Bugzilla – Full Text Bug Listing |
| Summary: | pkgbindings cause segfault when there are missing parameters | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 13.1 | Reporter: | Thomas Göttlicher <tgoettlicher> |
| Component: | YaST2 | Assignee: | Ladislav Slezák <lslezak> |
| Status: | RESOLVED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P2 - High | CC: | tgoettlicher |
| Version: | RC 1 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | testcase | ||
I found out that the crash is caused by missing parameters, just add them. In this case they are just dummy parameters left for backward compatibility: Pkg.PkgSolve() -> Pkg.PkgSolve(false) Pkg.PkgCommit() -> Pkg.PkgCommit(0) Then it should work. I'll investigate how to avoid the hard crash and log something more meaningful instead... (Lowering severity as it happens only in wrong scripts, in correct scripts it won't happen.) Ladislav, thanks for the workaround. It works with dummy arguments for me. Ok, thanks for the feedback, I'm fixing the crash right now... Fixed in yast2-pkg-bindings-3.0.4 (https://github.com/yast/yast-pkg-bindings/pull/12) It should not crash anymore and you should see errors like "Parameter 1 is nil, Integer is required" in y2log when a parameter is missing. In the end fixed in yast2-core-3.0.3 (see https://github.com/yast/yast-core/pull/64) as a better solution. (Just a note if somebody would like to test the fix: you need updated pkg-bindings compiled against yast2-core >= 3.0.3) |
Created attachment 563928 [details] testcase Running the attached testcase causes a segfault on 13.1 rc1.