Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increased stability Torque3D: unit-tests running without a crash. #594

Merged

Conversation

@LuisAntonRebollo
Copy link
Contributor

@LuisAntonRebollo LuisAntonRebollo commented Apr 1, 2014

See the console.log after ran unitTest_runTests( "", true ). Based on a @signmotion PR #562

I added small changes to make all unit test working.

@LuisAntonRebollo LuisAntonRebollo added this to the 3.6 milestone Apr 1, 2014
@LuisAntonRebollo LuisAntonRebollo changed the title Increased stability Torqu3D: unit-tests running without a crash. Increased stability Torque3D: unit-tests running without a crash. Apr 1, 2014
@crabmusket
Copy link
Contributor

@crabmusket crabmusket commented Apr 2, 2014

I will give this a test tonight! Thanks for the clean up.

@crabmusket
Copy link
Contributor

@crabmusket crabmusket commented Apr 2, 2014

So the unit tests run fine (706,000 sub-tests??) - there are expected to be some failures at this point, right? - but when I close the engine I get a crash in mlock.c during the editor settings XML writing. This doesn't happen if I haven't run the unit tests. Visual Studio 2012, Windows 7 x64.

EDIT: Just remembered I made some changes to the script template I was testing with. Will re-run with just Full.

EDIT: Happens with stock Full template, Debug build. The line that causes the crash is this:

LeaveCriticalSection( _locktable[locknum].lock );
@LuisAntonRebollo
Copy link
Contributor Author

@LuisAntonRebollo LuisAntonRebollo commented Apr 6, 2014

It seems that there is a problem during global ThreadPool destuctor.

Fixed using a local ThreadPool for the test.

I create an issue #599 to investigate the problem later.

@crabmusket
Copy link
Contributor

@crabmusket crabmusket commented Apr 22, 2014

Okay, I merged this into the latest development locally and I'm getting a debug break during the Journal tests - though in VS I can just click 'continue' and the tests continue, so it's not a crash. This is in debug build. However I also have a crash on quit when running this with a CMake-generated project (even without running any tests). I'll look into it further.

@LuisAntonRebollo
Copy link
Contributor Author

@LuisAntonRebollo LuisAntonRebollo commented Apr 22, 2014

I'm getting a debug break during the Journal tests

I will try to reproduce the problem.

However I also have a crash on quit when running this with a CMake-generated project (even without running any tests). I'll look into it further.

I'm working on solve this.

@crabmusket
Copy link
Contributor

@crabmusket crabmusket commented Apr 22, 2014

Not convinced I'll be able to reproduce the Journal break for you, but I'll give it a go. It hung up in a couple of different places in the Windows platform code.

@LuisAntonRebollo
Copy link
Contributor Author

@LuisAntonRebollo LuisAntonRebollo commented Apr 23, 2014

However I also have a crash on quit when running this with a CMake-generated project (even without running any tests). I'll look into it further.

Fix crash on exit T3D when build with CMake. #628

I'm getting a debug break during the Journal tests

I'll check tomorrow.

@LuisAntonRebollo
Copy link
Contributor Author

@LuisAntonRebollo LuisAntonRebollo commented May 10, 2014

I have merged with development branch + #628 and i get a crash when execute the unit tests (after test are finished or at app exit).

HEAP: Free Heap block ADDRESS modified at ADDRESS after it was freed

So far I could not find the cause ... I have to dedicate more time.

…the console.log after ran unitTest_runTests( "", true ). @signmotion
@@ -52,5 +52,7 @@ CreateUnitTest(TestingProcess, "Journal/Process")
for(S32 i=0; i<30; i++)
test(Process::processEvents(), "Should quit after 30 ProcessEvents() calls - not before!");
test(!Process::processEvents(), "Should quit after the 30th ProcessEvent() call!");

Process::remove(this, &TestingProcess::process);

This comment has been minimized.

@LuisAntonRebollo

LuisAntonRebollo May 25, 2014
Author Contributor

Forgot to remove TestingProcess::process form Process's signal. This cause Process notify a deleted object and corrupt memory.

@LuisAntonRebollo
Copy link
Contributor Author

@LuisAntonRebollo LuisAntonRebollo commented May 25, 2014

I think i have fixed the problem, not related to ThreadPool (reverted changes... i need to close #599).

Forgot to remove TestingProcess::process form Process's signal. This cause Process notify a deleted object and corrupt memory.

Anyone can verify that everything is working properly?

@crabmusket
Copy link
Contributor

@crabmusket crabmusket commented Jun 16, 2014

Seems to be working.

crabmusket added a commit that referenced this pull request Jun 16, 2014
Increased stability Torque3D: unit-tests running without a crash.
@crabmusket crabmusket merged commit feec367 into GarageGames:development Jun 16, 2014
1 check passed
1 check passed
@LuisAntonRebollo
default Merged build finished.
Details
@LuisAntonRebollo LuisAntonRebollo deleted the LuisAntonRebollo:unit-tests-without-crash branch Jun 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants