Quickfix/C++ - Ordering fields - quickfix

I'm currently trying to speak in FIX using Quickfix/C++ to a Financial Market.
This market rejects my message (a RegistrationInstruction, msgtype=o), telling me that a field is not in the correct place.
The problem is that the specified tag (#29 LastCapacity) is sent by quickfix between field SecurityIDSource #22 and SecurityID #48 and the market tell me that the Instrument "component" should be sent as defined by the specifications which is:
Start <instrument>
55 Symbol
48 SecurityID
22 SecurityIDSource
167SecurityType
end <Instrument>
Then Tag #29 Should not appear inside this component.
Do you have any idea how may I tell quickfix to not send #29 between #22 and #48 ?
Thank you very much

To resolve the problem, I used an existing repeating group inside the message and add the Tag #29 inside it, and initialize it only on the last element of the inserted group elements (I could not copy-paste nor send code outside, sorry).

Related

Magento Error (ReflectionException): Class Unirgy\DropshipMicrosite\Helper\ProtectedCode does not exist

When I run my Magento 2 store, I get a white page with a whole lot of text, and then at the bottom I have this error. The Unirgy modules have cause us a lot of headaches so far. Does anyone know what's going on here?
1 exception(s): Exception #0 (ReflectionException):
Class Unirgy\DropshipMicrosite\Helper\ProtectedCode
does not exist Exception #0 (ReflectionException):
Class Unirgy\DropshipMicrosite\Helper\ProtectedCode does not exist
#1 Magento\Framework\Code\Reader\ClassReader->getConstructor() called
at [vendor/magento/framework/ObjectManager/Definition/Runtime.php:54]
#2 Magento\Framework\ObjectManager\Definition
\Runtime->getParameters() called at [vendor/magento/framework
/ObjectManager/Factory/Dynamic/Developer.php:48]
#3 Magento\Framework\ObjectManager\Factory\Dynamic
\Developer->create() called at [vendor/magento/framework
/ObjectManager/ObjectManager.php:70]
#4 Magento\Framework\ObjectManager\ObjectManager->get() called at
[app/code/Unirgy/Dropship/Helper/Data.php:2590]
#5 Unirgy\Dropship\Helper\Data->getObj() called at [app/code/Unirgy
/DropshipMicrosite/Helper/Data.php:123]
#6 Unirgy\DropshipMicrosite\Helper\Data->_msHlpPr() called at
[app/code/Unirgy/DropshipMicrosite/Helper/Data.php:155]
#7 Unirgy\DropshipMicrosite\Helper\Data->getCurrentVendor() called at
[app/code/Unirgy/DropshipMicrosite/Plugin/AppHttp.php:23]
#8 Unirgy\DropshipMicrosite\Plugin\AppHttp->beforeLaunch() called at
[vendor/magento/framework/Interception/Interceptor.php:121]
#9 Magento\Framework\App\Http\Interceptor->Magento\Framework
\Interception\{closure}() called at [vendor/magento/framework
/Interception/Interceptor.php:153]
#10 Magento\Framework\App\Http\Interceptor->___callPlugins() called
at [generated/code/Magento/Framework/App/Http/Interceptor.php:23]
#11 Magento\Framework\App\Http\Interceptor->launch() called at
[vendor/magento/framework/App/Bootstrap.php:263]
#12 Magento\Framework\App\Bootstrap->run() called at
[pub/index.php:40]
Please check is this file available in you module
Class Unirgy\DropshipMicrosite\Helper\ProtectedCode
or Is there any grammatical error in file name

ComponentType Error When Clicking Edit Product in Magento 2.3.4

