linux multithreaded? crash

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

linux multithreaded? crash

Postby MeltingPlastic » Sat Dec 29, 2018 4:54 pm

Hi Julio, on the latest sdk I am getting a crash on linux right at startup. It goes away when I set thread count to 1 in the Urho3D project. Also crashes right away in the sandbox.
MeltingPlastic
 
Posts: 221
Joined: Fri Feb 07, 2014 11:30 pm

Re: linux multithreaded? crash

Postby MeltingPlastic » Sat Dec 29, 2018 4:56 pm

potential seperate bug: I also get an assert on startup:
https://drive.google.com/open?id=1F4co8Xqb4pn-y88BJS_2_Zo8BWt6hJKM
MeltingPlastic
 
Posts: 221
Joined: Fri Feb 07, 2014 11:30 pm

Re: linux multithreaded? crash

Postby Julio Jerez » Sat Dec 29, 2018 6:34 pm

on the secund try moving the assert to the end of the function and see what the error message is,
like this:
Code: Select all
void DemoEntityManager::ErrorCallback(int error, const char* description)
{
   dTrace (("Error %d: %s\n", error, description));
   fprintf(stderr, "Error %d: %s\n", error, description);
   dAssert (0);
}


The first one is difficult to say, if it crashes on startup at the point the engine has not been initialized. , as far as I remember, the engine does not have static variables, but if it has any it does no allocate any memory or does anything special wit threaded.
That not the case for teh support library which do make heavy use of meta data for call registration, so maybe there is a order dependence there in Linux.
Julio Jerez
Moderator
Moderator
 
Posts: 10993
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: linux multithreaded? crash

Postby Julio Jerez » Sun Dec 30, 2018 8:43 pm

I finally gave myself a holyday present and bought a $600.00 cheap laptop.
an Acer Aspire 3 A315-41-R8UU with a
Ryzen 5 2600 cpu (2 gz, a quad core hyper threaded) Vega 8 GPU, and all the other standard stuff.
Is not really a front runner PC but of the entry level is not too bad.

I am now installing Linux in a partition, and that's run out to be a nightmare,
not sure why teh made so difficult, so install anoteh OS, but you really have to dig on the wevsite for figure out hwo to do it.

anyway afte that done I see if I can build the engine and what kind of perfemance we get on a endtry leve Linux Box.
Julio Jerez
Moderator
Moderator
 
Posts: 10993
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: linux multithreaded? crash

Postby Julio Jerez » Mon Dec 31, 2018 7:12 pm

I finally cleaned up all the warnings and now the make file complete a clean build,
the problem I have now is where is the executable?

when build finish it end with this
[100%] Building CXX object applications/demosSandbox/CMakeFiles/demosSandbox.dir/sdkDemos/demos/UsingNewtonMeshTool.cpp.o
[100%] Linking CXX executable demosSandbox
symbolic link resources folder from /home/julio/Desktop/newton-dynamics/applications/media => /home/julio/Desktop/newton-build/applications/media
[100%] Built target demosSandbox
julio@julio-Aspire-A315-41:~/Desktop/newton-build$


but when I browse the build folder for an elf demosSandBox i do not find it anywhere.
I do see a file by that name, with that name but none are executable.
Do you know where the make file place the elf file?
Julio Jerez
Moderator
Moderator
 
Posts: 10993
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: linux multithreaded? crash

Postby Julio Jerez » Mon Dec 31, 2018 7:31 pm

in the is a file /applications/demosSandBox/demosSandBox

by the type say is unknown and when I click on properties it say it is a share library, ther most by some ther executable somewhere, but I do know where.
I do not understand how this works and is quite frustration, I wasted so much time on this already and I do seem to make any progress.
Julio Jerez
Moderator
Moderator
 
Posts: 10993
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: linux multithreaded? crash

Postby MeltingPlastic » Thu Jan 03, 2019 2:58 pm

the sandbox works for me now. however the sandbox crashes instantly when changing threads to anything higher than 1.

https://youtu.be/2Z6AJcutah8

Also I do not think it is standard practice to have a custom "BUILD_CONFIGURATION" option in cmake. Usually you specify the configuration you want from outside of cmake via a switch:

