|
Post by n00b on Jun 11, 2016 8:45:04 GMT -6
I dont know if that wis will fix it but I don't like how vectors work. It could be that gcc implements them poorly. If you are able to find what causes that error it will definitely help.
|
|
|
Post by sdlbasic_admin on Jun 13, 2016 8:58:01 GMT -6
I ran the program that you provide, that link in the main page and i went to the concept test compile the main.cpp and compile it, all went well with a return with the number 81, the i ran the valgrind and no memory leaks. no segfaults either, what steps should i take to be able to reproduce the mem leak..bug? should i compile everything? please give me the steps to make everything as you. thanks.
|
|
|
Post by sdlbasic on Jun 13, 2016 9:21:05 GMT -6
Well, now i saw the gui.bas but i did not find the string.bas, but i ran it with valgrind and it leaks, but to ran everything as it should i need the string.bas.
|
|
|
Post by n00b on Jun 14, 2016 3:09:03 GMT -6
Sorry for the late reply. Something happened to my computer so I repaired an old laptop I had laying around and threw my hard drive in it. It is really slow though. Anyway I am attaching strings.bas (474 B)
|
|
|
Post by sdlbasic on Jun 15, 2016 15:57:46 GMT -6
well, i ran it and i got this error.
*** Error in `./rbc': free(): invalid pointer: 0x0000000001aa0862 ***
it looks that you are trying to free the wrong pointer, maybe this is what is causing the leaking...
I tried to run the rb_rt and it pops the hello world, i'm using the execs that you shipped with the project, how can i compile everything again.
|
|
|
Post by n00b on Jun 15, 2016 22:53:33 GMT -6
Here is a quick breakdown on how to compile each one/
rbc: If you have the GCC C++ compiler you should be able to just compile it. I don't link against anything to compile this.
rb_rt: You will have to link against SDL2, SDL2_image, SDL2_ttf, SDL2_gfx, SDL2_mixer, SDL2_net, Ogg, Vorbis, Theora, and pThread. Here is what my linker settings look like on ubuntu: -lSDL2 -lSDL2main -lSDL2_image -lSDL2_ttf -lSDL2_mixer -lSDL2_gfx -lSDL2_net -logg -lvorbis -lvorbisfile -ltheora -ltheoradec -pthread
editor (rc_ide): To compile this you will need to install wxGtk 2.8. The way I compile this is I setup a new wxWidgets project named rc_ide in codeblocks and use wxSmith as the editor. Then replace rc_ideMain.cpp, rc_ideApp.cpp, rc_ideMain.h, rc_ideApp.h files that codeblocks creates with the files included in the rcbasic source code. Also replace the rc_ideframe.wxs in the wxsmith folder created in the new project with the file in the rcbasic source code. In the linker settings add std, stc, and aui to the wxconfig line.
|
|
|
Post by sdlbasic on Jun 20, 2016 6:19:37 GMT -6
Well, i compile the rbc and everything went ok, then i tried to create the gui.cbc but it hangs an nothing, the i tried to compile the vm, still pumps lots of warnings but compiles, the i tried to run and got segmentation, the i run with valgring and it looks like problems with std::string and newarray, could you rename everything to a better name and file system, like no debug no release folders, maybe just a folder for each rbc abnd rt, no ide needed, and only the files needed to compile the vm.? Thanks.
|
|
|
Post by n00b on Jun 21, 2016 10:01:58 GMT -6
I found the problem. It wasn't in the vectors but the ridiculous use of memory that was being allocated. I am currently doing a heavy rewrite of the core part of the compiler. The runtime doesn't suffer from this because the compiled *.cbc file tells the runtime how much memory to allocate for numbers, strings, and the code and data segments in its header. It should only take me another week to finish this. I will post some better instructions on how to compile everything when I post the updated code to github. I have been making drastic changes to the code so the old code is mostly gonna be useless. I will also be updating the documentation to reflect the new features implemented in this next version. I appreciate the help. Also off topic, I will try to get a hold of SoloGK and see if he is going to be back on the sdlBasic forum. I haven't heard from him in almost a week. Thanks.
|
|
|
Post by n00b on Jul 3, 2016 10:14:00 GMT -6
I just uploaded the latest linux release. This release comes as binaries so there is no need to compile. It also comes with the editor finally.
|
|