我通過將代碼拆分為更多 Go 包對代碼進行了大掃除,主要是為了提高可重用性(每個“構(gòu)建塊”都在自己的包中)。修復(fù)導(dǎo)入錯誤后,我發(fā)現(xiàn)我的程序突然無法構(gòu)建。運行“go build”會返回一個nosplit 堆棧溢出錯誤。機器人 main.init: nosplit 堆棧溢出 120 guaranteed after split check in main.init 112 on entry to robot/web.init 104 on entry to robot/controller.init 96 on entry to robot/slam.init 88 on entry to robot/slam/hector.init 80 on entry to hectormapping/map/mapimages.init 72 on entry to hectormapping/map/maprep.init 64 on entry to hectormapping/map/mapproccontainer.init 56 on entry to hectormapping/scanmatcher.init 48 on entry to hectormapping/map/gridmap/occbase.init 40 on entry to hectormapping/map/gridmap/base.init 32 on entry to hectormapping/map/gridmap.init 24 on entry to github.com/skelterjohn/go%2ematrix.init 16 on entry to math.init 8 on entry to math.init┬à1 0 on entry to runtime.panicindex -8 on entry to runtime.morestack00runtime.main: nosplit 堆棧溢出 120 guaranteed after split check in runtime.main 128 after runtime.main uses -8 120 on entry to main.init 112 on entry to robot/web.init 104 on entry to robot/controller.init 96 on entry to robot/slam.init 88 on entry to robot/slam/hector.init 80 on entry to hectormapping/map/mapimages.init 72 on entry to hectormapping/map/maprep.init 64 on entry to hectormapping/map/mapproccontainer.init 56 on entry to hectormapping/scanmatcher.init 48 on entry to hectormapping/map/gridmap/occbase.init 40 on entry to hectormapping/map/gridmap/base.init 32 on entry to hectormapping/map/gridmap.init有誰知道這是關(guān)于什么的?我找不到關(guān)于可能導(dǎo)致它的原因的太多文檔,除了在某些情況下,這是一個應(yīng)該已修復(fù)的錯誤。一些代碼被拆分到“src”文件夾中的一個新文件夾中,因此文件結(jié)構(gòu)現(xiàn)在是:src/robot/main.go (main() lives here)src/robot/(...) (application-specific packages)src/hectormapping/(...) (stand-alone package used in "robot")我在 Windows 7 (x64) 上使用 Go 1.0.3。
- 1 回答
- 0 關(guān)注
- 412 瀏覽
添加回答
舉報
0/150
提交
取消