like:
Code: Select all
cmake -DCMAKE_BUILD_TYPE=Debug


see: https://stackoverflow.com/questions/7724569/debug-vs-release-in-cmake
MeltingPlastic
 
Posts: 221
Joined: Fri Feb 07, 2014 11:30 pm

Re: linux multithreaded? crash

Postby Julio Jerez » Thu Jan 03, 2019 3:29 pm

Ah I see, can you modify the cake script so that it does it the right way.

Also after yo run the make command, how do yo run the executable, I do not find the generate executable on the entire computer.

In the pass the output was a file with the extension .elf
Julio Jerez
Moderator
Moderator
 
Posts: 10993
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: linux multithreaded? crash

Postby MeltingPlastic » Thu Jan 03, 2019 5:17 pm

Here is the most common flow for any cmake project. In fact this is what qtcreator for example uses by default under the hood.

Code: Select all

#clone first of course.
git clone https://github.com/MADEAPPS/newton-dynamics/

# move into the source tree
cd newton-dynamics

# make a build directory to keep everything related to the project build seperate
mkdir build

#move into the build directory
cd build

#run cmake specifying release mode referencing the source one directory up hence the ".."
cmake .. -DCMAKE_BUILD_TYPE=Release

#build the project leveraging cmake.  All executables will be built:
cmake --build . --target 'all' -- j

#move to the directory were built executable is.
cd applications/demosSandbox

#run the executable
./demosSandbox



I sent a pr with the cmake change.
Last edited by MeltingPlastic on Thu Jan 03, 2019 6:26 pm, edited 1 time in total.
MeltingPlastic
 
Posts: 221
Joined: Fri Feb 07, 2014 11:30 pm

Re: linux multithreaded? crash

Postby Julio Jerez » Thu Jan 03, 2019 5:53 pm

I do not see any pm,
and I still do not know how to run the generated propgram, I see in your video you have a folders
crateGame and a debug, release, … folder is hard to read it because it is all blurry
but I do not find those folder anywhere.

I made a folder on teh desktop called NewtonBuild, bu there I only see teh lib, and the a mirror of the director that contain the source files, at tshi point I do not know how to proceed.
Julio Jerez
Moderator
Moderator
 
Posts: 10993
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: linux multithreaded? crash

Postby MeltingPlastic » Thu Jan 03, 2019 6:11 pm

https://github.com/MADEAPPS/newton-dynamics/pull/141

The different options you see in the video are not folders, they are configurations that qtcreator keeps track of.

I would start over and use a terminal and enter the commands in my last post.

The executable should just be a file called demosSandbox with no extension but is marked as a executable.
MeltingPlastic
 
Posts: 221
Joined: Fri Feb 07, 2014 11:30 pm

Re: linux multithreaded? crash

Postby MeltingPlastic » Thu Jan 03, 2019 6:33 pm

Here is a quick vid of the basic process:
https://youtu.be/i8QxAXU1vV8

you can also download qtcreator to get a good "ide" experience. It can literally open up a CMakeLists.txt file
MeltingPlastic
 
Posts: 221
Joined: Fri Feb 07, 2014 11:30 pm

Re: linux multithreaded? crash

Postby Julio Jerez » Thu Jan 03, 2019 6:46 pm

I am trying again before getting qtcreator, but I do not think I am doing it wrong, there is not demoSanbox file even the make file say is succeeded. I never seen anything like that.
Julio Jerez
Moderator
Moderator
 
Posts: 10993
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: linux multithreaded? crash

Postby Julio Jerez » Thu Jan 03, 2019 6:51 pm

ups my mistake, I was trying to run from ./application intead of from
./application/demosSanbox
ok I can launch it now, let us see what is that crash with multiplthreads.
Julio Jerez
Moderator
Moderator
 
Posts: 10993
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: linux multithreaded? crash

Postby Julio Jerez » Thu Jan 03, 2019 6:53 pm

multithread crashes to the desktop, what debugger do you used.
Julio Jerez
Moderator
Moderator
 
Posts: 10993
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Next

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 1 guest

cron