Homebrew [Question] ctrulib and C++ Exceptions?

Lizalfos

New Member
OP
Newbie
Joined
Mar 26, 2015
Messages
1
Trophies
0
XP
115
Country
Gambia, The
Hi,
I'm working on a homebrew project written in C++
At some point, the app crashes and on real hardware it's saying:
"terminate called after throwing an instance of 'std::bad_alloc' terminate called recursively"
So i tried to simply wrap a try-catch around some lines of code
but i can't compile it anymore.

I've changed
Code:
CXXFLAGS    := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
to
Code:
CXXFLAGS    := $(CFLAGS) -fno-rtti -std=gnu++11
in my project makefile, and also for ctrulib and i've recomplied everything,
but i still get the same error during linking:
Code:
linking template.elf
11621045 relSymAddr=00CBBF2D relSrcAddr=001AB684 topAddr=001C0000
Relocation to invalid address!

Can anybody help me please?
 

filfat

CTO @ Nordcom Group Inc.
Member
Joined
Nov 24, 2012
Messages
1,261
Trophies
1
Location
Gothenburg, Sweden
Website
www.sweetsideofsweden.com
XP
1,749
Country
Sweden
Hi,
I'm working on a homebrew project written in C++
At some point, the app crashes and on real hardware it's saying:
"terminate called after throwing an instance of 'std::bad_alloc' terminate called recursively"
So i tried to simply wrap a try-catch around some lines of code
but i can't compile it anymore.

I've changed
Code:
CXXFLAGS    := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
to
Code:
CXXFLAGS    := $(CFLAGS) -fno-rtti -std=gnu++11
in my project makefile, and also for ctrulib and i've recomplied everything,
but i still get the same error during linking:
Code:
linking template.elf
11621045 relSymAddr=00CBBF2D relSrcAddr=001AB684 topAddr=001C0000
Relocation to invalid address!

Can anybody help me please?

libctru currently doesn't support Tray and Catch (eg exception handling ) which makes it a pain in the ass to develop for :/
#FeelYourPain
 
D

Deleted User

Guest
I had the same issue before. Turned out there was an issue in 3dsxtool. Try compiling 3dsxtool from the latest source and replacing your copy of it in devkitARM with the new one.
 

capz

Well-Known Member
Newcomer
Joined
Nov 28, 2014
Messages
74
Trophies
0
Location
cake town
XP
112
Country
Netherlands
for the record, most console devkits traditionally do not support exceptions and try-catch due to the overhead that comes with it. While annoying, there certainly are ways to work around this kind of issue. Does anyone know if exceptions work on vanilla firmware with ninjhax?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BakerMan
    The snack that smiles back, Ballsack!
  • ZeroT21 @ ZeroT21:
    I'd rather grab a best buy branded soldering iron that's worth crap
    +1
  • SylverReZ @ SylverReZ:
    @ZeroT21, It had a ceramic heating element similar to those RadioShack irons. The cable was quite short, didn't have an adjustable dial and was a 15W iron.
  • SylverReZ @ SylverReZ:
    Died just after two months of using it.
  • ZeroT21 @ ZeroT21:
    generic soldering irons were never made to last
    +1
  • SylverReZ @ SylverReZ:
    @ZeroT21, Exactly. They're only good if you're willing to practice soldering, not for the long run.
  • ZeroT21 @ ZeroT21:
    i only use 'em to fix my own home appliances or personal projects/mods
    +1
  • SylverReZ @ SylverReZ:
    Home appliances would be a soldering gun, including plumbing. Normal soldering irons are for hobbyist projects/modchip installs.
  • ZeroT21 @ ZeroT21:
    though i've heard plenty of people getting wrecked trying to ''fix'' their microwave
  • SylverReZ @ SylverReZ:
    @ZeroT21, Did somebody tell them to put something metal in there?
  • ZeroT21 @ ZeroT21:
    I'm wondering what's so hard about it
  • SylverReZ @ SylverReZ:
    🍆 <== This?
  • ZeroT21 @ ZeroT21:
    having bigger nuts than brains is genetic probably
    +1
  • SylverReZ @ SylverReZ:
    That's what they tried to tell you.
  • SylverReZ @ SylverReZ:
    Hypothetically.
  • ZeroT21 @ ZeroT21:
    People won't believe me anyways untill shit happens. Youtube teaches everything they say... so ima just sit back and enjoy the mayhem
    +1
  • SylverReZ @ SylverReZ:
    If brain small, does that mean bigger balls? :unsure:
  • ZeroT21 @ ZeroT21:
    no ,they have bigger balls
    +1
  • ZeroT21 @ ZeroT21:
    we can't possibly insinuate they have small brains, be modest and just tell 'em they have big balls so they feel better bout 'emselfs
    +1
  • SylverReZ @ SylverReZ:
    @ZeroT21, True lol.
  • BakerMan @ BakerMan:
    chat is this real?
    BakerMan @ BakerMan: chat is this real?