Comments (3)
Program works as expected when the craft executable is run with the CWD as the root of the project:
./build/craft
A fix would probably be to check if the files that it's trying to access exist before continuing.
from craft.
To provide more information, it's the load_png_texture function that uses and frees the image even if it could not be loaded.
Backtrace:
#0 0x00007ffff62fe119 in raise () from /lib64/libc.so.6
#1 0x00007ffff62ff478 in abort () from /lib64/libc.so.6
#2 0x00007ffff633aaf7 in __libc_message () from /lib64/libc.so.6
#3 0x00007ffff634048e in malloc_printerr () from /lib64/libc.so.6
#4 0x000000000041b1a6 in load_png_texture (file_name=file_name@entry=0x4ccb2a "texture.png") at ../util.c:582
#5 0x0000000000411d61 in main (argc=1, argv=0x7fffffffddf8) at ../main.c:858
See: https://github.com/fogleman/Craft/blob/7e2497d87440ffd3a914076b842f972a2117771b/util.c#L580-582
And after this, the load_shader function has the same problems. Backtrace:
#0 0x00007ffff6338f6c in fseek () from /lib64/libc.so.6
#1 0x0000000000418f10 in load_file (path=<optimized out>) at ../util.c:33
#2 0x00000000004191fc in load_shader (path=<optimized out>, type=35633) at ../util.c:69
#3 load_program (path1=path1@entry=0x4ccb52 "shaders/block_vertex.glsl", path2=path2@entry=0x4ccb36 "shaders/block_fragment.glsl") at ../util.c:98
#4 0x0000000000411d70 in main (argc=1, argv=0x7fffffffddf8) at ../main.c:860
See:
Line 68 in 7e2497d
(Maybe there are more issues, but I have not checked it further)
from craft.
The problem is that the program search the files in the local dir. My patch fix this problem and enable you to install "craft" where you want.
from craft.
Related Issues (20)
- Port to browser using Webassembly HOT 4
- well it seems there is a ad ware trojan in the files HOT 6
- new structure added without announcement?! HOT 1
- Crash report cant fix HOT 1
- Seeding the world from sqlite HOT 1
- Fix Minecraft GLFW Error 65542 WGL The driver does not appear to support opengl HOT 2
- the builder.py and the server.py and the world.py giving error HOT 1
- How to add new blocks ? HOT 3
- client.c: use static for "char buffer[1024];" HOT 1
- How to run on retroarch xbox?
- Build error win10 HOT 1
- Found a possible security concern
- when i play on my server in chat say smth HOT 2
- Build and install for Ubuntu HOT 1
- "cmake ." results in "fatal error LNK1104: can't open file 'kernel32.lib'" HOT 1
- Potential memory leak. HOT 3
- Server
- thank you for releasing the code
- Can't build HOT 1
- An app on the play store seems to be using this for their Minecraft clone.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from craft.