Memory and crashing

Steve Albin steve at steve-albin.com
Tue Jul 3 08:37:29 CDT 2007


On Tuesday, July 3, 2007 IvanSmahin at public.kherson.ua (Ivan Smahin) wrote:

>Hello Steve,
>
>Tuesday, July 3, 2007, 7:02:23 AM, you wrote:
>
>SA> I have one Windows user that is constantly getting a hard Windows
>SA> crash when executing a certain SQL statement in my app.  I feel
>SA> certain it is the SQL because I have the Valentina log turned on
>SA> and it ends without returning from the call.  My other Mac and
>SA> Windows users are not having a problem with this same code.  
>
>SA> I obtained an exact copy of the database and I was only able to
>SA> recreate the crash in Windows if I started lots of other
>SA> applications before firing up Parallels on my Mac to run Windows. 
>SA> My theory is that the app is running out of memory while trying to
>SA> execute a complicated SQL statement.
>
>SA> My question is this:  Is it expected for an app to have a hard
>SA> crash if it can't get enough memory?  Is this something that
>SA> bypasses the normal exception processing?
>
>SA> This user has the largest database by far of all my users and
>SA> only has 1GB of memory for Windows XP.  Does 1GB of memory seem
>SA> like enough for a Valentina app?  My knowledge of Windows is
>SA> rudimentary so I really don't have a handle on this.
>
>SA> I'm programming in REALbasic 2007r3 if that makes a difference.
>
>
>So, it is the same database structure for all users - right?
>And that user has biggest database.
>Generally  we  are  expecting  out  of  memory situation but
>obviously not always.
>
>Can you send me the project and empty database and tell me the way I can easy
>fill it with data to test it here?
>
>On the other hand the only thing we can do - throw some exception
>instead of crashing. I don't think it will be suitable for that user.
>


The DB structure is the same for all users.  As I said, I have an exact copy, but it crashes for me only if I make an exceptional effort to grab memory with other apps first.  

If it makes a difference, here is the SQL in question:

Select issues.recid, issues.*,  Perfs.nPerfRef,  Types.cTypeName, Types.nSortOrd,   
Labels.cLabel,    IssPerfs.nPerfId, perfs.nperfid, Types.nId, Labels.nid, 
IssPerfs.nIssueId, perfs.nsessid  
From issues, issPerfs, perfs,  Labels, Types  
Where perfs.nsessid =  977 
AND  IssPerfs.nPerfId = perfs.nperfid  
AND  Issues.cFormat = Types.nId  
AND Issues.nlabelId = Labels.nid  
and IssPerfs.nIssueId = Issues.nId  
ORDER BY Types.nSortOrd, Issues.dIssueDate, Issues.cTitleIdx 


Here is a place to download a copy of the starter DB I give to users.  This DB has the same structure as my user, but obviously a lot less data.
    <http://www.jazzdiscography.com/Brian/download/BrianDB.zip>
    

Can you please clarify your answer.  Are you saying that a crash on out of memory is something that can be expected in situations like this?  Is it reasonable for me to conclude that I should tell this user to get more memory because there is nothing I can do?

Why wouldn't Valentina throw an exception rather than crash?

I can live with not having an exception. I think 1GB of memory is rather small for any computer, especially someone using database apps.  But I would like to know if this is a reasonable assumption.

Thanks,

Steve

-- 
Steve Albin - Montclair, NJ
http://www.jazzdiscography.com/
http://www.steve-albin.com/


More information about the Valentina mailing list