QStringList of quazip::getFileNameList casts error by destruction - qt

in Qt Creator (qt 4.8, winxp) I wrote
QuaZip* zipfile = new QuaZip;
zipfile->setZipName("myzipfile.zip");
zipfile->open(QuaZip::mdUnzip);
if(zipfile->isOpen()){
QStringList files = zipfile->getFileNameList();
} // here the error occurs
when files is destroyed, a messagebox says
Debug Assertion Failed!
Expression: _CrtIsValidHeapPointer(pUserData)
In the debugger I have the following function stack:
0 DbgBreakPoint ntdll 0x7c90120e
1 RtlpBreakPointHeap ntdll 0x7c96c201
2 RtlpValidateHeapEntry ntdll 0x7c96c63e
3 RtlValidateHeap ntdll 0x7c9603b0
4 HeapValidate kernel32 0x7c85f8d7
5 _CrtIsValidHeapPointer dbgheap.c 2103 0x102d1ac9
6 _free_dbg_nolock dbgheap.c 1317 0x102d0b3a
7 _free_dbg dbgheap.c 1258 0x102d09e0
8 free dbgfree.c 49 0x102d8990
9 qFree qmalloc.cpp 60 0x5e2f1d
10 QString::free qstring.cpp 1235 0x65dd22
11 QString::~QString qstring.h 880 0x5ac0d3
12 QString::`scalar deleting destructor' QuizSet 0x4120e0
13 QList<QString>::node_destruct qlist.h 433 0x412180
14 QList<QString>::free qlist.h 759 0x4115fb
15 QList<QString>::~QList<QString> qlist.h 733 0x410967
16 QStringList::~QStringList MyApp 0x414d9f
17 MyApp::myFunction myapp.cpp 561 0x420e1c
...
line 433 in qlist.h is where the debugger stops:
while (from != to) --to, reinterpret_cast<T*>(to)->~T();
the error occurs only if I call ::getFileNameList(), if I fill the list manual it works fine.
Other operations with quazip work, I can unzip and zip data, only the getFileNameList makes trouble.
EDIT: I found the cause: the quazip1.dll I used was the release version of it, only in debug-running this problem arised. So if I use the debug quazip.dll, it works fine. Annoying they're called the same, so I have to rename everytime I switch from debug to release. Anybody knows a workaround to this?

This means that you are mixing release mode Qt DLLs with Debug ones. You have to create 2 sets of Quazip DLLs one for Release mode and one for Debug mode. You cannot mix Qt Debug DLLs with Release DLLs.

Related

reload does not work in jupyter notebook, but works in Ipython

I use Anaconda a lot, both jupyter notebook and spyder. Here is my python version:
Python 3.7.6 .
After I modified some module written by myself, reload always works in spyder's Ipython console, but does not work in jupyter notebook. Here is my reload code:
import imp
imp.reload(my_module)
Here is what jupyter notebook react(It looks like reload works, but changes don't update)
I also tried the following magic command :
%load_ext autoreload
%autoreload 2
Again, these same code work in spyder's Ipython console, but don't work most of the time (yet sometimes work, I can't figure out when the commands work, but I had experienced twice successes) in jupyter notebook. This is the Error reported by jupyter notebook:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-27-209f44cf5dc0> in <module>
----> 1 get_ipython().run_line_magic('load_ext', 'autoreload ')
2 get_ipython().run_line_magic('autoreload', '2')
D:\Programs\anaconda3\lib\site-packages\IPython\core\interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
2315 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2316 with self.builtin_trap:
-> 2317 result = fn(*args, **kwargs)
2318 return result
2319
<D:\Programs\anaconda3\lib\site-packages\decorator.py:decorator-gen-65> in load_ext(self, module_str)
D:\Programs\anaconda3\lib\site-packages\IPython\core\magic.py in <lambda>(f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):
D:\Programs\anaconda3\lib\site-packages\IPython\core\magics\extension.py in load_ext(self, module_str)
31 if not module_str:
32 raise UsageError('Missing module name.')
---> 33 res = self.shell.extension_manager.load_extension(module_str)
34
35 if res == 'already loaded':
D:\Programs\anaconda3\lib\site-packages\IPython\core\extensions.py in load_extension(self, module_str)
78 if module_str not in sys.modules:
79 with prepended_to_syspath(self.ipython_extension_dir):
---> 80 mod = import_module(module_str)
81 if mod.__file__.startswith(self.ipython_extension_dir):
82 print(("Loading extensions from {dir} is deprecated. "
D:\Programs\anaconda3\lib\importlib\__init__.py in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
128
129
D:\Programs\anaconda3\lib\importlib\_bootstrap.py in _gcd_import(name, package, level)
D:\Programs\anaconda3\lib\importlib\_bootstrap.py in _find_and_load(name, import_)
D:\Programs\anaconda3\lib\importlib\_bootstrap.py in _find_and_load_unlocked(name, import_)
ModuleNotFoundError: No module named 'autoreload '
There is an extra space at the end of the module name which is the cause. I saw a similar stack thread and here it is for your reference.
I ran the magic with the space after the module name and ended up with the same error. Below are the last few lines of the stack trace.
~\anaconda3\lib\importlib\_bootstrap.py in _gcd_import(name, package, level)
~\anaconda3\lib\importlib\_bootstrap.py in _find_and_load(name, import_)
~\anaconda3\lib\importlib\_bootstrap.py in _find_and_load_unlocked(name, import_)
ModuleNotFoundError: No module named 'autoreload '
The solution is to remove the space after the %load_ext autoreload magic. It should be "%load_ext autoreload" and not "%load_ext autoreload ".
The Spyder IPython console seems to do some text processing (trimming spaces) before code execution. Google Colab also does the same and so, the error is not thrown.

iOS 12-only Crash on -[GAIAnalyticsPropertiesStore upsertPropertyRecord:]

Unable to reproduce but getting lots of crashes reported via crashlytics.
See crash log below. If more info is needed please let me know...
Crashing only on devices running iOS 12.0/12.1
Using GoogleAnalytics 3.17.0 (latest)
Crash occurs at:
8 ----- 0x10148534c -[GAIAnalyticsPropertiesStore upsertPropertyRecord:] + 4383150924
Help and suggestions are greatly appreciated. Thanks!
Crashed: GAIThread
0 libsystem_platform.dylib 0x1bf912f3c
_os_unfair_lock_unowned_abort + 36
1 libsystem_platform.dylib 0x1bf914524
_os_unfair_lock_unlock_slow + 144
2 libsqlite3.dylib 0x1c017e18c sqlite3_randomness +
4368
3 libsqlite3.dylib 0x1c015d878 sqlite3_value_text +
26356
4 libsqlite3.dylib 0x1c015d250 sqlite3_value_text +
24780
5 libsqlite3.dylib 0x1c0128434 sqlite3_finalize + 3732
6 libsqlite3.dylib 0x1c01557d0 sqlite3_step + 66844
7 libsqlite3.dylib 0x1c0145464 sqlite3_step + 432
8 ----- 0x10148534c
-[GAIAnalyticsPropertiesStore upsertPropertyRecord:] + 4383150924
9 ----- 0x101484ddc
-[GAIAnalyticsPropertiesStore nextHitNumberForTrackingId:clientId:] + 4383149532
10 ----- 0x10147eb00 -[GAIBatchingDispatcher
queueDispatch:] + 4383124224
11 ----- 0x10147e91c -[GAIBatchingDispatcher
queueModel:] + 4383123740
12 Foundation 0x1c07bb5a0 __NSThreadPerformPerform
+ 336
13 CoreFoundation 0x1bfc9a5b8
CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24
14 CoreFoundation 0x1bfc9a538 __CFRunLoopDoSource0 +
88
15 CoreFoundation 0x1bfc99e1c __CFRunLoopDoSources0 +
176
16 CoreFoundation 0x1bfc94ce8 __CFRunLoopRun + 1040
17 CoreFoundation 0x1bfc945b8 CFRunLoopRunSpecific +
436
18 Foundation 0x1c06886a4 -[NSRunLoop(NSRunLoop)
runMode:beforeDate:] + 300
19 Foundation 0x1c06c4094 -[NSRunLoop(NSRunLoop)
run] + 88
20 ----- 0x10146bf14 +[GAI threadMain:] +
4383047444
21 Foundation 0x1c07bb3b0 NSThread__start +
1040
22 libsystem_pthread.dylib 0x1bf9252fc _pthread_body + 128
23 libsystem_pthread.dylib 0x1bf92525c _pthread_start + 48
24 libsystem_pthread.dylib 0x1bf928d08 thread_start + 4
--
Update:
I made a couple of changes that seemed to have helped. The app is still crashing but less frequently. Also I added log statements to help pinpoint where and when it is crashing.
The change I made that seemed to help was increasing the value for dispatchInterval (previous set to 20)...
[GAI sharedInstance].dispatchInterval = 60;
Also, the crash only seems to occur when the app is launched and/or becomes active while trying to track an event in the app delegate method...
- (void)applicationDidBecomeActive:(UIApplication *)application {
...
GA_EVENT(#"App Launch", #"", #"App Launched", 0);
// NOTE: GA_EVENT defines a custom method that creates the event (GAIDictionaryBuilder)
// and invokes the GAITracker's send method with the event per usual.
// This approach is used throughout the app and was working fine prior
// to iOS 12, but is now causing a crash here for some reason
...
}
Lastly, in the event that this is a bug with GA SDK, I created an issue in their bug tracker. From my research, the last time this crash was reported it seemed to have required an update to their SDK. So, perhaps that's the case here as well. We'll see if I hear anything back from the Google gods...
https://issuetracker.google.com/issues/117476933
We have found the solution to this problem after spending sleepless days and nights. The issue was occurring because of the Apsalar SDK in our case. If you are using Apsalar SDK in your project, I highly recommend you to move from Apsalar to Singular SDK. Singular SDK covers all the functionality provided by Apsalar. So you need not worry about missing any functionality or changing a hell lot of code.
You can download the Singular SDK from the following link: https://support.singular.net/hc/en-us/articles/115000497903-Integrating-the-Singular-SDK

Report in AX 2012 does not open;List of errors

I have created a report in AX 2012 and Visual Studio properly but once I try to open it the following list of erors appears:
Thank you
Error executing code: FormRun (data source) has no valid runable code in method 'new'.
Stack trace
(C)\Classes\FormRun\new
(C)\Classes\SysSetupFormRun\new - line 4
(C)\Classes\ClassFactory\formRunClassOnClient - line 10
(C)\Classes\ClassFactory\formRunClass - line 24
(C)\Classes\DialogForm\doInit - line 12
(C)\Classes\Dialog\doInit - line 12
(C)\Classes\Dialog\doRun - line 24
(C)\Classes\SysOperationDialog\run - line 12
(C)\Classes\SysOperationController\dialogShow - line 6
(C)\Classes\SysOperationController\dialogRun - line 40
(C)\Classes\SysOperationController\prompt - line 9
(C)\Classes\SrsReportRunController\runToScreen - line 26
(C)\Classes\SrsReportRunController\runReport - line 68
(C)\Classes\SrsReportRunController\run - line 27
(C)\Classes\SysOperationController\startOperation - line 10
(C)\Classes\SrsReportRunController\startOperation - line 12
To me, this is mostly base code, so it's a compile or CIL-compile issue most likely.
Have you compiled your CIL or performed an incremental CIL compile?
Refresh your report caches (Tools>Caches>Refresh Report Server).
Are the WCF settings in the AXC used for the report server refreshed?
Is the report server using a specific AXC that may not be refreshed? (https://technet.microsoft.com/en-us/library/hh389774.aspx)
You can find that the issue is with form (as the infolog suggest). The name of the form can be found out if you debug the code in classes.
Try putting debugger on DialogForm.doInit(). In this method, you can find the name of the form in the object variable, "form", used inside this method in a call to args.object(form).
You have to compile this form; Restore it and report does get generated.
Remember, DialogForm.doInit() gets called 2 times, Once, launching input UI form and another when trying to launch report viewer. So if the input/contract form is getting opened and the error comes before showing the report output, its the second time when you are interested to find the name of the form.
In my case, culprit forms were, SysOperationTemplateForm and SRSReportViewer form.

Running into DVTAssertions: ASSERTION FAILURE error with ios-sim

I'm trying get ionic up and running using my mac by following the simple instructions on the website (http://ionicframework.com/getting-started/)
Everything is working until i need to emulate
$ ionic emulate ios
I did a little deeper and I realized the same error lies in when I tried to run ios-sim
Here is what I see
$ ios-sim start
2015-02-27 14:01:57.361 ios-sim[1810:208272] [MT] DVTAssertions: ASSERTION FAILURE in /SourceCache/DVTiOSFrameworks/DVTiOSFrameworks-6274/DVTiPhoneSimulatorRemoteClient/DTiPhoneSimulatorSessionConfig.m:143
Details: (runtime) should not be nil.
Object: <DTiPhoneSimulatorSystemRoot>
Method: +rootWithSimRuntime:
Thread: <NSThread: 0x7ff44a5105f0>{number = 1, name = main}
Hints: None
Backtrace:
0 0x0000000110abe24a -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
1 0x0000000110abdc9f _DVTAssertionHandler (in DVTFoundation)
2 0x0000000110abdf8e _DVTAssertionFailureHandler (in DVTFoundation)
3 0x0000000111062614 +[DTiPhoneSimulatorSystemRoot rootWithSimRuntime:] (in DVTiPhoneSimulatorRemoteClient)
4 0x0000000111061897 -[DTiPhoneSimulatorSessionConfig simulatedSystemRoot] (in DVTiPhoneSimulatorRemoteClient)
5 0x000000010ebadab0 -[iPhoneSimulator launchApp:withFamily:uuid:environment:stdoutPath:stderrPath:timeout:args:] (in ios-sim)
6 0x000000010ebaecfd -[iPhoneSimulator runWithArgc:argv:] (in ios-sim)
7 0x000000010ebaefbb main (in ios-sim)
8 0x000000010ebac37c start (in ios-sim)
9 0x0000000000000002
Abort trap: 6
Please advice

Configure Cyborg R.A.T 9 on elementaryOS with X.Org X Server 1.11.3

I want to configure my Cyborg R.A.T 9 mouse to work with my installation of elementaryOS (luna, 64 Bit).
I used this solution for the last two years, but it doesn't work anymore (I guess it's outdated). Newer post I found included creating a file 910-rat.conf in /etc/X11/xorg.conf.d/, but this folder doesn't exist in my installation. As I don't want to destroy it, I thought it might be better to ask if simply creating that directory and file would work.
TL;DR:
OS: elementaryOS luna (0.2 beta) 64 bit
Mouse: Cyborg R.A.T 9
Xorg X server version: 1.11.3
Question:
Is it ok to create the directory /etc/X11/xorg.conf.d/ and will the conf files in there be used or am I missing any steps?
I found an article in the german ubuntuusers wiki saying that the directory is located in /usr/share/X11/ and not in /etc/X11/ .
So I just added the file in /usr/share/X11/xorg.conf.d/ and it worked.
For further reference:
I added the file 910-rat.conf to the folder /usr/X11/xorg.conf.d/.
The file contained the following content:
Section "InputClass"
Identifier "Cyborg R.A.T. 9"
MatchProduct "R.A.T.7|R.A.T.9"
MatchDevicePath "/dev/input/event*"
Option "Buttons" "17"
Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 7 6 12 0 0 0 16 17"
Option "AutoReleaseButtons" "13 14 15"
Option "ZAxisMapping" "4 5 6 7"
EndSection

Resources