{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/17308","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/17308/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/17308/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/17308/events","html_url":"https://github.com/godotengine/godot/issues/17308","id":302760180,"number":17308,"title":"Assets imported using headless build (platform=server) are broken","user":{"login":"sdfgeoff","id":13490050,"avatar_url":"https://avatars0.githubusercontent.com/u/13490050?v=4","gravatar_id":"","url":"https://api.github.com/users/sdfgeoff","html_url":"https://github.com/sdfgeoff","followers_url":"https://api.github.com/users/sdfgeoff/followers","following_url":"https://api.github.com/users/sdfgeoff/following{/other_user}","gists_url":"https://api.github.com/users/sdfgeoff/gists{/gist_id}","starred_url":"https://api.github.com/users/sdfgeoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdfgeoff/subscriptions","organizations_url":"https://api.github.com/users/sdfgeoff/orgs","repos_url":"https://api.github.com/users/sdfgeoff/repos","events_url":"https://api.github.com/users/sdfgeoff/events{/privacy}","received_events_url":"https://api.github.com/users/sdfgeoff/received_events","type":"User","site_admin":false},"labels":[{"id":73330064,"url":"https://api.github.com/repos/godotengine/godot/labels/bug","name":"bug","color":"ff2222","default":true},{"id":279098219,"url":"https://api.github.com/repos/godotengine/godot/labels/topic:editor","name":"topic:editor","color":"ffdd44","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/godotengine/godot/milestones/7","html_url":"https://github.com/godotengine/godot/milestone/7","labels_url":"https://api.github.com/repos/godotengine/godot/milestones/7/labels","id":2529217,"number":7,"title":"3.1","description":"","creator":{"login":"akien-mga","id":4701338,"avatar_url":"https://avatars0.githubusercontent.com/u/4701338?v=4","gravatar_id":"","url":"https://api.github.com/users/akien-mga","html_url":"https://github.com/akien-mga","followers_url":"https://api.github.com/users/akien-mga/followers","following_url":"https://api.github.com/users/akien-mga/following{/other_user}","gists_url":"https://api.github.com/users/akien-mga/gists{/gist_id}","starred_url":"https://api.github.com/users/akien-mga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akien-mga/subscriptions","organizations_url":"https://api.github.com/users/akien-mga/orgs","repos_url":"https://api.github.com/users/akien-mga/repos","events_url":"https://api.github.com/users/akien-mga/events{/privacy}","received_events_url":"https://api.github.com/users/akien-mga/received_events","type":"User","site_admin":false},"open_issues":920,"closed_issues":1225,"state":"open","created_at":"2017-05-18T13:33:56Z","updated_at":"2018-05-10T06:36:10Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2018-03-06T16:02:04Z","updated_at":"2018-05-10T08:54:00Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Godot version:**\r\nCurrent Master\r\nServer build is done with flags: `platform=server -j 8 target=release_debug separate_debug_symbols=yes`\r\n\r\n**OS/device including version:**\r\nLinux. Tested on both Kubuntu 16.04 and Kubuntu 17.10\r\n\r\n**Issue description:**\r\nWhen the headless build has to import assets, they import \"broken.\"\r\nThis issue was noticed when exporting a game using the command line from a server build, and the resulting .pck or .zip file has broken assets. After some investigation it was discovered that this was only an issue when the assets were re-imported by the headless build. If the assets are already imported from a non-server build, then they are not rebuilt and the exported zip plays fine.\r\n\r\nInspecting the zip files reveals a vast size difference between asset files. The .scn files that come from .dae files are often 5-6 times larger in the export that works.\r\nWhen running `godot --main-pack export_broken.zip` the result is that the model doesn't show, and in the console informs you that:\r\n```\r\nOpenGL ES 3.0 Renderer: GeForce GTX 1060 6GB/PCIe/SSE2\r\nERROR: mesh_add_surface: Condition ' !(p_format & VisualServer::ARRAY_FORMAT_VERTEX) ' is true.\r\n   At: drivers/gles3/rasterizer_storage_gles3.cpp:2672.\r\nERROR: instance_set_surface_material: Index p_surface=0 out of size (instance->materials.size()=0)\r\n   At: servers/visual/visual_server_scene.cpp:604.\r\n```\r\n\r\nSample Project: [ExportTest.zip](https://github.com/godotengine/godot/files/1788417/ExportTest.zip)\r\n\r\nExport from server: [export_broken.zip](https://github.com/godotengine/godot/files/1788829/export_broken.zip)\r\nExport from editor: [export_working.zip](https://github.com/godotengine/godot/files/1788831/export_working.zip)\r\n\r\nExports were performed with:\r\n```\r\nexport-server:\r\n\trm -rf .import\r\n\t$(GODOT_SERVER) --export pck export_broken.zip\r\n\t\r\nexport-editor:\r\n\trm -rf .import\r\n\t$(GODOT_EDITOR) --export pck export_working.zip\r\n```\r\n\r\nDiff between zips:\r\n```\r\n$diff -y <(unzip -l export_broken.zip) <(unzip -l export_working.zip)\r\nArchive:  export_broken.zip                                   | Archive:  export_working.zip\r\n  Length      Date    Time    Name                                Length      Date    Time    Name\r\n---------  ---------- -----   ----                              ---------  ---------- -----   ----\r\n      621  1980-00-00 00:00   Main.tscn                               621  1980-00-00 00:00   Main.tscn\r\n     3533  1980-00-00 00:00   .import/icon.png-487276ed1e3a0c        3533  1980-00-00 00:00   .import/icon.png-487276ed1e3a0c\r\n      649  1980-00-00 00:00   icon.png.import                         649  1980-00-00 00:00   icon.png.import\r\n     1703  1980-00-00 00:00   .import/Monkey.dae-9595bdbecdf0 |     41935  1980-00-00 00:00   .import/Monkey.dae-9595bdbecdf0\r\n    31836  1980-00-00 00:00   resources/Monkey.dae.import           31836  1980-00-00 00:00   resources/Monkey.dae.import\r\n     2580  1980-00-00 00:00   resources/default_env.tres             2580  1980-00-00 00:00   resources/default_env.tres\r\n     3498  1980-00-00 00:00   icon.png                               3498  1980-00-00 00:00   icon.png\r\n      261  1980-00-00 00:00   project.binary                          261  1980-00-00 00:00   project.binary\r\n---------                     -------                           ---------                     -------\r\n    44681                     8 files                         |     84913                     8 files\r\n\r\n```\r\n\r\nNotice the ones with a vertical bar in the middle. Look at the difference in filesize. \r\n\r\nOh look, my time machine is acting up again.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/387994993","html_url":"https://github.com/godotengine/godot/issues/17308#issuecomment-387994993","issue_url":"https://api.github.com/repos/godotengine/godot/issues/17308","id":387994993,"user":{"login":"sdfgeoff","id":13490050,"avatar_url":"https://avatars0.githubusercontent.com/u/13490050?v=4","gravatar_id":"","url":"https://api.github.com/users/sdfgeoff","html_url":"https://github.com/sdfgeoff","followers_url":"https://api.github.com/users/sdfgeoff/followers","following_url":"https://api.github.com/users/sdfgeoff/following{/other_user}","gists_url":"https://api.github.com/users/sdfgeoff/gists{/gist_id}","starred_url":"https://api.github.com/users/sdfgeoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdfgeoff/subscriptions","organizations_url":"https://api.github.com/users/sdfgeoff/orgs","repos_url":"https://api.github.com/users/sdfgeoff/repos","events_url":"https://api.github.com/users/sdfgeoff/events{/privacy}","received_events_url":"https://api.github.com/users/sdfgeoff/received_events","type":"User","site_admin":false},"created_at":"2018-05-10T08:54:00Z","updated_at":"2018-05-10T08:54:00Z","author_association":"CONTRIBUTOR","body":"@jfaust:\r\nCurrently I have a monitor plugged into our build server, so I run `xhost+` from the graphically-logged-in-user, and then use `export DISPLAY=:0` which allows the user of regular Godot. Obviously, this only works if you have a screen plugged in. I also tried various things with `xvfb` without success.\r\nBut all of these are workarounds. I hope to invest some development time into this in the near future.\r\n\r\n@vnen:\r\nThis is to do with imports of 3D models and scenes. It seems that images work fine. (Although there is a compile issue on the server build I had recently that looks like it may be fixed by that PR)."}}
{"actor":{"display_login":"sdfgeoff"}}