Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / STD::Out_Of_range error when using structures

Author
Message
zapakitul
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 8th Aug 2011 20:14
Hi, it's been a while since my last post in this forum section. I've been talking with a couple of team mates from work, and we came up with an idea for a game. Since I'm the only one of them who knows a little bit of code, I'm tasked with programming it (their 3D and concept artists). Anyway, I needed a way to make a GUI without having to write one myself (don't have enough free time), so I scanned the forum for resources and found PGUI by PaTTe. I kinda liked it so I tried to use. Everything went great until I tried to use the ListBox elements, especially when it came to adding items to rows, and rows to the List. Anyway, I have the following peaces of code:


which I initialise within my main class:

in order to use them like:

Everything compiles just thine, but the game crashes, outputing the following error: "STD:ut_of_range at memory #MemoryAddressGoesHere". I have no idea where the problem is, hence I'm turning to you guys. Any tips or hints?
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 8th Aug 2011 20:52
try removing stuff line-by-line, or using a debugger to figure out which line is causing the crash. Using std::cout to output the addresses of some variables you are allocating is also not a bad idea, since the error gives you an address.

from what I can tell nothing is wrong with your pointer arithmetic.


Why does blue text appear every time you are near?
zapakitul
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 8th Aug 2011 21:09
I tried debugging it and setting some conditions. I narrowed it down to this: wnd->getListBox("FldCnt")->addRow(pRows[0].rObj); . From what I understand, the problem is caused by getLisBox("FldCnt"). If I check to see if it's active, it shows up as false. I tried setting it to Active and then adding the Row(with the contents) to it to no avail.

Yet, on the PGUI tread, PaTTe has a screenshoot with a working ListBox. My only hope is that he didn't Hardcode all of the items inside it... Do you guys have any idea if I can contanct PaTTe for some info? (neither his email address, nor his MSN/Y!M id isn't displayed).

Login to post a reply

Server time is: 2024-11-19 08:26:25
Your offset time is: 2024-11-19 08:26:25