Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Compilation warnings and random crashes
Compilation warnings and random crashes [message #60585] Wed, 22 May 2024 00:10 Go to next message
Novo is currently offline  Novo
Messages: 1363
Registered: December 2006
Ultimate Contributor
I get a bunch of warnings like below when compiling on MacOS 10.15:
/Users/XXX/dvlp/cpp/code/upp/git/uppsrc/ide/RepoSync.cpp:283:6: note: use non-reference type 'Upp::KeyValueRef<Upp::String, int>'
        for(const auto& w : ~work) {
            ^~~~~~~~~~~~~~~

Basically, a reference is pointing to a temporary object.

And I'm getting random crashes with TheIDE when launching it on Linux (I'm not using a binary compiled on MacOS Smile)

I guess, these crashes and references to temporary objects are related.

TIA


Regards,
Novo

[Updated on: Tue, 28 May 2024 20:31]

Report message to a moderator

Re: Compilation warnings and random crashes [message #60593 is a reply to message #60585] Sun, 26 May 2024 06:54 Go to previous message
Novo is currently offline  Novo
Messages: 1363
Registered: December 2006
Ultimate Contributor
VectorMap<String, int> work;

work is VectorMap ...
MapKVRange<AMap, K, T> operator~()                   { return MapKVRange<AMap, K, T>(*this); }

operator~() returns a newly created object.
So, compiler is right: you are referencing temporary objects ...


Regards,
Novo
Previous Topic: [DONE]Alt-I, Virtual methods - do not work.
Goto Forum:
  


Current Time: Sun Jun 16 13:35:43 CEST 2024

Total time taken to generate the page: 0.01237 seconds