【问题标题】:QT c++ application crash in single shot timer and connectQT c++ 应用程序在单次计时器中崩溃并连接
【发布时间】:2020-09-23 06:13:29
【问题描述】:

MyFile.cpp

MyFile::MyFile(QWidget *parent) :
                QWidget(parent),
                ui(new Ui::MyFile)
{
   ui->setupUi(this);      
   QTimer::singleShot(15000, this, SLOT(MyTreatment()));
   QObject::connect(&BlinkScreenTimer, SIGNAL(timeout()), this, SLOT(BlinkScreen()));
   BlinkScreenTimer.start(1000);
}

void MyFile::MyTreatment()
{
    BlinkScreenTimer.stop();
    qDebug() << __LINE__;
}

void MyFile::BlinkScreen()
{
  qDebug() << __LINE__;
}

MyFile.h

private:
    QTimer BlinkScreenTimer;

public slots:
    void BlinkScreen();
    void MyTreatment();

崩溃日志

GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/user/LZ_50/MyApplicationWithDebugSymbol...done.

warning: core file may not match specified executable file.
[New LWP 1674]
[New LWP 1682]
[New LWP 1684]
[New LWP 1683]
[New LWP 1690]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Core was generated by `/home/user/LZ_50/MyApplicationWithDebugSymbol'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x76531ade in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5
[Current thread is 1 (Thread 0x72e4d000 (LWP 1674))]
(gdb) 

申请回溯

(gdb) 
(gdb) 
(gdb) 
(gdb) thread apply all bt full

Thread 5 (Thread 0x6850e3a0 (LWP 16409)):
#0  0x75b82730 in poll () at ../sysdeps/unix/syscall-template.S:84
No locals.
#1  0x76cea89a in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 4 (Thread 0x67b8c3a0 (LWP 16414)):
#0  0x75d9bbbe in nanosleep () at ../sysdeps/unix/syscall-template.S:84
No locals.
#1  0x7600056e in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
No symbol table info available.
#2  0x75f9f094 in QThread::msleep(unsigned long) () from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
No symbol table info available.
#3  0x005432d6 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0x729ea3a0 (LWP 16407)):
#0  0x75b82730 in poll () at ../sysdeps/unix/syscall-template.S:84
No locals.
#1  0x732bdec4 in ?? () from /usr/lib/arm-linux-gnueabihf/libxcb.so.1
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 0x69ee63a0 (LWP 16408)):
#0  0x75b83914 in ioctl () at ../sysdeps/unix/syscall-template.S:84
No locals.
#1  0x753d72a0 in gcoOS_DeviceControl (Os=Os@entry=0x0, IoControlCode=IoControlCode@entry=30000, InputBuffer=InputBuffer@entry=0x69ee5be0, InputBufferSize=InputBufferSize@entry=400, 
    OutputBuffer=0x69ee5be8, OutputBufferSize=400) at /usr/src/debug/imx-gpu-viv/1_git-r0/git/driver/hal/os/linux/user/gc_hal_user_os.c:2655
        status = <optimized out>
        inputBuffer = 0x69ee5be0
        outputBuffer = 0x0
        args = {InputBuffer = 1777228776, InputBufferSize = 400, OutputBuffer = 1777228776, OutputBufferSize = 400}
        tls = 0x69500480
        logical = <optimized out>
        interrupt_count = 0
#2  0x753d8cf8 in gcoOS_WaitSignal (Os=Os@entry=0x0, Signal=<optimized out>, Wait=Wait@entry=4294967295) at /usr/src/debug/imx-gpu-viv/1_git-r0/git/driver/hal/os/linux/user/gc_hal_user_os.c:6721
        status = gcvSTATUS_NOT_OUR_INTERRUPT
        iface = {command = gcvHAL_USER_SIGNAL, hardwareType = gcvHARDWARE_2D, coreIndex = 0, status = gcvSTATUS_OK, handle = 8571388601093324800, pid = 1, engine = 1966074500, ignoreTLS = 0, u = {
            GetBaseAddress = {baseAddress = 3, flatMappingRangeCount = 1053, flatMappingRanges = {{start = 18446744071191813216, end = 8444274675986464769}, {start = 2706661561244593852, 
                  end = 84583170372009984}, {start = 8444225680965621972, end = 7633140468858338544}, {start = 12297829385900507136, end = 345527344076}, {start = 0, end = 0}, {start = 2706661559278501888, 
                  end = 0}, {start = 8444300688085638320, end = 7633140502999489744}, {start = 8571396591509724484, end = 8571980376349498584}, {start = 45, end = 5}, {start = 8571781998622801921, 
                  end = 0}, {start = 0, end = 8571782000618575880}, {start = 1995773960, end = 92525602}, {start = 8571782000588876420, end = 0}, {start = 0, end = 0}, {start = 0, end = 0}, {
                  start = 8444178932575502336, end = 995808}}}, QueryVideoMemory = {internalPhysical = 3, internalSize = 18446744071191813216, externalPhysical = 1, externalSize = 2706661561244593852, 
              contiguousPhysical = 0, contiguousSize = 8444225680965621972}, QueryChipIdentity = {chipModel = 3, chipRevision = 1053, chipDate = 1777228896, chipFeatures = 4294967295, 
              chipMinorFeatures = 1, chipMinorFeatures1 = 1966085908, chipMinorFeatures2 = 1966091964, chipMinorFeatures3 = 630193753, chipMinorFeatures4 = 0, chipMinorFeatures5 = 19693554, 
              chipMinorFeatures6 = 1966069972, streamCount = 1966074500, pixelPipes = 1995816176, resolvePipes = 1777229008, instructionCount = 1995816960, numConstants = 2863311531, 
              varyingsCount = 1929960396, gpuCoreCount = 80, productID = 0, chipFlags = (unknown: 0), ecoID = 0, customerID = 0}, MapMemory = {physical = 3, bytes = 18446744071191813216, 
              logical = 8444274675986464769}, UnmapMemory = {physical = 3, bytes = 18446744071191813216, logical = 8444274675986464769}, AllocateLinearVideoMemory = {bytes = 3, alignment = 1053, 
              type = 1777228896, flag = 4294967295, pool = gcvPOOL_DEFAULT, node = 1966085908}, AllocateVideoMemory = {width = 3, height = 1053, depth = 1777228896, format = 4294967295, 
              type = gcvSURF_INDEX, pool = 1966085908, node = 1966091964}, ReleaseVideoMemory = {node = 3}, LockVideoMemory = {node = 3, cacheable = 1053, address = 1777228896, 
              memory = 8444274675986464769, gid = 1966091964, physicalAddress = 84583170372009984}, UnlockVideoMemory = {node = 4522600562691, type = 1777228896, pool = 4294967295, bytes = 1, 
              asynchroneous = 1966085908}, AllocateNonPagedMemory = {bytes = 4522600562691, physical = 1777228896, logical = 8444274675986464769}, FreeNonPagedMemory = {bytes = 4522600562691, 
              physical = 1777228896, logical = 8444274675986464769}, AllocateVirtualCommandBuffer = {bytes = 4522600562691, physical = 1777228896, logical = 8444274675986464769}, 
            FreeVirtualCommandBuffer = {bytes = 4522600562691, physical = 1777228896, logical = 8444274675986464769}, Event = {queue = 4522600562691}, Commit = {context = 4522600562691, 
              commandBuffer = 18446744071191813216, delta = 8444274675986464769, deltas = {2706661561244593852, 84583170372009984, 8444225680965621972, 7633140468858338544, 12297829385900507136, 
                345527344076, 0, 0, 2706661559278501888, 0}, contexts = {8444300688085638320, 7633140502999489744, 8571396591509724484, 8571980376349498584, 45, 5, 8571781998622801921, 0, 0, 
---Type <return> to continue, or q <return> to quit---
                8571782000618575880}, commandBuffers = {1995773960, 92525602, 8571782000588876420, 0, 0, 0, 0, 0, 8444178932575502336, 995808}, queue = 7633147959251572500, engine1 = 1777231968, 
              shared = 1, index = 0, count = 1995699043, commitStamp = 4294967296, contextSwitched = 5}, MapUserMemory = {memory = 4522600562691, physical = 1777228896, size = 8444274675986464769, 
              info = 1966091964, address = 630193753}, UnmapUserMemory = {memory = 4522600562691, size = 18446744071191813216, info = 1, address = 1966085908}, UserSignal = {command = gcvUSER_SIGNAL_WAIT, 
              id = 1053, manualReset = 1777228896, wait = 4294967295, state = 1}, Signal = {signal = 4522600562691, auxSignal = 18446744071191813216, process = 8444274675986464769, fromWhere = 1966091964}, 
            WriteData = {address = 3, data = 1053}, AllocateContiguousMemory = {bytes = 4522600562691, address = 1777228896, physical = 4294967295, logical = 8444274675986464769}, FreeContiguousMemory = {
              bytes = 4522600562691, physical = 1777228896, logical = 8444274675986464769}, ReadRegisterData = {address = 3, data = 1053}, WriteRegisterData = {address = 3, data = 1053}, 
            ReadRegisterDataEx = {address = 3, coreSelect = 1053, data = {1777228896, 4294967295, 1, 1966085908}}, WriteRegisterDataEx = {address = 3, coreSelect = 1053, data = {1777228896, 4294967295, 1, 
                1966085908}}, GetProfileSetting = {enable = 3}, SetProfileSetting = {enable = 3}, SetProfilerRegisterClear = {bclear = 3}, RegisterProfileData_part1 = {context = 3, Counters = {
                gpuTotalRead64BytesPerFrame = 1053, gpuTotalWrite64BytesPerFrame = 1777228896, fe_draw_count = 4294967295, fe_out_vertex_count = 1, fe_cache_miss_count = 1966085908, 
                fe_cache_lk_count = 1966091964, fe_stall_count = 630193753, fe_starve_count = 0, fe_process_count = 19693554, pe0_pixel_count_killed_by_color_pipe = 1966069972, 
                pe0_pixel_count_killed_by_depth_pipe = 1966074500, pe0_pixel_count_drawn_by_color_pipe = 1995816176, pe0_pixel_count_drawn_by_depth_pipe = 1777229008, 
                pe1_pixel_count_killed_by_color_pipe = 1995816960, pe1_pixel_count_killed_by_depth_pipe = 2863311531, pe1_pixel_count_drawn_by_color_pipe = 1929960396, 
                pe1_pixel_count_drawn_by_depth_pipe = 80, shader_cycle_count = 0, vs_shader_cycle_count = 0, ps_shader_cycle_count = 0, ps_inst_counter = 0, ps_rendered_pixel_counter = 0, 
                vs_inst_counter = 630193753, vs_rendered_vertice_counter = 0, vs_branch_inst_counter = 0, vs_texld_inst_counter = 1777228976, ps_branch_inst_counter = 1966091964, 
                ps_texld_inst_counter = 1777229008, vs_non_idle_starve_count = 1777229016, vs_starve_count = 1777229124, vs_stall_count = 1995683785, vs_process_count = 1777229016, 
                ps_non_idle_starve_count = 1995819708, ps_starve_count = 45, ps_stall_count = 0, ps_process_count = 5, pa_input_vtx_counter = 0, pa_input_prim_counter = 1, 
                pa_output_prim_counter = 1995773520, pa_depth_clipped_counter = 0, pa_trivial_rejected_counter = 0, pa_culled_prim_counter = 0, pa_droped_prim_counter = 0, 
                pa_frustum_clipped_prim_counter = 1995773960, pa_frustum_clipdroped_prim_counter = 1995773520, pa_non_idle_starve_count = 1995773960, pa_starve_count = 0, pa_stall_count = 92525602, 
                pa_process_count = 0, se_culled_triangle_count = 1966074500, se_culled_lines_count = 1995773520, se_clipped_triangle_count = 0, se_clipped_line_count = 0, se_starve_count = 0, 
                se_stall_count = 0, se_receive_triangle_count = 0, se_send_triangle_count = 0, se_receive_lines_count = 0, se_send_lines_count = 0, se_process_count = 0, se_trivial_rejected_line_count = 0, 
                se_non_idle_starve_count = 0, ra_input_prim_count = 1966063616, ra_total_quad_count = 995808, ra_valid_quad_count_after_early_z = 0, ra_valid_pixel_count_to_render = 1966085908, 
                ra_output_valid_quad_count = 1777230752, ra_output_valid_pixel_count = 1777231968, ra_pipe_cache_miss_counter = 1, ra_pipe_hz_cache_miss_counter = 0, 
                ra_prefetch_cache_miss_counter = 1995699043, ra_prefetch_hz_cache_miss_counter = 0, ra_eez_culled_counter = 1, ra_non_idle_starve_count = 5, ra_starve_count = 0, ra_stall_count = 0, 
                ra_process_count = 1966074500, tx_total_bilinear_requests = 39114960, tx_total_trilinear_requests = 39115024, tx_total_discarded_texture_requests = 39115168, tx_total_texture_requests = 0, 
                tx_mc0_miss_count = 0, tx_mc0_request_byte_count = 39114960, tx_mc1_miss_count = 39115024, tx_mc1_request_byte_count = 39115448, tx_non_idle_starve_count = 2863311531, tx_starve_count = 0, 
                tx_stall_count = 4294967281, tx_process_count = 0}}, RegisterProfileData_part2 = {context = 3, Counters = {mcc_total_read_req_8B_from_colorpipe = 1053, 
                mcc_total_read_req_8B_sentout_from_colorpipe = 1777228896, mcc_total_write_req_8B_from_colorpipe = 4294967295, mcc_total_read_req_sentout_from_colorpipe = 1, 
                mcc_total_write_req_from_colorpipe = 1966085908, mcc_total_read_req_8B_from_depthpipe = 1966091964, mcc_total_read_req_8B_sentout_from_depthpipe = 630193753, 
                mcc_total_write_req_8B_from_depthpipe = 0, mcc_total_read_req_sentout_from_depthpipe = 19693554, mcc_total_write_req_from_depthpipe = 1966069972, 
                mcc_total_read_req_8B_from_others = 1966074500, mcc_total_write_req_8B_from_others = 1995816176, mcc_total_read_req_from_others = 1777229008, mcc_total_write_req_from_others = 1995816960, 
                mcc_axi_total_latency = 2863311531, mcc_axi_sample_count = 1929960396, mcc_axi_max_latency = 80, mcc_axi_min_latency = 0, mc_fe_read_bandwidth = 0, mc_mmu_read_bandwidth = 0, 
                mc_blt_read_bandwidth = 0, mc_sh0_read_bandwidth = 0, mc_sh1_read_bandwidth = 630193753, mc_pe_write_bandwidth = 0, mc_blt_write_bandwidth = 0, mc_sh0_write_bandwidth = 1777228976, 
                mc_sh1_write_bandwidth = 1966091964, mcz_total_read_req_8B_from_colorpipe = 1777229008, mcz_total_read_req_8B_sentout_from_colorpipe = 1777229016, 
                mcz_total_write_req_8B_from_colorpipe = 1777229124, mcz_total_read_req_sentout_from_colorpipe = 1995683785, mcz_total_write_req_from_colorpipe = 1777229016, 
                mcz_total_read_req_8B_from_depthpipe = 1995819708, mcz_total_read_req_8B_sentout_from_depthpipe = 45, mcz_total_write_req_8B_from_depthpipe = 0, 
                mcz_total_read_req_sentout_from_depthpipe = 5, mcz_total_write_req_from_depthpipe = 0, mcz_total_read_req_8B_from_others = 1, mcz_total_write_req_8B_from_others = 1995773520, 
                mcz_total_read_req_from_others = 0, mcz_total_write_req_from_others = 0, mcz_axi_total_latency = 0, mcz_axi_sample_count = 0, mcz_axi_max_latency = 1995773960, 
                mcz_axi_min_latency = 1995773520, hi0_total_read_8B_count = 1995773960, hi0_total_write_8B_count = 0, hi0_total_read_request_count = 92525602, hi0_total_write_request_count = 0, 
                hi0_axi_cycles_read_request_stalled = 1966074500, hi0_axi_cycles_write_request_stalled = 1995773520, hi0_axi_cycles_write_data_stalled = 0, hi1_total_read_8B_count = 0, 
                hi1_total_write_8B_count = 0, hi1_total_read_request_count = 0, hi1_total_write_request_count = 0, hi1_axi_cycles_read_request_stalled = 0, hi1_axi_cycles_write_request_stalled = 0, 
                hi1_axi_cycles_write_data_stalled = 0, hi_total_cycle_count = 0, hi_total_idle_cycle_count = 0, hi_total_read_8B_count = 0, hi_total_write_8B_count = 1966063616, 
                l2_total_axi0_read_request_count = 995808, l2_total_axi1_read_request_count = 0, l2_total_axi0_write_request_count = 1966085908, l2_total_axi1_write_request_count = 1777230752, 
                l2_total_read_transactions_request_by_axi0 = 1777231968, l2_total_read_transactions_request_by_axi1 = 1, l2_total_write_transactions_request_by_axi0 = 0, 
                l2_total_write_transactions_request_by_axi1 = 1995699043, l2_axi0_minmax_latency = 0, l2_axi0_min_latency = 1, l2_axi0_max_latency = 5, l2_axi0_total_latency = 0, 
                l2_axi0_total_request_count = 0, l2_axi1_minmax_latency = 1966074500, l2_axi1_min_latency = 39114960, l2_axi1_max_latency = 39115024, l2_axi1_total_latency = 39115168, 
                l2_axi1_total_request_count = 0}}, RegisterProfileData2D = {hwProfile2D = 4522600562691}, SetPowerManagement = {state = gcvPOWER_SUSPEND}, QueryPowerManagement = {state = gcvPOWER_SUSPEND, 
              isIdle = 1053}, QueryKernelSettings = {settings = {signal = 3}}, MapPhysical = {map = 3, physical = 18446744071191813216}, Debug = {set = 3, level = 1053, zones = 1777228896, enable = -1, 
              type = gcvMESSAGE_DUMP, messageSize = 1966085908, 
              message = "\274.0uY\376\217%\000\000\000\000\362\177,\001\324\330/u\204\352/u\360\274\365v\320\\\356i\000\300\365v\253\252\252\252\314\333\bsP", '\000' <repeats 23 times>, "Y\376\217%\000\000\000\000\000\000\000"}, Cache = {operation = gcvCACHE_FLUSH, process = 18446744071191813216, logical = 8444274675986464769, bytes = 2706661561244593852, node = 0}, TimeStamp = {timer = 3, request = 1053, 
              timeDelta = 1777228896}, Database = {validProcessID = 3, processID = 1053, vidMem = {counters = {bytes = 18446744071191813216, maxBytes = 8444274675986464769, 
                  totalBytes = 2706661561244593852, allocCount = 0, freeCount = 19693554}, time = 8444225680965621972}, nonPaged = {counters = {bytes = 7633140468858338544, maxBytes = 12297829385900507136, 
                  totalBytes = 345527344076, allocCount = 0, freeCount = 0}, time = 0}, contiguous = {counters = {bytes = 2706661559278501888, maxBytes = 0, totalBytes = 8444300688085638320, 
                  allocCount = 1777229008, freeCount = 1777229016}, time = 8571396591509724484}, gpuIdle = {counters = {bytes = 8571980376349498584, maxBytes = 45, totalBytes = 5, allocCount = 1, 
                  freeCount = 1995773520}, time = 0}, vidMemPool = {{counters = {bytes = 0, maxBytes = 8571782000618575880, totalBytes = 1995773960, allocCount = 92525602, freeCount = 0}, 
                  time = 8571782000588876420}, {counters = {bytes = 0, maxBytes = 0, totalBytes = 0, allocCount = 0, freeCount = 0}, time = 0}, {counters = {bytes = 8444178932575502336, maxBytes = 995808, 
                    totalBytes = 7633147959251572500, allocCount = 1777231968, freeCount = 1}, time = 8571462122343497728}}}, Version = {major = 3, minor = 1053, patch = 1777228896, build = 4294967295}, 
            ChipInfo = {count = 3, types = {1053, 1777228896, 4294967295, gcvHARDWARE_3D, 1966085908, 1966091964, 630193753, gcvHARDWARE_INVALID, 19693554, 1966069972}, ids = {1966074500, 1995816176, 
                1777229008, 1995816960, 2863311531, 1929960396, 80, 0, 0, 0}}, Attach = {context = 3, maxState = 18446744071191813216, numStates = 1, map = 1966085908, physicals = {1966091964, 630193753}, 
---Type <return> to continue, or q <return> to quit---
              logicals = {84583170372009984, 8444225680965621972}, bytes = 1995816176}, Detach = {context = 3}, GetFrameInfo = {frameInfo = 4522600562691}, SetTimeOut = {timeOut = 3}, VGCommit = {
              context = 4522600562691, queue = 18446744071191813216, entryCount = 1, taskTable = 2706661561244593852}, QueryCommandBuffer = {information = {feBufferInt = 3, tsOverflowInt = 1053, 
                addressMask = 1777228896, addressAlignment = 4294967295, commandAlignment = 1, stateCommandSize = 1966085908, restartCommandSize = 1966091964, fetchCommandSize = 630193753, 
                callCommandSize = 0, returnCommandSize = 19693554, eventCommandSize = 1966069972, endCommandSize = 1966074500, staticTailSize = 1995816176, dynamicTailSize = 1777229008}}, SetFscaleValue = {
              value = 3}, GetFscaleValue = {value = 3, minValue = 1053, maxValue = 1777228896}, ExportVideoMemory = {node = 3, flags = 1053, fd = 1777228896}, NameVideoMemory = {handle = 3, name = 1053}, 
            ImportVideoMemory = {name = 3, handle = 1053}, QueryResetTimeStamp = {timeStamp = 4522600562691, contextID = 18446744071191813216}, CreateNativeFence = {signal = 4522600562691, 
              fenceFD = 1777228896}, WaitNativeFence = {fenceFD = 3, timeout = 1053}, DestroyMmu = {mmu = 4522600562691}, ShBuf = {command = gcvSHBUF_WRITE, id = 18446744071191813216, 
              data = 8444274675986464769, bytes = 1966091964}, GetGraphicBufferFd = {node = {3, 1053, 1777228896}, shBuf = 8444274675986464769, signal = 1966091964, fd = 630193753}, SetVidMemMetadata = {
              node = 3, readback = 1053, ts_fd = 1777228896, fc_enabled = 4294967295, fc_value = 1, fc_value_upper = 1966085908, compressed = 1966091964, compress_format = 630193753}, GetVideoMemoryFd = {
              handle = 3, fd = 1053}, ConfigPowerManagement = {enable = 3}, WrapUserMemory = {desc = {flag = 3, handle = 1053, dmabuf = 18446744071191813216, logical = 8444274675986464769, 
                physical = 1966091964, size = 630193753, externalMemoryInfo = {allocatorName = "\000\000\000\000\362\177,\001\324\330/u\204\352/u\360\274\365v\320\\\356i\000\300\365v\253\252\252\252", 
                  userData = {1929960396, 80, 0, 0, 0, 0, 0, 630193753}}}, node = 0, bytes = 8444300688085638320}, WaitFence = {handle = 3, timeOut = 1053}, CommitDone = {context = 4522600562691}, 
            BottomHalfUnlockVideoMemory = {node = 3, type = 1053}, QueryChipOptions = {gpuProfiler = 3, allowFastClear = 1053, powerManagement = 1777228896, enableMMU = -1, 
              allowCompression = gcvCOMPRESSION_OPTION_COLOR, uscL1CacheRatio = 1966085908, secureMode = (unknown: 1966091964)}}}
#3  0x7531845c in gcoBufferCommitWorker (ThreadData=0x254d910) at /usr/src/debug/imx-gpu-viv/1_git-r0/git/driver/hal/user/gc_hal_user_buffer.c:1212
        i = 0
        bStop = 0
        currWorker = <optimized out>
        deltaWorker = <optimized out>
        commitWorker = 0x254d910
#4  0x75d945d8 in start_thread (arg=0x0) at pthread_create.c:458
        pd = 0x0
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {-449406527, -117341756, 1777230752, 2129674880, 2, 1777229232, 1927680000, 0 <repeats 57 times>}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 
              0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#5  0x75b886fa in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
No locals.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0x72e61000 (LWP 16399)):
#0  0x76545ade in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5
No symbol table info available.
#1  0x76545ada in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

我的应用程序随机崩溃。我的代码如上所述。当应用程序崩溃时,我的应用程序控件未到达功能 MyTreatmentBlinkScreen 的行没有打印。 我已经在我的应用程序之外找到的 /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5 地址编译了带有调试符号的应用程序。 这是 QT-Framework 的问题还是应用程序中发生了什么。

【问题讨论】:

  • 安装 Qt 的调试符号,然后在 gdb 中执行 bt。有些东西你没有展示。至少缺少对ui-&gt;setupUi 的调用,并且每个小部件不应该有一个 UI 实例,它是一个工厂,应该只有一个实例。
  • PS:你不应该使用 Qt4 风格的 SIGNAL / SLOT 宏。它们不提供类型安全,不匹配的签名将导致运行时崩溃。使用带有函数指针的现代语法。
  • 程序崩溃,所以程序员必须学会调试它,我们只能帮助解释为什么一些小示例程序,完全贴在这里,崩溃。我们无法弄清楚您未公开的程序崩溃的原因。
  • @Ext3h 虽然我一般同意 Qt5 信号,但我认为插槽 void BlinkScreen();void MyTreatment();QTimer::timeout() 兼容。顺便提一句。碰撞?我认为这是控制台上的通知(并且插槽被忽略),但我必须承认我对 Qt4 风格的信号几乎没有经验。不过,我怀疑还有别的。 minimal reproducible example 可以很好地证明这种包含的合理性。
  • @ÖöTiib 有很多由 Qt 设计本身造成的hinden-bug 情况。调用槽时可能发生的崩溃之一是签名不兼容。另一个是竞争条件或事实,即在处理另一个槽函数期间调用槽的对象是deleted。

标签: c++ qt c++14


【解决方案1】:

来自调试日志/usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5 分钟 QT 库崩溃。 当您违反 qt 库的某些规则时,QT 库崩溃。 如果您使用delete this,请检查您以前使用过的插槽 然后使用 deleteLater()。 由于在插槽内使用delete this,此处堆栈帧损坏。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-11
    • 1970-01-01
    • 1970-01-01
    • 2020-03-06
    相关资源
    最近更新 更多