Game Development Community

Torque stops working after initializing a git repository

by Duion · in Torque 3D Professional · 07/23/2013 (3:31 pm) · 13 replies

I created a default full template with bullet physics, generated the project and compiled it, then I launched it and all run fine.
Then I initialized a git repository in the project, launched again and now it crashes when I click on "play" or "world editor", the other buttons work.
Any ideas why just making a git repository crashes the program?

The precompiled version works fine with this.

After I made a debug build I got an error message "GBitmap::allocateBitmap: with or height is 0" in gbitmap.cpp [276]

That's all I could find, maybe it has something to do with the menu GUI, because if I first open the GUI editor and then open the world editor I get into the game and the problem is gone, but after a restart of the game the error is back in.

#1
07/23/2013 (3:38 pm)
Duion,

Grats on the Steering Committee! You were my first recommendation to them and I am very happy for you. You also have a TON of work ahead of you :-).

As for Git, it is a pain in the ***. to work with sometimes. The only time I ran into this issue was when an update was pushed/merged to my repo that was not properly 'functional'. Now of course, this also depends on if you have merged any new changes to your repo. I am assuming you are working from the dev branch? Anyway, just a suggestion from my experience with Git. Check the latest merge stuff and see if there is anything related to the bitmap stuff. You may have ID'ed an error.
Might help, might not....

Ron
#2
07/23/2013 (3:40 pm)
We are dealing with a fresh default template with absolutely no changes made, I just made "git init" and after that it was broken.
#3
07/23/2013 (3:57 pm)
You can double check by deleting the .git directory in your project to see if the buttons work again. Which directory did you create the git repository in? The game/ folder or the one above?
#4
07/23/2013 (4:05 pm)
Deleting the .git directory does not change it and the .git repository is in the game/ folder.
The console.log does not say much also it ends with:
"
% - Initializing Shape Editor
Engine initialized...
Window focus status changed: focus: 1
"
#5
07/23/2013 (7:09 pm)
Hmmm, that is odd. The last line is all about you killing T3D as an app. (you shift window focus to kill it). As for the initialized state, technically the visuals/engine should start. This is an odd one.

Ron
#6
07/23/2013 (7:29 pm)
Line endings ? That might affect a recompiled exe.
Git uses UNIX lien endings, windows are not the same, basically
Hope that's it

dealing with line endings
#7
07/24/2013 (1:02 am)
Yeah but just doing a git init should touch no files. I had to leave home today before I could try reproducing the issue, but I'll give it a go when I get back tonight. It kind of sounds like the engine is searching the .git directory for level files. Only thing I can think of that might be trying to allocate a bitmap with an arbitrary filename. Can you see what filename the bitmap is trying to use?
#8
07/24/2013 (4:39 am)
I think it is the line ending thing, because I also committed the thing and he gave me warnings because of file endings, he always does this, but so far I never did a recompile after this.
A recompile does not only cause this problem, but also others, for example the bug that you can no longer walk through holes in terrain in Torque3D 3.0, I reported some time ago, in reality came from the recompile bug thing, because with the precompiled version the bug was not there.
Just checked with my actual compiled version and yes the terrain hole bug was also there, I found a way to enter the game anyway, I found that you can click the GUI editor first and from the GUI editor you get into the world editor and then it works.

But so far I have no idea how to compile correctly, I set git to "git config --global core.autocrlf true", but did not help, my own compile is still crap.
#9
07/24/2013 (11:33 am)
Depending on how you set up git on windows it should by default checkout windows line endings and push unix line endings.

as for git mangling your files, i was pretty sure that isnt possible, are you sure you dont have an iffy disk? or a bad copy originally? i ask this because i recently had an issue with a SSD which basically just ignored certain files that couldn't be read correctly which caused similar issues
#10
07/24/2013 (12:03 pm)
My compiled .exe is broken somehow and it was also before this issue, this just revealed it one more time.
You can check with your own compile if you can walk through holes in the terrain, because I cannot, but with the pre-compiled version I can.
So I would like to know how to compile it correctly.
#11
09/06/2013 (12:18 pm)
Update: Having the same problem now, but without initing a git repository, so git seems to not play the major role here.
The problem appears after I compiled the game, run it, let him generate the model dsq and so on, then go into the game, close, start again and when I started again when I click play the game shuts down, no error message or no log, the window just disappears. I still can load the levels through Gui editor and then change to world editor, but not straight through the play button.
Maybe the autogenerated files after the first launch cause a problem, but no idea which so far.

edit: the error seems to occur when he tries to load the "chooseLevelDlg.gui"
#12
09/06/2013 (3:01 pm)
Solved for the first: Further it is the "next-button_i.bmp" that got autogenerated by the engine and was somehow corrupted, I solved it by changing the bitmap mode in "GuiBitmapButtonCtrl" in the GUI-editor in "chooseLevelDlg.gui" from stretched to centered, this stops the crashes and also the generation of this bmp. Maybe he tried to stretch the button to 0 in size and crashed. No idea what is going on there.
#13
09/06/2013 (4:51 pm)
That's pretty crazy! No idea how that went so wrong.