When clicking the edit product component type error showing magento 2.3.4
1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): The "componentType" configuration parameter is required for the "price_per_unit" component.
Exception #0 (Magento\Framework\Exception\LocalizedException): The "componentType" configuration parameter is required for the "price_per_unit" component.
#1 Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem() called at [vendor/magento/framework/View/Element/UiComponentFactory.php:414]
#2 Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem() called at [vendor/magento/framework/View/Element/UiComponentFactory.php:321]
#3 Magento\Framework\View\Element\UiComponentFactory->mergeMetadata() called at [vendor/magento/framework/View/Element/UiComponentFactory.php:218]
#4 Magento\Framework\View\Element\UiComponentFactory->create() called at [vendor/magento/framework/View/Layout/Generator/UiComponent.php:140]
#5 Magento\Framework\View\Layout\Generator\UiComponent->generateComponent() called at [vendor/magento/framework/View/Layout/Generator/UiComponent.php:103]
#6 Magento\Framework\View\Layout\Generator\UiComponent->process() called at [vendor/magento/framework/View/Layout/GeneratorPool.php:81]
#7 Magento\Framework\View\Layout\GeneratorPool->process() called at [vendor/magento/framework/View/Layout.php:350]
#8 Magento\Framework\View\Layout->generateElements() called at [vendor/magento/framework/View/Layout/Builder.php:129]
#9 Magento\Framework\View\Layout\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Page/Builder.php:55]
#10 Magento\Framework\View\Page\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Layout/Builder.php:65]
#11 Magento\Framework\View\Layout\Builder->build() called at [vendor/magento/framework/View/Layout.php:257]
#12 Magento\Framework\View\Layout->build() called at [vendor/magento/framework/View/Layout.php:882]
#13 Magento\Framework\View\Layout->getBlock() called at [vendor/magento/module-backend/Model/View/Result/Page.php:26]
#14 Magento\Backend\Model\View\Result\Page->setActiveMenu() called at [vendor/magento/module-catalog/Controller/Adminhtml/Product/Edit.php:82]
#15 Magento\Catalog\Controller\Adminhtml\Product\Edit->execute() called at [generated/code/Magento/Catalog/Controller/Adminhtml/Product/Edit/Interceptor.php:24]
#16 Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->execute() called at [vendor/magento/framework/App/Action/Action.php:108]
#17 Magento\Framework\App\Action\Action->dispatch() called at [vendor/magento/module-backend/App/AbstractAction.php:231]
#18 Magento\Backend\App\AbstractAction->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#19 Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#20 Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:143]
#21 Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#22 Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#23 Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->___callPlugins() called at [generated/code/Magento/Catalog/Controller/Adminhtml/Product/Edit/Interceptor.php:39]
#24 Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:159]
#25 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:99]
#26 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#27 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#28 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#29 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#30 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116]
#31 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#32 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:40]
Though this is long overdue, we deeply apologies for that and hurry to provide you with a solution.
Based on the error provided, the "price_per_unit" attribute is missing in some of your attribute sets. There is a chance that you created/migrated your attribute sets after extension installation.
To solve this problem, please complete the following steps:
Open your attribute sets for editing
Make sure it contains the following group and the attribute - https://prnt.sc/17n8d4y
group: mageworx-dynamic-options
attribute: price_per_unit
If no, you need to create this group manually and drag and drop the attribute to this group from the Unassigned Attributes column.
Should you have any further questions or difficulties, we are always happy to assist.
Feel free to contact our Support Team at support#mageworx.com with inquiries.
Kindly,
The Mageworx Team
MageWorx Advanced Product Options - You'd need to speak to MageWorx

incorrect checksum for freed object. Extremely strange crash on app

