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
Today's Messages (off)  | Unanswered Messages (on)

Forum: U++ community news and announcements
 Topic: Win32: CLANG updated to new version (11.0.0 - llvm-mingw 20201020)
Win32: CLANG updated to new version (11.0.0 - llvm-mingw 20201020) [message #55653] Fri, 27 November 2020 23:07
mirek is currently offline  mirek
Messages: 12952
Registered: November 2005
Ultimate Member
No Message Body
 Topic: ide: Open Terminal at...
ide: Open Terminal at... [message #55648] Fri, 27 November 2020 11:46
mirek is currently offline  mirek
Messages: 12952
Registered: November 2005
Ultimate Member
at package folder
at file folder
at output directory folder

PATH is carried over from the active build method...

Mirek
Forum: U++ Developers corner
 Topic: Uppiverse2
Uppiverse2 [message #55566] Sun, 22 November 2020 09:03
mirek is currently offline  mirek
Messages: 12952
Registered: November 2005
Ultimate Member
More testing data...

UPPIVERSE_BEGIN
{
  "links": [
    "https://www.ultimatepp.org/forums/index.php?t=msg&th=11264&start=0&"
  ]
}
UPPIVERSE_END

[Updated on: Sun, 22 November 2020 09:17]

Report message to a moderator

Forum: U++ SQL
 Topic: MySqlSession Close and Reconnect crashes Application
MySqlSession Close and Reconnect crashes Application [message #55629] Wed, 25 November 2020 17:17
hoelblin is currently offline  hoelblin
Messages: 1
Registered: November 2020
Location: Austria
Junior Member
Hi,

I have an Application with a Connection to MySql. When the Application is Idle for
a long Period of Time the Connection is Closed with session.Close.

After that session.IsOpen returns false.

When I try to reconnect with session.Reconnect() the App Crashes with a Null Pointer dereference.
It seems like in Sql.Cancel cn->cancel is called while Member cn == NULL.

This behavior is on TheIDE Version 15512 on Windows with CLANG, on TheIDE 13664 with minGW this works as
expected without crashing.

To reproduce the Crash i have taken the SQL_MySql reference Example and make some minor changes.

#include <MySql/MySql.h>

// debian: sudo apt-get install libmysqlclient-dev

using namespace Upp;

#define SCHEMADIALECT <MySql/MySqlSchema.h>
#define MODEL <mysqlCrash/schema.sch>
#include <Sql/sch_header.h>
#include <Sql/sch_source.h>
#include <Sql/sch_schema.h>

CONSOLE_APP_MAIN
{
	MySqlSession session;
	// edit the connection parameters if necessary
	if(session.Connect("test_user", "test", "test")) {
		Cout() << "Connected\n";
		SQL = session;
		
		SqlSchema sch(MY_SQL);
		All_Tables(sch);
		// create the table if necessary
		SqlPerformScript(sch.Upgrade());
		SqlPerformScript(sch.Attributes());
		SQL.ClearError();


		try {
			// insert some random data
			SQL & Insert(TEST_TABLE)(VALUE, Uuid::Create().ToString());
			// fetch some data
			Sql sql;
			sql * Select(ID, VALUE).From(TEST_TABLE)
			                       .OrderBy(Descending(ID))
			                       .Limit(5);
			while(sql.Fetch())
				Cout() << AsString(sql[0]) << ": " << AsString(sql[VALUE]) << "\n";
		}
		catch(SqlExc &ex) {
			Cerr() << "ERROR: " << ex << "\n";
			SetExitCode(1);
		}
		
		session.Close();
		
		Sleep(2000);

		if(session.IsOpen()) {
			Cout() << "Connection closed FAILED!\n";
		} else {
			Cout() << "Connection closed!\n";
		}
		
		Sleep(2000);
		
		Cout() << "Try open Connection again\n";
		
		if(session.Reconnect()) { // CRASH !!!!!!!!!
			try {
				Sql sql;
				sql * Select(ID, VALUE).From(TEST_TABLE)
				                       .OrderBy(Descending(ID))
				                       .Limit(3);
				while(sql.Fetch())
					Cout() << AsString(sql[0]) << ": " << AsString(sql[VALUE]) << "\n";
			}
			catch(SqlExc &ex) {
				Cerr() << "ERROR: " << ex << "\n";
				SetExitCode(1);
			}
		} else {
			Cout() << "ERROR: " << session.GetLastError() << "\n";
		}
	}
	else {
		Cerr() <<"ERROR: Unable to connect to database\n";
		SetExitCode(1);
	}
}

// Moderator: PLESE USE CODE TAG FOR THE NEXT TIME!

My Question is what is the right way to do a Reconnect after Close ?

index.php?t=getfile&id=6285&private=0

index.php?t=getfile&id=6286&private=0

[Updated on: Wed, 25 November 2020 17:30] by Moderator

Report message to a moderator

Forum: U++ Library : Other (not classified elsewhere)
 Topic: SOLVED SetLabel issue
SOLVED SetLabel issue [message #55628] Wed, 25 November 2020 13:03
forlano is currently offline  forlano
Messages: 1110
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

today I have done a SVN checkout and with a previously working program the compiler began to complain about a lay file

C:\MyApps\Vega82/Vega.lay (882): error: no member named 'SetLabel' in 'Upp::Ctrl'

Am I done something wrong or the interface has changed and I need to fix it?

Thanks,
Luigi

EDIT: the situation is becoming worse... the lay file is not being correctly displayed. Now trying a fresh Upp install

EDIT 2: After a fresh install the problem disappeared. It seems the problem was caused by my svn client. Rolling Eyes

[Updated on: Wed, 25 November 2020 14:42]

Report message to a moderator

Forum: CalendarCtrl
 Topic: DropTime TimeAlways
DropTime TimeAlways [message #55626] Wed, 25 November 2020 12:17
warchef is currently offline  warchef
Messages: 10
Registered: January 2019
Location: Hungary
Promising Member
Hello,

in layout editor (version 15517), if I check the TimeAlways property, I get a compiler error: no member named 'LeftPosZ' in 'Upp::ConvertTime'.

Sincerely,
warchef



Current Time: Sat Nov 28 02:39:46 CET 2020

Total time taken to generate the page: 0.01294 seconds