Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Thread Tools
Old 07-29-10, 11:43 AM   #1
Registered User
Join Date: May 2009
Posts: 13
Default Opengl throws std::bad_alloc - but why?

I'm writing a mapping application (C++) on ubuntu, but while I still have loads of free memory, opengl is throwing this exception. (well I assume its opengl, I'm using GTKMM)

I'm using drivers 256.40 running on kernel 2.6.31-22-generic 32 bit.

The PC has 3Gb of RAM and system monitor shows the app using just under 80Mb of RAM, but with less than 20% of total system RAM used.

I quadrupled the stack limit, just in case it was stack related, but this didn't make any difference. most other settings are unlimited. I'm miles away from 32 bit limit's here by the looks of it.

How can I track down where the problem really is?

ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 20
file size               (blocks, -f) unlimited
pending signals                 (-i) 16382
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 32768
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
pootle is offline   Reply With Quote
Old 07-29-10, 12:05 PM   #2
NVIDIA Corporation
AaronP's Avatar
Join Date: Mar 2005
Posts: 2,487
Default Re: Opengl throws std::bad_alloc - but why?

I don't think OpenGL ever throws C++ exceptions, so it must be GTKMM doing it. Can you get a backtrace where the exception is thrown? If you'd like somebody to take a look, please attach a standalone test case that reproduces the problem.
AaronP is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 09:23 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.