I've been working on an app for some time now.. Up until now i've been running it whilst the debugger has been attached and it was working well (because NSZombies was enabled)...
I recently noticed that when pushing to a new view controller the app would crash. I figured it would be a simple fix but so far its not looking that way.
The app works by doing the following (this method has worked previously)...
User Selects View
RootViewController pushed to tableViewController
User Selects item
ViewController initialised and configured
Navigation Controller pushes to new ViewController
Now if I configure my scheme to enable NSZombies, then this works fine.. my new view loads and vola, it works.
However.. if i don't the app crashes!
In my console window, I get the following error:
2012-01-17 19:51:14.599 DrivingInstructor[61946:17003] -[PhotoViewController loadView]
2012-01-17 19:51:14.654 DrivingInstructor[61946:17003] -[PhotoViewController viewWillAppear:]
DrivingInstructor(61946,0xac6ad2c0) malloc: *** error for object 0x92b0e14: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
So i set the malloc_error_break to see whats happening... doesn't make a difference, I still get the above error (note the first two messages show that my new ViewController is initialising)
If I run a backtrace after the crash.. here is my output:
#0 0x956a9c97 in malloc_error_break ()
#1 0x9566b4ce in szone_error ()
#2 0x9566b54e in free_list_checksum_botch ()
#3 0x9566b63f in tiny_free_list_remove_ptr ()
#4 0x956702b1 in szone_free ()
#5 0x01f30a98 in __CFAllocatorSystemDeallocate ()
#6 0x01f2978a in CFAllocatorDeallocate ()
#7 0x01f30960 in CFRelease ()
#8 0x01fe6b4f in __CFDictionaryStandardReleaseKey ()
#9 0x01f474df in __CFBasicHashDrain ()
#10 0x01f304e3 in CFRelease ()
#11 0x02011e94 in -[__NSArrayM dealloc] ()
#12 0x021c8e4d in _objc_rootRelease ()
#13 0x021c8e10 in objc_release ()
#14 0x021c9c60 in (anonymous namespace)::AutoreleasePoolPage::pop ()
#15 0x01f58ed8 in _CFAutoreleasePoolPop ()
#16 0x015f08ce in __NSFireDelayedPerform ()
#17 0x01ff8966 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
#18 0x01ff8407 in __CFRunLoopDoTimer ()
#19 0x01f5b7c0 in __CFRunLoopRun ()
#20 0x01f5adb4 in CFRunLoopRunSpecific ()
#21 0x01f5accb in CFRunLoopRunInMode ()
#22 0x023e2879 in GSEventRunModal ()
#23 0x023e293e in GSEventRun ()
#24 0x00cd8a9b in UIApplicationMain ()
#25 0x00002149 in main (argc=1, argv=0xbffff5d4) at main.m:14
I should also point out... I originally thought this was being caused by me running a background thread what resizes images for me while the ui loads so there is no freezing up as my first crash log suggested it was crashing on a certain line in my image processing class but after not being able to sort that and commenting out the function what resizes the images (runs on background thread).. Now the app is crashing without me even calling that thread!
I don't know what has happened to is as my initial crash logs where telling me it was an issue using UIGraphics on a background thread while the crash was happening...
Now it just crashes :S
Here is my crash log below:
(pastebin as i go over 3k character limit)
http://pastebin.com/dGF7QdeH
I would share the code to the app where this issue is occurring but I don't know where it's happening so I can't show you :S
From what I can see, the viewWillAppear: function is called so I can setup my view, but it crashes just before i actually push to it but there is nothing unusual in the setup of the view as the only code i have altered since the last working version is setting up of my view (what runs fine)
If anybody can help me with this I will be VERY grateful... I've been stressing over this all day and posting here is my last resort (before I go to developer.apple.com)
Thanks for reading, Please let me know if you need more info.
Liam
First of all, find out what object is 0x92b0e14. (or whatever address shows up in your debugger.) Once you know what object it is, then put breakpoints everywhere you release it, and put a breakpoint where you get the error. When you hit the release before you hit the error, then you see what the problem is.
It might be that you never retain this object, which could give the same results if it is changed after being autoreleased. In this case, implement a retain/release scheme that keeps this object alive until you're done with it.
You hosed something on the main thread, and the background thread used to trip on it first.
When all else fails, you can use binary search to find the problem. Make a new #define like SEARCH_BUG=1 then use #ifdef SEARCH_BUG to comment out vast areas of code. Leaving Zombies on and enabling scribbling, and everything else would also likely find the bug faster than without it.
This is an iPhone app, run it in the simulator, and on hardware - iPad - etc perhaps the problem will manifest earlier on real hardware or in a simulator.
That stack sure looks like something is being over-released. (Which is less likely if you really did have zombie detection on.)
I don't know if this will help, but the few times I encountered a malloc error, two instances of the same view controller class unintentionally exist in my view controller hierarchy. Try putting NSLog(#"init: %#", self); in your view controllers' init() and NSLog(#"dealloc: %#", self); in their dealloc(), then compare the class names and instance addresses.
I found the function free_list_checksum_botch() on Apple open source.
https://opensource.apple.com/source/Libc/Libc-825.26/gen/magazine_malloc.c
It try to put error log "incorrect checksum for freed object - object was probably modified after being freed."

Zend_Auth and Zend_Namespace Session Error

I'm developing an application, everything works fine but sometimes i get the following error:
Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'session has already been started by session.auto-start or session_start()' in /usr/share/php/libzend-framework-php/Zend/Session.php:462 Stack trace: #0 /usr/share/php/libzend-framework-php/Zend/Session/Namespace.php(143): Zend_Session::start(true) #1 /var/vhosts/rmanager.vsnetwork.net/application/views/helpers/GetProjetoNome.php(7): Zend_Session_Namespace->__construct('rmanager') #2 [internal function]: Zend_View_Helper_GetProjetoNome->GetProjetoNome() #3 /usr/share/php/libzend-framework-php/Zend/View/Abstract.php(342): call_user_func_array(Array, Array) #4 /var/vhosts/rmanager.vsnetwork.net/application/layouts/scripts/layout.phtml(73): Zend_View_Abstract->__call('GetProjetoNome', Array) #5 /var/vhosts/rmanager.vsnetwork.net/application/layouts/scripts/layout.phtml(73): Zend_View->GetProjetoNome() #6 /usr/share/php/libzend-framework-php/Zend/View.php(108): include('/var/vhosts/rma...') #7 /usr/share/php/libzend-framework-php/Zend/View/Abstract.php(880) in /usr/share/php/libzend-framework-php/Zend/Session.php on line 462
If i refresh the page, it works.
Sometimes it returns me the error while i send post to the same page
I'm using Zend_Auth and Zend_Acl inside a plugin and Zend_Namespace in various places of my application.
Does anyone has idea why it is happing?
Thanks
It's kinda hard to help you with so little information, but as far as i read ealier this week when i play with session_namespace, you have to be very careful with it.
This paragraph has been very helpful for me
Don't ever start the session explicitly. Just use it automatically. I also use Zend_Auth and Zend_Sesison_Namespace many times but that error never comes.

help Zend_Registry drops key lang out

can't figure out, why does key lang disappears between language plugin and matched custom route. I'm calling registry from inside model, which is requested inside custome route.
http://pastie.org/1088574
Message: No entry is registered for key 'lang'
Stack trace:
#0 C:\xampp\xampp\htdocs\chat\application\models\Getcategories.php(15): Zend_Registry::get('lang')
#1 C:\xampp\xampp\htdocs\chat\library\Routes\Categories.php(64): Getcategories->__construct()
#2 C:\xampp\xampp\htdocs\chat\library\Zend\Controller\Router\Rewrite.php(398): Routes_Categories->match('/ru/woman-searc...')
#3 C:\xampp\xampp\htdocs\chat\library\Zend\Controller\Front.php(911): Zend_Controller_Router_Rewrite->route(Object(Zend_Controller_Request_Http))
#4 C:\xampp\xampp\htdocs\chat\library\Zend\Controller\Front.php(212): Zend_Controller_Front->dispatch()
#5 C:\xampp\xampp\htdocs\chat\application\Bootstrap.php(65): Zend_Controller_Front::run('C:\xampp\xampp\...')
#6 C:\xampp\xampp\htdocs\chat\public\index.php(34): Bootstrap->run(Array)
#7 {main}
I have checked inside language plugin, it registers lang key fine.
Zend_Registry::get('lang') inside route throws exception as well.
Make sure the Registry-Key is set in Plugins_LangSelector::routeStartup() so it will be registered before processing the routes.
From the ZF-Manual: Plugins
routeStartup() is called before Zend_Controller_Front calls on the router to evaluate the request against the registered routes.
If you set the key in routeShutdown(), preDispatch(), postDispatch() or dispatchLoopShutdown() it is to late.