Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › Crashes are start sometimes?

Crashes are start sometimes?

Posts 1–2 of 2 · Page 1 of 1
Auxilium
Auxilium
Crashes are start sometimes?
My function causes the program at start to crash, but only sometimes.

Randomly meaning I'll run it once and it crashes, then the next 2 runs it works fine, then the next 3 crash, then the next one is fine, etc etc.

Note: this function is not close to finished, I just tested to see if it would put the letter values in the array of ints. It works because it couts the values correctly. The unused params now have no effect on it. Also, when i remove the delete before the return it always crashes.

TextFont.cpp
[HIGHLIGHT=D]
#include "Text-Font.h"
#include <iostream>
bool TextClass::WriteText(SDL_Surface* destination, int x, int y, const char* text)
{
int* stringLetterValues = new int;
for(int i = 0; i < (int)strlen(text); i++)
{
stringLetterValues[i] = (int)text[i];
std::cout << stringLetterValues[i] << "\n";
}
delete stringLetterValues;
return true;
}[/Highlight]
#1 · edited 15y ago · 15y ago
FO
Fovea
new int does not allocate an array.
Code:
int textLength = strlen(text);
int* stringLetterValues = new int[textLength];

/* other stuff goes here */

delete[] stringLetterValues;
#2 · 15y ago
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

  • puplic hack has been detected and are starting to ban peopleBy cablah in Combat Arms Hacks & Cheats
    7Last post 17y ago
  • Combat Arms crashes on start after new patchBy montugar in Combat Arms Help
    25Last post 16y ago
  • Trouble with the mod loader and an X-Ray mod; crash on start upBy FourteenthDarkKnight in Minecraft Help
    7Last post 15y ago
  • Game crash in start..By annaduh123 in Combat Arms Help
    7Last post 16y ago
  • poll on how many are crashingBy Spitfire133 in Combat Arms Hacks & Cheats
    32Last post 17y ago

Tags for this Thread

None