It is currently Sat Aug 22, 2020 4:28 am


All times are UTC




Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: PolyVox::LargeVolume
PostPosted: Fri Nov 22, 2013 10:45 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Interesting... it would be useful to have some knowledge of how it is getting to this state. Are you running a debug build when executing it on your own? If so, you should get the option to launch the debugger when it crashes. Or perhaps you can run it yourself, attach the debugger while it runs, and then it should drop into it when it crashes. The debugger should give much more useful information than the assert.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox::LargeVolume
PostPosted: Sat Nov 23, 2013 7:53 am 
User avatar

Joined: Thu Sep 05, 2013 3:38 am
Posts: 51
Location: USA - Arizona
I'm running in release mode, I compiled the static library and compiled it in release mode. The only thing I changed was Runtime Library-Multithreaded (/MT) so it would compile in the project making use of polyvox, which uses a library I purchased that comes pre compiled with a /MT version..it does work executing it through msvc2012 unfortunately only I can run the program

_________________
Dream Big Or Go Home.
ENet - http://enet.bespin.org
Recast - https://github.com/memononen/recastnavigation
Irrlicht - http://irrlicht.sourceforge.net/forum
PolyVox - http://www.volumesoffun.com/phpBB3/
Help Me Help You.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox::LargeVolume
PostPosted: Mon Nov 25, 2013 10:33 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
What happens if you make a debug build but run it from outside the IDE? I.e. is the crash a result of debug vs. release or a result of 'in IDE' vs. 'not in IDE'? Also be aware that when running in the IDE you have the option of whether or not the debugger should actually be attached to the process.

Something else you can try is to comment out the relevant assert and set 'm_pLastAccessedBlock' to '0' instead. That is:

Code:
// POLYVOX_ASSERT(pUncompressedBlock != m_pLastAccessedBlock, "Attempted to delete last accessed block.");
m_pLastAccessedBlock = 0;


Does that help or does it just crash elsewhere?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox::LargeVolume
PostPosted: Mon Nov 25, 2013 3:51 pm 
User avatar

Joined: Thu Sep 05, 2013 3:38 am
Posts: 51
Location: USA - Arizona
It's a result of IDE vs no IDE, adding that piece of code didn't help. :( I wish we could get this taken care of :D

_________________
Dream Big Or Go Home.
ENet - http://enet.bespin.org
Recast - https://github.com/memononen/recastnavigation
Irrlicht - http://irrlicht.sourceforge.net/forum
PolyVox - http://www.volumesoffun.com/phpBB3/
Help Me Help You.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox::LargeVolume
PostPosted: Mon Nov 25, 2013 6:24 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
kklouzal wrote:
It's a result of IDE vs no IDE...


So in this case it still crashes if you run a debug version outside of the IDE? I think it should be possible to attach the debugger after it has crashed... or it should pop up a dialog where one of the options is to launch the debugger. Does this not happen?

kklouzal wrote:
...adding that piece of code didn't help.


Did you comment out the assert as well? What is the new behaviour - does it give a different assert or just crash somewhere else?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox::LargeVolume
PostPosted: Tue Nov 26, 2013 2:53 pm 
User avatar

Joined: Thu Sep 05, 2013 3:38 am
Posts: 51
Location: USA - Arizona
I'm sorry, after commenting out the code it crashes with this every time:
Image
And still runs fine through the debugger, previously before modifying the LargeVolume.inl I would notice the same error displayed in this screenshot although it was a very rare occurrence.

_________________
Dream Big Or Go Home.
ENet - http://enet.bespin.org
Recast - https://github.com/memononen/recastnavigation
Irrlicht - http://irrlicht.sourceforge.net/forum
PolyVox - http://www.volumesoffun.com/phpBB3/
Help Me Help You.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox::LargeVolume
PostPosted: Tue Nov 26, 2013 9:41 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
The error message which is being printed to the console suggests that there is a problem writing to the filesystem. It's coming from this point in PolyVox:

Code:
FILE* pFile = fopen(filename.c_str(), "wb");
if(!pFile)
{
   POLYVOX_THROW(std::runtime_error, "Unable to open file to write out block data.");
}


I guess you don't have any exception handling in your application? It's not clear why this problem occurs, but perhaps you don't have write permoission in the current folder? Maybe you need to adjust the relevant part of the code to print out the name of the file it is trying to run? Or what if you run the program as an administrator?

But overall you do need to handle exceptions, or the program is just going to crash whenever an exception is thrown.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox::LargeVolume
PostPosted: Wed Nov 27, 2013 3:59 pm 
User avatar

Joined: Thu Sep 05, 2013 3:38 am
Posts: 51
Location: USA - Arizona
Running it as administrator has no effect, I've changed the output directory PolyVox writes to a few times and have made sure there is write access to that directory.

_________________
Dream Big Or Go Home.
ENet - http://enet.bespin.org
Recast - https://github.com/memononen/recastnavigation
Irrlicht - http://irrlicht.sourceforge.net/forum
PolyVox - http://www.volumesoffun.com/phpBB3/
Help Me Help You.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox::LargeVolume
PostPosted: Thu Nov 28, 2013 11:34 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Maybe you can try and do some further tests to narrow down the problem? Unfortunately it's very hard for me to say what is wrong when it is failing in such a specific scenario. If I were you I would modify PolyVox to print out extra information for debugging purposes, and/or try reproducing the problem in a simpler program. It appears to be a standard call to fopen() so there's only a limited number of things which can be going wrong. You could consider:

  • Am I right about where it is crashing (add some printf()'s to see)?
  • Is the filename valid (try printing it out)?
  • Does it already exist?
  • Is it already open?
  • Can you create the file manually in the specified directory?
  • Can you write a simple C program in a few lines which reproduces the problem?

These are just examples though... the point is that trying a number of tests like this might help give some insight into what is going on.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox::LargeVolume
PostPosted: Thu Nov 28, 2013 7:52 pm 
User avatar

Joined: Thu Sep 05, 2013 3:38 am
Posts: 51
Location: USA - Arizona
Thanks I appreciate you taking the time to help here :) I'll try to narrow it down for you.

_________________
Dream Big Or Go Home.
ENet - http://enet.bespin.org
Recast - https://github.com/memononen/recastnavigation
Irrlicht - http://irrlicht.sourceforge.net/forum
PolyVox - http://www.volumesoffun.com/phpBB3/
Help Me Help You.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net