royqh1979 / RedPanda-CPP

A light-weight C/C++ IDE based on Qt
GNU General Public License v3.0
938 stars 102 forks source link

Weird Crash for a particular piece of code. #412

Open aenlemmea opened 4 months ago

aenlemmea commented 4 months ago
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <unordered_map>

#define all(x) (x).begin(), (x).end()
#define arr_all(x, y) x, x + y
#define F(i, start, n) for (auto i = start-(start > n); (i < n)^(start > n); i += 1-2*(start > n))
#define done return;
#define puni(x) int x; cin >> x;

#define fin "\n"

using namespace std;

void solve() {
    pair<int, int> A, B, F;
    cin >> A.first >> A.second;
    cin >> B.first >> B.second;
    cin >> F.first >> F.second;

    int ans = abs(A.first - B.first) + abs(A.second - B.second);
}

int main() {

    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int t;
    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}

If I try to add the line if (A.first == F. ... after int ans = ... then the IDE instantly crashes. It seems like something regarding showing command completions for F is failing. Just doing F. itself crashes RPCPP.

I am on Windows. Portable edition. Version: 2.26.2249 (x86_64)

Ltabsyy commented 4 months ago

这个在最新版已经修复了,等2.27/3.0正式版即可。 This has been fixed in the latest version, wait for the official version of 2.27/3.0.

aenlemmea commented 4 months ago

Can I get an early CI artifact build because the crashes are happening too often now. I lost a few files completely due to this bug.

我能否获得早期的 CI 工件构建,因为现在崩溃发生得太频繁了。由于这个错误,我完全丢失了一些文件。

royqh1979 commented 3 months ago

Can I get an early CI artifact build because the crashes are happening too often now. I lost a few files completely due to this bug.

我能否获得早期的 CI 工件构建,因为现在崩溃发生得太频繁了。由于这个错误,我完全丢失了一些文件。

You can get the newest build from https://github.com/royqh1979/RedPanda-CPP/actions

aenlemmea commented 3 months ago

I did search there but couldn't find a link to any exe. I will look again I guess.

On Sat, May 11, 2024, 12:29 Roy Qu @.***> wrote:

Can I get an early CI artifact build because the crashes are happening too often now. I lost a few files completely due to this bug.

我能否获得早期的 CI 工件构建,因为现在崩溃发生得太频繁了。由于这个错误,我完全丢失了一些文件。

You can get the newest build from https://github.com/royqh1979/RedPanda-CPP/actions

— Reply to this email directly, view it on GitHub https://github.com/royqh1979/RedPanda-CPP/issues/412#issuecomment-2105602819, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4EXDXC6N4EULDMOOEFXTO3ZBW6VDAVCNFSM6AAAAABHGQSVFSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBVGYYDEOBRHE . You are receiving this because you authored the thread.Message ID: @.***>

royqh1979 commented 3 months ago

I did search there but couldn't find a link to any exe. I will look again I guess.

You can click into the “build” workflow,then click into the latest finished workflow run. Scroll down to the bottom of the page, you'll find the artifacts.