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 » Community » Newbie corner » Program didn't exit in Task Manager after click [X]
Re: Program didn't exit in Task Manager after click [X] [message #55405 is a reply to message #55403] Sat, 07 November 2020 20:25 Go to previous messageGo to previous message
peterh is currently offline  peterh
Messages: 108
Registered: November 2018
Location: Germany
Experienced Member
While debugging I find something suspicious in Core Socket.cpp at line 287 in the constructor of TcpSocket:

TcpSocket::TcpSocket()
{
	ClearError();
	Reset();
	timeout = global_timeout = start_time = Null; //<---- Confusion about NULL and Null?
	waitstep = 10;
	asn1 = false;
}


"Null" is the special "Nuller" of upp and evaluates to 0x8000 0000 here.
If "(int) Null" is propagated to signed 64 bit it gives 0xffff ffff 8000 0000, if "NULL" is propagated it gives 0x0000 0000 0000 0000.
(int) Null / 10000000 will NOT give zero microseconds. There are wrong timeout calculations in this program, and possibly in Upp source.
This is very dangerous, probably you must turn on warnings about unintended implicite int int64 conversions for compilation.
This leads to different behaviour (which I have observed) , when the program is compiled to 32 or 64 bit and I believe there is a bit of confusion about NULL and Null.
However fixing this, improves, but does not fix the current problem.

[Updated on: Sun, 08 November 2020 00:41]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: report generator
Next Topic: Pie Chart in U++?
Goto Forum:
  


Current Time: Thu May 16 18:41:27 CEST 2024

Total time taken to generate the page: 0.01852 seconds